Getting Internet Connection



Command line method to check whether you have Internet conenction:

ping google.com


 Methods:

Ethernet

Connect the Ethernet port with an Ethenet cable to a router. The rest happens automatically

Share Internet connection of the PC through USB

https://elementztechblog.wordpress.com/2014/12/22/sharing-internet-using-network-over-usb-in-beaglebone-black/

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 -i
#wlan1 is my internet facing interface, eth3 is the BeagleBone USB connection
ifconfig eth3 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface wlan1 -j MASQUERADE
iptables --append FORWARD --in-interface eth3 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

In case network not accessible then type the following in BBB terminal

echo "nameserver 8.8.8.8" >> /etc/resolv.conf

Note: Assuming that wlan1 of host system should be shared with USB-Ethernet eth3. User may change these configuration matching to their interface names.

Now the network can be accessed using the BBB….


Android Phone USB Tethering

Connect the Android phone to the USB port on the beaglebone.

On the Android phone, enagble USB tethering.
Then ssh into the beaglebone and run

dhclient usb1

USB Wifi Stick









No comments:

Post a Comment