Sharing a Windows 7 wifi connection with a Raspberry PI

2

I have a Windows 7 PC that is using a Wireless network connection that I want to share on the PI. I have a working CAT 5 cable that I am using to connect the Win 7 PC to the PI. I have configured the Windows 7 PC to share the network, Windows states: Unidentified network shared.

However on the PI I get nothing, I've tried several IP based commands and I can't seem to identify anything.

I had it working from a direct cable before, but now I'm using the cable from the PC I cant seem to get it to work.

I have followed the commands on the R.Pi site, but anything I try doesn't seem to work.

I'm using Raspbian “Wheezy”.

Welsh King

Posted 2012-12-08T23:57:10.600

Reputation: 121

Apparently the NIC on the R-Pi is auto-sensing. So plain/cross cables should not be the problem here. Might want to add that to the post before you get people asking you to try it with a cross cable. Also, does the Pi detect link? Does the PC detect it? What happens if you plug either end of the cable in a switch, does the link come up (if not, faulty cable, not faulty type but broken). – Hennes – 2012-12-09T00:04:40.977

hi ive started trying 'sudo /etc/init.d/networking stop|start and its now saying "DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6, it tries this several times and then drops out with No DHCPOFFERS recieved. Unable to obtain a lease on first try. Exiting. Failed to bring up eth0. – Welsh King – 2012-12-09T00:21:46.313

DHCP on Windows 7 is turned on – Welsh King – 2012-12-09T00:28:00.680

What happens if you set up a static route (pi: ifconfig eth0 172.16.1.1 netmask 255.255.255.0, windows same with 172.16.1.2, set up routes (in case those do not get set automatically) and try to ping the other? That should allow ping. – Hennes – 2012-12-09T00:36:54.833

ive just tried something simlar setting both to be the same. The network service starts, but nothing works, when i do a ping it just sits there. – Welsh King – 2012-12-09T00:41:33.217

Answers

0

On Windows 10 (which seems to have all the same network features):

  1. Right-click the WiFi icon on the taskbar.
  2. Open Network and sharing center.
  3. Select Change adapter settings on the left.
  4. Right-click the adapter you want to use and select Properties.
  5. Click Sharing.
  6. Click Allow other users to connect through this computer's internet connection.
  7. If necessary, select your ethernet port.

I use this when I need to configure a new install on my Raspberry Pi. It works like a charm. Plus the Pi does not need a crossover cable, as it configures that automatically.

user173724

Posted 2012-12-08T23:57:10.600

Reputation: 408

0

The simplest solution would be to just enable ICS, but that does not seem to work with Win7 Starter Edition or if the NIC of the wireless adapter does not have any "share" option (perhaps caused by the network adapter driver).
Another way is to bridge the wireless and the wired connections by selecting them both and then just selecting the appropriate option from the context menu.
Or you could use e.g. Connectify to accomplish what you want, but that requires a software installation.

mousio

Posted 2012-12-08T23:57:10.600

Reputation: 771

im using ICS on Windows 7 Premium, but when i use it it says it cant find DHCP "DHCPDISCOVER on eth0 to 255.255.255.255 port 67" Cant bridge the connection as it requires 2 lan connections. – Welsh King – 2012-12-09T15:01:57.153