Saturday, 30 July 2016

Sharing PC Internet to Beaglebone over LAN


Want to access internet on your Beaglebone via LAN, but don't have LAN port nearby?

Well you have a LAN port near by and that is your PC's Ethernet port (of course If it is free , meaning you are accessing internet on your PC via WiFi)




Microsoft has a functionality called Internet Connection Sharing (ICS) that is made just for this purpose.
We will be using Windows 7, but earlier versions are similar.  Be sure your Windows 7 computer is already connected to the Internet via wireless before you start.



Click the Windows icon and type "view network connections", hit "Enter" on your keyboard





Right-click on the icon that represents your wireless connection to the internet, then click on "Properties" 




Go to the "Sharing" tab and check the top box, then choose "Local Area Connection" from the drop down below. Don't check the second box. 



Press Settings and select all services required on your Beaglebone and press OK

When everything is ready to go you will see the word "Shared" under your wireless connection to the Internet. Its sharing with your computers Ethernet port. 

Now Restart your Beaglebone and it will dynamically get an IP address and access to internet via Ethernet.  

Now how would you know the IP address of beaglebone's Ethernet port?

That's just simple: As you already connected to the Beaglebone through USB (if not please connect), Open terminal on your Linux PC, and type 

sudo ssh 192.168.7.2

192.168.7.2 is the IP address of beagle bone black and is hard coded so its same for all BBB.

Now the terminal will ask you for the password, Please enter your password. This makes you enter into the BBB's terminal. Now type 

ifconfig

This will give you Ethernet address of your BBB Ethernet port, which is written against eth0