machv5
Posts: 3
Joined: Mon Nov 18, 2013 2:36 am

How do I use my laptop Wifi for my pi over ethernet?

Mon Nov 18, 2013 2:47 am

I have WiFi on my laptop and only Ethernet for a connection on my Pi. I want to use ICS (Internet Connection Sharing) on my laptop so that I can connect to the Internet.

My situation:
I can't use the TV in the living room where I could connect the Ethernet cable to the cable box. I don't have a WiFi adapter for the Pi so I am left with ICS but I keep getting the error that the automatic IP address is in use and the fixes that I have read are very complex sets of instructions which I am unable to make heads nor tails of and I fix laptops and mobile devices for a living I am not a networking specialist.

What I need:
So I need a simple (if that's possible) solution to be able to either bridge (without having two WiFi adapters, which would make this point mute) the wired and WiFi together or some way of sharing my WiFi with ethernet. Can someone help me with this?

Thanks

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Nov 18, 2013 9:39 pm

Windows Internet Connection Sharing by default uses IP address 192.168.0.1 and the connected device 192.168.0.2 and the Netmask is 255.255.255.0

Therefore you have 3 choices:

Change the IP Address/Netmask of your WiFi Router

Purchase a USB WiFi Dongle

Ethernet Cables can be had in lengths up to 100mtrs
Pi Forum Search and Google yields answers to many questions

machv5
Posts: 3
Joined: Mon Nov 18, 2013 2:36 am

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Nov 18, 2013 10:12 pm

Thank you. I appreciate the quick answer. Even though I pulled somewhat of a noob move rather than newb.

I Normally search more than ask in forums. I was busy today and just wanted a minimal effort answer on all fronts including not searching to see if the question had been answered already. Thanks again

machv5
Posts: 3
Joined: Mon Nov 18, 2013 2:36 am

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Nov 18, 2013 10:14 pm

I will write down the steps I used to fix the problem later this afternoon so others can benefit. (If I don't please give me a nudge to do so. I am forgetful sometimes) :shock:

User avatar
DougieLawson
Posts: 39539
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Nov 18, 2013 10:25 pm

Connect the Pi with a cable.
Enable Windows bridging between the ethernet and WiFi on your laptop.
Control panel --> Network & Sharing --> Adapter settings
Click on the ethernet AND wifi adapters then right click and select "bridge connections". Enter your admin password when prompted.

On the Pi enter the following commands:
sudo ifconfig eth0 up
sudo ifconfig eth0 169.254.82.80 mask 255.255.0.0

You can pick any address from range 169.254.0.1 to 169.254.255.254 (so I'll pick 169.254.82.80 (ascii dec 82 == 'R' dec 80 == 'P')). The windows system will pick one at random that isn't in use by the other end of the cable.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

undecided
Posts: 7
Joined: Mon Mar 17, 2014 2:47 pm

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Mar 17, 2014 3:08 pm

i tried putting in the two lines of command as you posted them....but it sent back

mask: Host name lookup failure


any thoughts?

undecided
Posts: 7
Joined: Mon Mar 17, 2014 2:47 pm

Re: How do I use my laptop Wifi for my pi over ethernet?

Mon Mar 17, 2014 3:46 pm

nothing seems to be working...

maybe the numbers are something that i have to lookup to be specific to my devices?

also, went here http://www.raspberrypi.org/forum/viewto ... 91&t=39538 and changed this


issued the command: sudo nano /etc/network/interfaces

edit the line that is "iface eth0 inet dhcp" and replace dhcp with the word static

press return for the next line and type the following. After each line press return. Note:- where there is the "[tab]", don't type the word "[tab]", just press the tab key. Also note that the IP address used are all for a class C (if memory serves me right) network and the laptop has to be on the same subnet (i.e. 192.168.0.x) to work, as well as the router. Normally the router has address 192.168.0.1, but I have seen them use 192.168.1.1. Obviously the address line is the IP address of the Pi and has to be unique on the network; as they all have to be for each individual computer/interface. Here it is then:

[tab] address 192.168.0.100
[tab] netmask 255.255.255.0
[tab] gateway 192.168.0.1

to save press Ctrl and o then return, then exit by pressing ctrl and x.

Return to “Troubleshooting”