how to connect arduino ethernet to internet using my laptop's wifi connection - arduino-uno

This is the image of ipconfig from cmd.

This has previously worked for me when sharing an internet connection:
Right Click on the WiFi icon on the task bar, select open network sharing center.
Select change adapter settings on the left
Right click your WiFi Adapter, select the sharing tab.
Select Allow other network users to connect through this computer's internet connection.
Set the connection to share to Ethernet.
Connect your Ethernet Shield to the Ethernet port on your computer.
Another route that I have heard of, but have not tried, is to bridge the two connections together. Follow steps 1 and 2 above, then do these steps:
Press down the control key, and select both your Ethernet and WiFi adapters.
Right click one of them, and select bridge connections.
I cannot confirm the second method works, but the first one worked fine for me.
You might need a crossover cable, but these can be easily made using a normal Ethernet cable. Here is a good example.
If the Ethernet board has autosensing, then you do not need to crossover cable. I could not find out if it is necessary, so trial and error would be the best bet for that. Try Ethernet cable first, then try crossover.

Related

Not able to add External Virtual Switch in Hyper-V to connect Android Emulator to Network

I am using Hyper-V to run Visual Studio emulator for android to test Xamarin android app. But emulator is not able to connect to database machine (for making database calls) on same network whereas my computer can access that database.
I have searched a lot on internet but no luck. Even I am not able to add new External Virtual Switch in hyper-v. In my network setting I can see 2 network adapters. One is my physical adapter(Ethernet) to which my computer is connected using LAN cable (Realtek PCIe GBE Family Controller) and second one is vEthernet connected using (Hyper-V Virtual Ethernet Adapter).
Below is the screen shot of hyper-v setting pane of my kit-kat emulator.
It is showing only one switch (window phone emulator switch) not the Realtek Pci Switch. Also I am not able to add a new switch (external switch in hyper-v ) here. Button remains disabled.
Please help me to sort out this. Thanks
I figured out the solution while reading an article for this. For External switch to be added for Hyper-V, we must have Hyper-V Extensible Virtual Switch in our network adapter settings as shown below:
If it is not present then you can add it from install button. It will open a popup window, select Protocol there as shown below.
Once it is added, now you will see External Switch option will be enabled in Hyper-V.

Reset wireless adapter automatically

I have a windows 7 laptop that I am running continuously on wireless internet connect. But sometimes, there are problems with my wireless connection so I have to right click on the wireless connection icon and troubleshoot the problem. Is there a way I could automatically troubleshoot wireless problems with a batch file or windows task scheduler.
Regards
Get devcon
Perform devcon find *
Copy USB\VID_****\PID_**** or PCI\VEN_****\DEV_**** (according BUS type) string for your wireless adapter
Create batch containing line: devcon restart "Your_copied_string"

Can't start hostednetwork

When I try to run netsh wlan start hostednetwork, I get the following message:
C:\Windows\system32>netsh wlan start hostednetwork
The hosted network couldn't be started.
The group or resource is not in the correct state to perform the requested operation.
I'm running this with admin privileges, so it's not the notorious
C:\Users\Kevin>netsh wlan start hostednetwork
You must run this command from a command prompt with administrator privilege.
How do I get the hosted network "in the correct state"?
This happen after you disable via Control Panel -> network adapters -> right click button on the virtual connection -> disable
To fix that go to Device Manager (Windows-key + x + m on windows 8, Windows-key + x then m on windows 10), then open the network adapters tree , right click button on Microsoft Hosted Network Virtual Adapter and click on enable.
Try now with the command netsh wlan start hostednetwork with admin privileges. It should work.
Note: If you don't see the network adapter with name 'Microsoft Hosted Network Virtual Adapter' try on menu -> view -> show hidden devices in the Device Manager window.
Let alone enabling the network adapter under Device Manager may not help. The following helped me resolved the issue.
I tried Disabling and Enabling the Wifi Adapter (i.e. the actual Wifi device adapter not the virtual adapters) in Control Panel -> Network and Internet -> Network Connections altogether worked for me. The same can be done from the Device Manager too. This surely resets the adapter settings and for the Wifi Adapter and the Virtual Miniport adapters.
However, please make sure that the mode is set to allow as in the below example before you run the start command.
netsh wlan set hostednetwork mode=allow ssid=ssidOfUrChoice key=keyOfUrChoice
and after that run the command netsh wlan start hostednetwork.
Also once the usage is over with the Miniport adapter connection, it is a good practice to stop it using the following command.
netsh wlan stop hostednetwork
Hope it helps.
First off, when I went into cmd and typed "netsh wlan show drivers", I had a NO for hosted network support too. Doesn't matter, you can still do it. Just not in cmd.
I think this problem happens because they changed the way hosted networks work in windows 10. Don't use command line.
Just go on your pc to settings>Network>Mobile Hotspot and you should see all the necessary settings there. Turn it on, set up your network.
If it's still not working, go to Control panel>Network and Internet>Network and Sharing Center>Change Adapter Options> and then click on the properties of the network adapter that you want to share. Go to the sharing tab, and share that internet connection, selecting the name of the adapter you want to use to share it with.
I encountered this problem on my laptop. I found the solution for this problem.
Test this command in the command prompt "netsh wlan show driver".
See Hosted network supported.
If it is no,
Then do this
Go to device manager.
Click on view and press on "show hidden devices".
Go down to the list of devices and expand the node "Network Devices" .
Find an adapter with the name "Microsoft Hosted Network Virtual Adapter" and then right click on it.
Select Enable
This will enable the AdHoc created connection, it should appear in the network connections in Network and Sharing Center, if the AdHoc network connection is not appear then open elevated command prompt and apply this command "netsh wlan stop hostednetwork" without quotations.
After this, the connection should appear.
Then try starting your connection. It should work fine.
First check if your wlan card support hosted network and if no update the card driver. Follow this steps
1) open cmd with administrative rights
2) on the black screen type: netsh wlan show driver | findstr Hosted
3) See Hosted network supported, if No then update drivers
Symptoms
You install an application that uses Microsoft Virtual WiFi technology on a computer that is running Windows 7 or Windows Server 2008 R2. However, the application does not work after the computer restarts. Additionally, you receive an error message that resembles the following:
The hosted network couldn't be started. The group or resource is not in the correct state to perform the requested operation.
Cause
This issue occurs because the Virtual Wi-Fi filter driver does not create the Virtual Wi-Fi Adapter correctly when a PNP resource rebalance occurs during the startup process.
Notes
1.This issue may occur when a Plug and Play (PNP) resource rebalance occurs during the startup process. The PNP resource rebalance is usually triggered by a change to the hardware configuration.
2.If you open Device Manager when this issue occurs, you notice that the Virtual WiFi Adapter is not created.
If you can't restart your hostednetwork after rebooting the OS ,just Try this hotfix .It fixed my problem. Or try to figure it out by yourself according to the Symptoms and Cause mentioned at the start of my answer.
Often, I've found that the solution to this problem can be fixed by disabling and then enabling the Wifi hardware. I've made a script to do this automatically instead of doing it manually by going to the device manager. You can find it here
Some fixes I've used for this problem:
Check if the connection you want to share is shareable.
a. Press Win-key + r and run ncpa.cpl
b. Right click on the connection you want to share and go to properties
c. Go to sharing tab and check if sharing is enabled
Run devmgmt.msc from the run console.
a. Expand the network adapters list
b. Right click -> properties on the adapter of the connection you want to share
c. Go to power management tab and enable allow this computer to turn off this device to save power. Restart your laptop if you've made changes.
Check if airplane mode is disabled. You can enable airplane mode and then turn on the wi-fi, you can never know. Do disable airplane mode if it is on.
Use admin command prompt to run this command.
If none of the above answers worked for you, You can try the following solution which worked for me.
Go to Services manager(services.msc) and enable the below services and try again.
WLAN AutoConfig
Wi-Fi Direct Services Connection Manager Service
Hope this solved your problem.
The hosted network won't start if there are other active wifi adapters.
Disable the others whilst you're starting the hosted network.
Fixed by installing "Wifi Direct Access Point". HostedNetwork is not well supported by some Windows 10 drivers.

Cannot connect Windows Phone Emulator to Internet when using Wireless adapter on the host

I’m developing Windows Phone app using VS2012 on Dell XPS 15 laptop with Win8 pro.I read a lot of troubleshooting articles here (specially Windows Phone 8 emulator can't connect to the internet) and in other places on the web and have not managed to solve the issue (see the subject). Note my laptop gets successfully IP using DHCP on both adapters (wireless and wired) and no MAC filtering is set on the router. Here is the story:
1) Does not work: When starting WP emulator, it does not get IP from
router (DHCP)
2) Works:
start over (delete virtual switches and machine in Hyper-v)
disable wireless adapter
connect wired adapter to router with cable
start emulator (it creates machine and switches)
gets IP and Internet is accessible
3) Does not work:
start over (delete virtual switches and machine in Hyper-v)
disable wired adapter– windows control panel shows : Bluetooth and
Wireless enabled and wired disable – no others
start emulator (it creates machine and switches)
result:
a) router log shows “DHCP server received REQUEST”
b) on the host I see (ipconfig) virtual switch gets IP (vEthernet
(Intel(R) Centrino(R) Wireless-N 1030 Virtual Switch)) – it selected
as “Windows Phone Emulator External” in virtual machine settings
c) in emulator network tab of “Additional Tools” window I see adaptors
with default IP 169.*
3) Partially works:
delete virtual switches
disable wired adapter– windows control panel shows : Bluetooth and
Wireless enabled and wired disable – no others
create internal switch in hyper-v named “Windows Phone Emulator
Internal Switch” and select it in internal network adapter of virtual
machine
enable sharing in wireless adapter (in control panel)
start emulator as standalone with xde.exe (starting from VS will not
use right snapshot with deployed app) and does not allow it to
connect to network – loading takes much more time and after that, OS
is loading and emulator shows error dialog “Some functionality maybe
disables”
it possible to use emulator with Internet, but device buttons does
not work – use keyboard shortcuts
(http://devatheart.azurewebsites.net/2011/06/04/windows-phone-7-emulator-and-physical-keyboard-shortcuts/)
it cannot be used for debugging – it is good only for showing the app on public ;-)
You have answered your question but this may help.
connect with your wireless network
host the wireless connection using netsh in CMD. an alternative is creating an internal switch sharing your connection with your lan adapter
you can do that with connectify too.
by now, your PC should show you are both connected to a wireless and lan network.
run the emulator from visual studio and you get connected.

mode switch and intilization of reliance Huawei 3G card

i'm trying to connect reliance Huawei card on linux system ..........
but mode switch is not happening ,showing error
--> Cannot open /dev/ttyUSB0: No such device
sh: /dev/ttyUSB2: No such device
i added mode switch file as below
DefaultVendor=0x230d
DefaultProduct=0x0007
TargetVendor=0x230d
TargetProduct=0x0007
TargetClass=0xff
Configuration=3
CheckSuccess=20
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
but same error and light on card also not blinking........if you have any idea please share with me i have to connect that 3G card
On Ubuntu 10.04 Go to System/Administration and click Update Manager. Check for updates and install it.
Then click on Application and open Ubuntu Software Center. Search for wvdial and install it.
Open System/Preferences and open Network Connections. Click Mobile Broadband then Add then Forward.
Select country as India then Forward.
Check on I cant find my provider and i wish to enter it manuallyand InProvidertype Reliance and clickForward'.
Type in Selected plan APN as rcomnet without quotes and click Forward and Then click `Apply'.
In Editing Reliance connection 1 check Connect automatically and click `Apply'.
Restart Your computer and plugged in Reliance 3G card.
It will detect it in 30 seconds.
Does it get detected.Does lsusb show you atleast one Huawei device? Did you run modeswtich as root? Why are you trying to set both the default and target product id s SAME? In that case no switch will happen.I too have the Reliance 3G card Huawei EC150. I didn't have any problems.
In Ubuntu 12.04 plugged in the modem and it will detect automatically after few seconds.
Click on network icon on top right side besides volume icon.
Click VPN connections/configure VPN...
In Network Connections. Click Mobile Broadband then Add.
Under Create a connection for this mobile broadband device. Select your device from dropdown. Click continue.
Select your country. Click continue.
Select your provider. Click continue.
Again click continue
Then apply. Then save.
Click on the Connection name under network icon and now connected.

Resources