Sunday 22 November 2015

Connecting Beagle Bone Black with internet



Prerequisites:
Beagle Bone Black and USB cable
A computer with working internet.


Description:

I assume that you have Beagle bone black and a computer with windows 7.Once you start with your Beagle bone black, you find requirement for internet connectivity. Here I want to show How to connect your BBB with your computer’s internet. You can have Internet connection in your computer by Wi-Fi, data cards, LAN or even sharing your smart phone’s internet.

1     Insert your Beagle bone black into USB.

2     Connect it with ssh using ip 192.168.7.2. (I assume you have already installed putty).log in as root.

3     Now let’s try first ping command. We will do ping 198.168.7.1 which is ip of your host pc. It is working.

4     But when you try 8.8.8.8 which is ip of Google’s name server. It will not work.

5     Open control panel -> Network and Internet. Now in search Box type Network, you will find network connection. Or simply follow this path Control Panel\Network and Internet\Network Connections

6     Now Right-click your internet connection, select Properties, select Sharing Tab. Click "Allow other network users to connect through this computer's Internet connection". Select the BeagleBone Black's network connection under "Home networking connection:" Click OK.




1     At this stage if you have any ssh connection in putty you may lose it.

2     Now do this:
3    Right-click the BeagleBone Black's connection, select Properties.
4    Click Internet Protocol Version 4 (TCP/IPv4), Click Properties.
Click "Optain an IP address automatically".
Click "Obtain DNS server address automatically".









1    Click OK. That is all for your Computer.

For BBB:
   Open terminal using putty.
2     Now we will route internet through our window 7 based host PC. & use Google’s DNS server as DNS which is 8.8.8.8. You can search about 8.8.8.8.

route add default gw 192.168.7.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf

3     That’s all. Use ping www.google.com & it will work.


To keep it on Every Startup:

If you don’t want to do this all things on every startup then you can follow following steps.

Use nano /opt/scripts/boot/am335x_evm.sh .

Add these two lines as shown in image and save it.

route add default gw 192.168.7.1
echo "nameserver 8.8.8.8" >> /etc/resolv.conf              
 






That’s all.