-
Notifications
You must be signed in to change notification settings - Fork 6
Connecting a BeagleBone to the internet
- On your computer, open up the network adapter settings page from Control Panel (NOT the windows setting app)
- Power on the BeagleBone and connect to your computer
- On your computer, note the new device listed in the adapter settings page. This is the BeagleBone's network adapter
- On the computer, edit your current network device's (Ethernet/Wifi) properties
- Under sharing, check "Allow other users to connect through this computers..."
- If already checked, uncheck. Choose the BeagleBone from the dropdown (under "Home networking connection")
- Select the BeagleBone network adapter from dropdown
- Under sharing, check "Allow other users to connect through this computers..."
- On your computer, edit the BeagleBone's network adapter properties
- Under Networking, scroll to "Internet Protocol Version 4 (TCP/IPv4)" and select it. Enter its properties
- Select "Use the following IP address". Changer the IP address to
192.168.7.1
- Select "Use the following DNS server addresses". Change the Preferred DNS to
1.1.1.1
- Select "Use the following IP address". Changer the IP address to
- Under Networking, scroll to "Internet Protocol Version 4 (TCP/IPv4)" and select it. Enter its properties
- SSH into the BeagleBone using your SSH client of choice
- IP should be
192.168.7.2
, user is default todebian
and password should betemppwd
. If192.168.7.1
doesn't work, try192.168.6.1
. If that doesn't work ask for help.
- IP should be
- On the BeagleBone, type
$ sudo ifconfig usb0 192.168.7.2
$ sudo route add default gw 192.168.7.1
- On the BeagleBone try
$ ping 1.1.1.1
. If this doesn't work, return to step 1, or ask for help. - Now add the DNS server to the BeagleBone
- Open
/etc/resolv.conf
in your favorite editor with sudo and add innameserver 1.1.1.1
sudo nano /etc/resolv.conf
sudo vim /etc/resolv.conf
- On the BeagleBone try
$ ping google.com
. If this doesn't work, return to step 1, or ask for help.
-
Open terminal
-
Type:
$ sudo su
- Be careful of this command in general, it will run everything you do as administrator, for this tutorial you won't be doing anything destructive so it shouldn't cause any issues, but in general try to avoid using this
-
Type:
$ ifconfig
to list all current network devices, look for your current active internet connection's name- The WiFi connection's name will typically start with
wl
. - The ethernet connection's name will typically start with
en
oreth
. - A loopback connection's name will start with lo. This is not the connection you want
- The current active connection should have an IP address assigned.
- The current active connection's IP address should not start with
127.0.0
- The WiFi connection's name will typically start with
-
Enter
$ internet=[active internet connection name]
(note - no spaces) -
Power on the BeagleBone and connect it to your computer
-
On your computer, type
$ ifconfig
again, you will see two more network interfaces.- Look for the BeagleBone's connection in the list, it will probably have an IP of
192.168.7.1
- Highlight and right click copy the name of the interface
- Look for the BeagleBone's connection in the list, it will probably have an IP of
-
Enter
$ bbbnet=[rightclick to paste the name of interface]
(note - no spaces) -
Copy and paste the following command, it assumes you are still in
sudo su
$ ifconfig $bbbnet 192.168.7.1 && iptables --table nat --append POSTROUTING --out-interface $internet -j MASQUERADE && iptables --append FORWARD --in-interface $bbbnet -j ACCEPT && echo 1 > /proc/sys/net/ipv4/ip_forward && exit
-
If anything up to this point has failed, reboot your computer and try again from step 1
-
SSH into the BeagleBone in a new terminal using
$ ssh [email protected]
with a password oftemppwd
- If
192.168.7.1
doesn't work you can try192.168.6.1
if that doesn't work check$ ifconfig
for the IP, or ask for help
- If
-
On the BeagleBone, enter
$ sudo ifconfig usb0 192.168.7.2
$ sudo route add default gw 192.168.7.1
-
On the BeagleBone try
$ ping 1.1.1.1
. If this doesn't work, return to step 1, or ask for help. -
Now add the DNS server to the BeagleBone
$ sudo vi /etc/resolv.conf
- press i to get into insert mode
- type
nameserver 1.1.1.1
- press ESC
:wq
-
On the BeagleBone try
$ ping google.com
. If this doesn't work, return to step 1, or ask for help.