BeagleBone is a credit card sized computer used as an embedded development hardware known for its reasonable pricing and flexibility in use. Use of Capes make the BBB more acceptable among hobbyist.
BBB comes with a USB connectivity named USB-Ethernet, by default has 192.168.7.2 as the ip address, which can be used to do Arduino like programming using Cloud9 IDE.
This post is intended to help users to make use of USB networking of BBB to get access to the world of internet by network sharing from the host computer. The main advantage of using this approach is that users can get rid of the need for using long ethernet cables if the router is far away, or only Wifi network is available.
The Debian OS is used for the testing which is obtained from here.
BBB console can be got by using the following command
ssh 192.168.7.2 -l root
In the BBB console type the following
ifconfig usb0 192.168.7.2 route add default gw 192.168.7.1
In the linux console of host system type
sudo su #wlan0 is my internet facing interface, eth5 is the BeagleBone USB connection ifconfig eth5 192.168.7.1 iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE iptables --append FORWARD --in-interface eth5 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward
Incase network not accessible then type the following in BBB terminal
echo "nameserver 220.127.116.11" >> /etc/resolv.conf
Note: Assuming that wlan0 of host system should be shared with USB-Ethernet eth5. User may change these configuration matching to their interface names.
Now the network can be accessed using the BBB….