Below is a short video on getting started with the Beaglebone Black (BBB) using only the USB network adapter. This is a very useful feature of the BBB, as within a typical university network student laptops/tablets/phones have access via WiFi and to get started with a networked embedded system you typically need a wired network connection. Often for security reasons there are restrictions on IP traffic between networks, making getting started over Ethernet very difficult. The alternative is cross-over cables but this can make Internet access difficult. This video looks at how you can set up the BBB to use the USB network adapter under Windows making initial configuration very straightforward and resulting in the BBB having full internet connectivity.
The scripts mentioned in this video and source code examples are listed below:
StartUSBNetwork:
1 2 3 4 5 6 7 8 9 10 | #!/bin/sh echo "Setup script for the EE402 module - Derek Molloy" echo "Setting up the default gateway" /sbin/route add default gw 192.168.7.1 echo "Updating the nameserver entry" echo "nameserver 8.8.8.8" >> /etc/resolv.conf echo "Setting the time using the Irish ntp pool" /usr/bin/ntpdate -b -s -u ie.pool.ntp.org |
The git configuration:
1 2 3 | [http] sslVerify = true sslCAinfo = /etc/ssl/certs/ca-certificates.crt |
And the source code:
1 2 3 4 5 6 | #include<iostream> using namespace std; int main(){ cout << "Hello from the Beaglebone Black (cpp)!" << endl; } |
With the build configuration:
1 2 3 4 | #!/bin/bash echo "EE402 - Building the Test C++ Program on the Beaglebone Black" g++ test.cpp -o test echo "Finished" |
Thanks Derek, another great video. Can we also have some details on how to achieve the same on OSX please.
Getting Mac OS X to share its internet connection with the BBB is very similar to the Windows method Derek shows here. You can enable Internet Sharing in the sharing tab of System Preferences and choose to share the Internet with the BeagleBone’s USB connection. It appears to be straightforward…but, alas, it doesn’t work for me. I can’t get BBB to route through that connection.
did you ever figure this out?
ow do I choose which platform to work on?
Ångström Linux
Android
Ubuntu
Cloud9 IDE
I know C/C++, JAVA lang….but i m ready to learn another if needed
I intend to use OpenCV for real time image processing. I have never used anything other than Windows platform. So guide me accordingly.
I want to build real time OCR project using BBB as processing device…..
ow do I choose which platform to work on?
Ångström Linux
Android
Ubuntu
Cloud9 IDE
I know C/C++, JAVA lang….but i m ready to learn another if needed
I intend to use OpenCV for real time image processing. I have never used anything other than Windows platform. So guide me accordingly.
I want to build real time OCR project using BBB as processing device…..
1. How do i choose which platform to work on? I intend to use OpenCV for real time image processing. I have never used anything other than Windows platform. So guide me accordingly.
2. I have gone through several tutorials, projects on the internet. What I see is the BBB is connected via ethernet/USB to a computer.(I am not talking about the power supply, an adapter will work too). In some projects there is BBB working as the only processing device, no computer is connected. I want the same for my project. Is there any tutorial describing a way how to go about making a project independent of computer? Or I am lacking some basic knowledge on this issue?
3. I find tutorials on based specifically on Beagleboard, Beagleboard xM or Beaglebone. What are general changes/precautions I should take before implementing for Beaglebone Black? Or should I stick to only those tutorials that have information solely for BBB?
Thankyou in advance
Hey Derek,
First of all thanks a lot for all the video series its really helpful
I am a newbie to programming and linux so not able to fix my problem.
I have continuously followed your video and somehow not able to copy startUSBNetwork to my root folder pls help me out. This is the error i am getting :
root@beaglebone:~/ee402/scripts# cp StartUSBNetwork -/
cp: invalid option — ‘/’
Try `cp –help’ for more information.
Also wanted to know how you type half the key works in the terminal and the entire command follows up like the part where you type in “cp StartUSBNetwork”
Sorry for the basic questions.
Thanks in advance.
No problem. It is ~/ (tilde slash) not -/ (minus slash).
Hey Nandan 😛
For autocomplete, press tab 😛
You’re welcome 😀
Thank you very much Derek
I would have given up trying to connect my BBB to internet via USB had i not found video!
Clear explanation . .
Highly appreciated 😀
hi derek i’m a big fan of your job..well done!!
how i can fixed this??
thank you
root@beaglebone:~# ./StartUSBNetwork
Setup script for the EE402 module – Derek Molloy
Setting up the default gateway
route: SIOCADDRT: File exists
Updating the nameserver entry
Setting the time using the Irish ntp pool
Error resolving ie.pool.ntp.org: Name or service not known (-2)
I’m not sure how this happened for you. Try:
ip route list
and then delete the default route… say:
ip route delete XXX.XXX.XXX.XXX/24 dev eth0
and then add:
route add default gw 192.168.7.1
Not sure if that will work for you.
Hi derek, thank you for the detailed explanation.
I am stucked at the point where you ping the computer through 192.168.7.1 . I am not able to figure out what problem is there but I am completely frustrated now as I am not getting reply from anywhere to sort out this problem. Please help.
It is possible that the Windows firewall is blocking your ping. You could temporarily disable the windows firewall to see if it is the problem.
If it is you could add a new rule in order that you can re-enable the firewall. This is what I did before:
Go to: Control Panel -> System and security -> Windows Firewall -> Advanced settings -> Inbound rules -> New rule -> Custom (custom rule)
Press next. In “Protocol and ports” choose protocol type “ICMPv4” then press on “Customize”, then choose “Specific ICMP types”, check the box “echo request” then OK out of the settings. On the previous panel just choose defaults “Any IP address”, press next, “Allow the Connection”, apply the rule to all of Domain, Private and Public, can call it “Beaglebone Ping Rule” and press Finish.
Thanks for the reply, I am now able to access the internet from my laptop on beaglebone. I skipped the step of pinging 192.168.7.1.. I don’t know how but I can ping google.com. I will check my firewall rules now, if it is causing the problem.
Hello Derek, I have followed your instructions about the new firewall rule that you posted on February 3, 2014 at 10:06 pm, and it worked for me. Thanks to you I can ping 192.168.7.1.
Then, I shared my network, and I set up my Local Area Connection to obtain an IP address and DNS server address automatically.
I have also set /sbin/route add default gw 192.168.7.1
However, when I try to ping to 8.8.8.8 it is not working with a 100% packet loss. Anyways, I have continued with the procedure, and I have been able to modify resolv.conf by adding the nameserver 8.8.8.8. Then, I tried to ping http://www.google.com and the output I get is
PING http://www.google.com (74.125.225.244) 56(84) bytes of data. But that is it, so I hit CTRL+C, and again 100% packet loss.
Could you please help me out to solve this problem. I am running a PC with Windows 7, and my beaglebone black says
Linux beaglebone 3.8.13 #1 SMP Wed Sept 4 09:09:31 CEST 2013 armv71 GNU/Linux
Try disabling your Anti-Virus and then, ping 192.168.7.1..it would work
Thank you so much. wasn’t able to ping my 192.168.7.1.
Now, it works all thanks to you.
Hello! I’m doing everything as shown in the video, but after adding the line “nameserver 8.8.8.8” in the file “resolv.conf” when I enter “ping http://www.google.com” as a result “ping: unknown host http://www.google.com“.
Thanks in advance.
Is the ping to 8.8.8.8 working? If so, then I’m not too sure what is going wrong. If not then there is a problem with the share under windows. As a check you should ping from your desktop PC just in case there is a network proxy/rule blocking you from any machine.
Did you ever get this resolved? I’m doing the same adding name server and it says unknown host. I ping 8.8.8.8 and that works but can’t ping Google
If you have a Linux desktop machine you might have some luck with:
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables -A POSTROUTING -t nat -j MASQUERADE
You can ignore the Windows part of the video then.
Another very new Newbie here…Thank you Derek for your great videos.
(Trying to) Using Umbuntu 12.04
If I use sudo to implement the suggested commands for desktop Linux:
dave@ubuntu:~$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
bash: /proc/sys/net/ipv4/ip_forward: Permission denied
File:
-rw-r–r– 1 root root 0 Feb 27 09:32 ip_forward
If I try and change permissions:
dave@ubuntu:/proc/sys/net/ipv4$ sudo chmod ugo-w /proc/sys/net/ipv4/ip_forward
[sudo] password for dave:
chmod: changing permissions of `/proc/sys/net/ipv4/ip_forward’: Operation not permitted
Is there a way to impletment the suggested commands….so even I can understand it?
(Thanks again Derek for all your great work),
Dave
Hi Dave,
I saw that on Debian alright. You seem to have to type “sudo su -” before you can change the ip_forward setting. I’m not sure why. Once you are in root shell you can set the value.
To enable root login under Ubuntu type “sudo passwd root”.
You can remove it again if you wish by typing “sudo passwd -l root”
Derek.
Hi Derek,
I must say your tutorials are great saviors!!
I have a small problem: my BBB is connecting fine and able to ping Google. The problem is when i try to clone your code from github it displays: “unable to connect to github.com: connection timed out”
Hi Nada, Are you behind a university/company firewall? I have seen that being a problem with git before. Are you trying the different calls:
git clone git://github.com… and git clone https://github.com…? The https might work. Derek.
Yes that was it! Thank you
I have a Mac running Snow Leopard that is able to share the Internet connection if I go to System Preferences >> Sharing >> click on Internet Sharing >> check BeagleBoneBlack >> check Internet Sharing. I then run the following script on the Beaglebone Black if I’m running Angstrom:
#!/bin/bash
/sbin/route add default gw 192.168.7.1
echo ‘nameserver 8.8.8.8’ >> /etc/resolv.conf
/usr/bin/ntpdate -b -s -u us.pool.ntp.org
It does not work on Macs running OSX 10.7.5 or Mavericks. However, I am able to ping http://www.google.com and set the date if I run the following on the Mac:
sudo su
ifconfig en3 192.168.7.1 (where en3 is the BeagleBone Black)
sysctl -w net.inet.ip.fw.enable=1
sysctl -w net.inet.ip.forwarding=1
natd -interface en1 (where en1 is the host computer)
ipfw add divert natd ip from any to any via en1
Everything works perfect if I am tethered to my cell phone, but if I use my router I am unable to browse the internet or download the BBIO library from Adafruit via the command line. I have no idea what is going on. Is there a better way of sharing a newer Mac’s Internet connection? I would love to see a detailed video explaining how to do this on a newer Mac.
Hi Derek,
I’m running Windows 8.1, and I’ve followed all of the steps in your video. The output from /etc/resolv.conf ,/sbin/route, ping 192.168.7.1, ping 8.8.8.8, and ping google.com are below. I have turned my firewall off, and my Wi-Fi network connection is shared to my Local Area Connection and the IPv4 settings for the Linux USB Ethernet/RNDIS Gadget are to get the IP address automatically. I’m getting a response from the Beaglebone from the windows command line using ‘ping 192.168.7.2’. Do you have any idea what my problem could be? I’m not sure what else to check.
root@beaglebone:~# cat /etc/resolv.conf
# Generated by Connection Manager
nameserver 127.0.0.1
nameserver 8.8.8.8
root@beaglebone:~# /sbin/route add default gw 192.168.7.1
route: SIOCADDRT: File exists
root@beaglebone:~# ping 192.168.7.1
PING 192.168.7.1 (192.168.7.1) 56(84) bytes of data.
64 bytes from 192.168.7.1: icmp_req=1 ttl=128 time=0.539 ms
64 bytes from 192.168.7.1: icmp_req=2 ttl=128 time=0.543 ms
^C
— 192.168.7.1 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.539/0.541/0.543/0.002 ms
root@beaglebone:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
— 8.8.8.8 ping statistics —
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
root@beaglebone:~# ping google.com
ping: unknown host google.com
Thanks,
Maggie White
Hi Maggie, that looks like the Windows machine is not forwarding the traffic. Leave the BBB setup the way it is and try the unsharing and resharing again. Before you do that try something like git clone git://github.com/derekmolloy/boneCV.git just to make sure that it is not only blocking ping requests. Derek.
I had this same problem. For me, I added 192.168.7.1 as a nameserver to /etc/resolv.conf. Fixed it and can ping 8.8.8.8 and google.com. Good luck
Hi
Just like Maggie above, I have the EXACT same results, except I’m on a Mac OSX 10.7.4
“git” has no results… except cannot find name server. takes 5-10 secs to error out since the additional nameserver line was added.
thx
Hiya Derek,
Wonderful vid, however the git repository appears to be down, or i have made an error. here is my command.
git clone git://github.com/derekmalloy/ee402
I have no firewall and disable all outbound restrictions, so i dont think its that, and ping works just fine. I am getting
”
Cloning into ee402…
fatal: remote error:
Repository not found.
”
Thanks!
i spelled your last name wrong. please disregard question
Hi Derek,
I’m having some trouble: once I ping google.com after editing resolv.conf it still says “unknown host”. This is my first time using Linux, and I’m doing too well. Thanks for any help!
Add the Prof’s script as a systemd service in to have the script execute automatically at boot up:
>>>>>>>
[Unit]
Description=USB NTP initialize
[Service]
Type=idle
ExecStart=/home/root/StartUSBNetwork
[Install]
WantedBy=multi-user.target
<<<<<
(google how to create and enable a systemd service if in doubt)
Great video – thanks!
April 25 2014
1. Control Panel,
2. Change adapter settings,
3-A. Local Area Connection
(Network 2, shared
Intel(R) 82597V Gigabit Network Connection)
&
3-B. Local Area Connection 2
(Unidentified network
Linux USB Ethernet/RNDIS Gadget)
4. When I Right click on (3-A),Local Area Connection Intel 82597V
Then click on Properties,
5. Click on Sharing tag it does not list any network to share with?
From PuTTY 0.63 I can access the BBB
login as root
command line works
/sbin/route add default gw 192.168.7.1
ping 192.168.7.1 (works)
ping 8.8.8.8 (fails)
How do I get
3-A. Local Area Connection
(Network 2, shared
Intel(R) 82597V Gigabit Network Connection)
to see the Linux network?
Hi Igor, On 5. it won’t list any adapters if there is only one possible option but you should still be able to enable sharing. Did you go back and reset the RNDIS settings to use DHCP after they magically change? If you don’t do that then it won’t work. One other thing to check is that firewall software is not blocking outgoing pings. I have seen that before. Derek
Derek, I have been watching your video series on Arduino and now Beaglebone. Your videos are excellent and I thank you for posting them.
Regarding this particular video on the BBB network connection, I was able to follow it and it worked great one time. I now have encountered the situation where my network connection indicates “unidentified network limited no internet access” when I attach the BBB through the USB. I have scoured the internet in search of the solution but cannot solve this one. I’m not entirely certain weather it is a Beaglebone issue or a windows 8 issue.
Like I said earlier your instruction here worked perfectly once so I was hoping you could help.
Thank you
Thanks Joe,
Performing the steps:
/sbin/route add default gw 192.168.7.1
and modifying /etc/network/interfaces and adding the line:
dns-nameservers 8.8.8.8
fixes most USB network problems in the Debian image should work fine. I’ll have to try that again in work as maybe something has changed with the latest image.
Derek.
Derek,
Is this necessary after updating the resolv.conf file the first time. This will add the line each time.
echo “Updating the nameserver entry”
echo “nameserver 8.8.8.8” >> /etc/resolv.conf
By the way, the video was quite helpful.
excellent post.
I have laptop with Windows8.1 with wifi only.
My USB network connection is called as ‘Local Area Connection’. This caused some confusion.
Hi,
I am stuck on the network sharing step in windows. I have a wireless network I want to share with the beagle bone local area connection. I go to sharing and toggle the “Allow other network users to connect through this computer’s internet connection”. I choose the local area network of the beaglebone but get the following error:
An error occurred while Internet Connection Sharing was being enabled.
The specified service does not exist as an installed service..
I have turned off the firewall and don’t understand why this is happening. I cannot share the network due to this. If you have any ideas I would appreciate it.
Thanks
Hi Iman, did you find the solution for the above problem that you just stated. I am also facing the same problem.
What distribution of linux is better to work on BEAGLEBONE black?
Hello,
I just study this board recently.I am a Chinese student .I like this way to learn something even my English is not very good.Mybe you can help me.
Thanks.
Hi,
I have been going through this video series and have found it to be one of the most useful resources for working with the beaglebone. Unfortunately I’ve run into an issue where I no longer have internet access through usb connection to my windows 7 pc using the latest image of debian. I was able to complete this tutorial in the past, but it no longer seems to be working for some reason, and it seems like others have experienced similar issues (maybe Joe above). Essentially, I am able to ping 192.168.7.1. When I try to ping http://www.google.com it returns “unkown host” as expected. After ” /sbin/route add default gw 192.168.7.1 ” however, I am unable to ping 8.8.8.8. Also, if I try to ping http://www.google.com after that step, nothing happens (i.e. “unknown host” no longer appears). “echo “nameserver 8.8.8.8″ >> /etc/resolv.conf” does nothing at this point since I cannot ping 8.8.8.8. When I go to Control Panel>>Network and Internet>>Network and Sharing>>Change adaptor settings>>Local Area Connection properties>>Sharing, checking “Allow other network users to connect” does not produce a drop down menu as in the video. It also doesn’t change my BBB IP settings to static. Adding “dns-nameservers 8.8.8.8″ >> /etc/network/interfaces” results in “network is unreachable” when attempting to ping 8.8.8.8. I also turned off the windows firewall and this had no effect. I’m really reaching the end of my patience here, and google isn’t being very helpful. Any ideas or thoughts you might have would be greatly appreciated.
Thank you,
Brian
Brian, you just described my problem perfectly! Did you ever figure it out?
Same problem here… were you guys able to resolve this?
Hi Derek,
Might you have a Linux equivalent of this video. I’m using ubuntu 13.10.
Many thanks for taking the time to make these videos.
Hi, im trying to clone a bitbucket repository with git clone but its not working
i can ping 8.8.8.8.8 and google and i even trued ping echo bitbucket and everyithing is fine
but when i try de git clone, he ask’s my password and then he shows me this:
root@beaglebone:~# git clone https://stuartlll@bitbucket.org/stuartlll/codigosbbb.git
Cloning into codigosbbb…
Password:
error: while accessing https://stuartlll@bitbucket.org/stuartlll/codigosbbb.git/info/refs
fatal: HTTP request failed
i’ve triedd using git://, http:// https:// and nothing at all like you said to Nada in the comments since i’m using the university network but it didn’t work… any ideas?
ps* the problem is on BBB only, i cloned the repository on my linux and it worked just fine (so university firewall probably isn’t the problem)
Hello, I am a newby to beaglebone. black.
When I connect the USB, I do see the LED lights turn on but after couple seconds, all of them are off.
I couldn’t see the “massive drive” on my Windows 7 either. (I have already installed those drivers.)
How could I start the beaglebone black?
I have had the same problem that all packets are lost when pinging 8.8.8.8 whilst pinging the host can be done without problem. As Derek suggested, I unshared and reshared the network from the host again and it works.
I’m wondering if you know if there is a way to “daisy-chain” 2 beaglebone black boards though the USB ports. So one of them would only need to use the existing mini-usb for networking, but the other would use it’s full-sized usb connected to the second to the mini.
Node 1 –MiniUSB -> PC
L USB Full -> MiniUSB on Node 2
So I guess I need to know if there is a way to run the RNDIS on the full-sized USB to allow it to talk to a second beagleboard.
The linux drivers included on the beagleboard only are the FTDI-Serial, and I don’t see anything for accessing the board as a network connection with IP address.
I have a project that has 2 processor hogging processes, I would like to have the core process running on node 2, and the communication to the outside world running on node 1. The application already has intra-networking capabilities built-in, I just need to see if there is a way for me to do it with the hardware.
Hey derek i followed your steps and everything was easily done.I want to repeat the same in linux ubuntu 14.04 .What needs to be done to connect the board in ubuntu ?
Hi Derek,
On a Windows 8 machine it doesn’t allow to choose what connection to share when sharing a WiFi connection. Anyways, after sharing the internet connection I can no longer browse internet on my machine, and pinging 8.8.8.8 on the BBB is giving me a Request Timed Out. How do I resolve it?
Nevermind that. Fixed it. Seems like a Windows 8 bug. Have to fiddle with. Unsharing/resharing, rebooting, etc worked. Thanks
Hi,
I using office laptop, when i tried to activate internet sharing option this message is there “internet sharing is disabled by network”. Is there any otherway to do it.
Thanks,
Dinesh
Hi, Mr. Derek,
When I ping 8.8.8.8, there’s a 100% packet loss. I’ve shared the ethernet connection to the beaglebone. I’ve set the inbound rules in firewall and I can ping 192.168.7.1. But when I ping 8.8.8.8, nothing comes out. I’d really appreciate if you can help me out, sir.
Have a good day.
Unfortunately ping is restricted by many networks for security reasons — maybe try using git clone or wget to test the network.
Hi @Derek
Noticed there hasn’t been a clear answer posted yet regarding OS X Yosemite connection sharing with the BBB. Yosemite replaced natd and ipfw with a combined BSD utility called pf and it appears to have changed connection sharing behavior as a result. Yosemite’s Internet Sharing uses 192.188.2.0/24 by default, so even if you add the default route to 192.168.7.1 the connection sharing won’t work, and the behavior shown in Jason Kridner’s BBB OS X youtube video is different.
What I’ve found to work is for an OS X Yosemite user is to either change the BBB’s IP to a 192.168.2.X address or modify their OS X connection sharing config using pfctl. more info and links on stackoverflow here: http://stackoverflow.com/a/30581692/4504428?stw=2
Hi Derek,
I want to Accessing Internet from am335x based on custom board using USB Tethering of Android phone Not Working
I wanted to access internet from am335xx custom board(Reference of beaglebone black), Use USB-tethering option of my smartphone and Using this option I wanted to explore for connecting to internet on board.On am335xx board have configure USB0(OTG) mini USB as master(HOST device) or slave device.
USB0 controller configured as host and it can be used to connect to the phone(slave mode) using usb cable. I was using 3.12 kernel(sdk 7),could you please tell what are the drivers required for usb tethering network connection for our board.
Thanks & regards
N Shankar
Hi there. I have not tried that so I don’t know. You may need a rooted phone to configure it to allow IP forwarding. Kind regards, Derek.
Thank you for your reply,
I tried on beaglebone black also but I am unable get it so please tell me Is it possible on beaglebone black below scenario I am trying to use RNDIS host function on my beaglebone black device, using either usb0 port or usb1 port,so i can use android phone to browse my device’s WebUI with usb cable plug in and kernel version 3.12 (sdk 7)
if i plug my android phone into my beagle bone device(host mode usb1 port) and set phone’s usb tethering fuction on, my device can find it.But usb0 network device never show up.
Thanks & Regards
N Shankar
Hello Derek,
Excellent video. Made my life really easy. Normally in office network new mac address is not registered so cannot get static IP through internet directly.
This video which is simple, straight and without loopholes made my life very easy.
Great work. Once again thanks a lot.
Thanks and regards,
Anand Vaidya
Maven Systems Pvt. Ltd
Hi Derek!
I have been following your excellent video and getting the following results working with Windows 8.1.
1. Ping 192.168.7.1 works OK
2. Ping 8.8.8.8 works most of the time; when it does not work (after a time delay) it shows PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data and hangs and has to be shut down by ctrl c and then it works again.
3. ping http://www.google.com will always hang showing no response.
Any suggestions?
Hi there, no I haven’t seen that before. Ping is not the best test anymore as so many services are restricting its use. It could be virus/malware detection software on your desktop. It might be a typo in your message, but you should not prefix with http:// when you ping, just use the site name, as the service is not required. Kind regards, Derek.
Same problem here, did you by any chance solve it already?
Thanks in advance.
Thank you so much. This video was clear, completely informative, and amiable. I’m very grateful.
Hello, thanks but the tutorial but I’m facing issue, I’m not even able to ping back to my PC at 192.168.7.1, 100% packet loss.. Can you help me?
Hi Derek, i’ve read the coments here, but i haven’t found a solution for me. My problems is that i need use the BBB i’m my university, but now we don’t need to change the proxy to have the acces, but is needed to login with a username and password, in the RPi i change proxy and put this authentication on /etc/apt/apt.conf.d, but how should i do in BBB ? Sorry for my english i’m from Brazil. Tks
Hi Derek,
Amazing video by the way.I try connect to the network from my laptop to BBB over usb in ubuntu platform but the issues was same with other people above.Here what i get :
root@beaglebone:/etc# nano resolv.conf
root@beaglebone:/etc# cd
root@beaglebone:~# /sbin/route add default gw 192.168.7.1
root@beaglebone:~# ping 192.168.7.1
PING 192.168.7.1 (192.168.7.1) 56(84) bytes of data.
64 bytes from 192.168.7.1: icmp_req=1 ttl=64 time=0.350 ms
64 bytes from 192.168.7.1: icmp_req=2 ttl=64 time=0.388 ms
64 bytes from 192.168.7.1: icmp_req=3 ttl=64 time=0.364 ms
64 bytes from 192.168.7.1: icmp_req=4 ttl=64 time=0.441 ms
^C
— 192.168.7.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 0.350/0.385/0.441/0.042 ms
root@beaglebone:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
— 8.8.8.8 ping statistics —
25 packets transmitted, 0 received, 100% packet loss, time 24008ms
root@beaglebone:~# git clone git://github.com/derekmolloy/boneCV.git
Cloning into ‘boneCV’…
fatal: unable to connect to github.com:
github.com: Name or service not known
root@beaglebone:~# ip route list
192.168.7.0/30 dev usb0 proto kernel scope link src 192.168.7.2
root@beaglebone:~# ip route delete 192.168.7.2/24 dev eth0
RTNETLINK answers: Invalid argument
root@beaglebone:~# ip route delete 192.168.7.2/24 dev usb0
RTNETLINK answers: Invalid argument
At the tray icon on my ubuntu,when i click the wifi icon i see this :
Ethernet Network (Circuitco BeagleBoneBlack)
Beaglebone
Disconnect
Ethernet Network (Realtek,……………)
Beaglebone
Disconnect
Is that okay ? If i’m not wrong when i first time connecting my BBB to my laptop the connection is “Wired Connection (Circuitco BeagleBoneBlack)”
Re: Picochip. Your iptables “filter” table may have “FORWARD” set to “DROP” in your default setup, thereby dropping packets that you want to be sent through. You may want to try this from your host computer (the last line is an addition to the commands Derek suggested earlier in this thread)
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -A POSTROUTING -t nat -j MASQUERADE
# iptables -P FORWARD ACCEPT
Hi Derek,
I am following along in your book to learn about embedded linux so I can start using it with my electronics projects. I am currently stuck on page 43 in the grey box about Internet over USB Settings. I am using a MAC 10.8.4. I am at the step where I ping 8.8.8.8.
This is what i get
root@beaglebone:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.7.1 icmp_seq=1 Destination Host Unreachable
It then continues for more icmp_seq=2,3,4,…
I tried messing with the sharing settings but nothing worked. I tried searching the problem but a lot of solutions go way over my head. I hope you can provide a simple way of explaining a solution. BTW love your book. I love how it mergers hardware, software, and electronics all together. It everything I want to learn in one book. Thanks in advanced.
Hi Derek,
I have been watching your videos since along time and all are excellent. Only this time i have faced one problem. i just followed this video wireless USB network adapter. i successfully connect beagle bone to internet but when i reboot the beagle system and i opened putty terminal with 192.168.7.2, it is giving network connection error.
How to connect my putty terminal to beagle bone again? Please help me out?
Hi Derek,
After putting /sbin/route add default gw 192.168.7.1 I am getting -bash: /sbin/route: No such file or directory. Please help.
Thank You.
Hi Derek,
Your video is very helpful. After following all the steps in the video, I am getting stuck after /sbin/route add default gw 192.168.7.1 as I am getting the following output please guide what should be done.
root@beaglebone:~# /sbin/route add default gw 192.168.7.1
-bash: /sbin/route: No such file or directory
try this command:
sudo /sbin/route add default gw 192.168.7.1
for more details see this link
http://ofitselfso.com/BeagleNotes/HowToConnectBeagleboneBlackToTheInternetViaUSB.php
Best regards
Hi Derek,
I was trying to update some libraries on my BBB and I typed this command:
dpkg -i -auto-deconfigure
The system warned me about warming the OS and I confirmed typing:
Yes, do what I say!
Not expecting that it should damage the eMMC, now I can only boot from SDcard.
Hope you can give me any tip.
Thanks in advance.
Paulo Ranzani
Hi Paulo, you should be able to flash the eMMC again. I don’t think you could do any physical damage with that call. Download the flasher image (make sure it is the flasher image) from beagleboard.org and use it to flash the board. Kind regards, Derek.
TRENDnet’s portable USB 3.0 to Gigabit Ethernet Adapter , type TU3-ETG , shortly puts a Gigabit Ethernet slot to a Windows as well as Mac PC . A high Speed USB 3 .0 slot backing Whole Duplex two Gbps data pass on speeds. The TU3-ETG is appropriate with previous USB 2.0 as well as 1.1 jacks.
thanks
what to do if my host PC is Ubuntu ?
please resolve out AM335x USB driver problem and my laptop keeps on detecting and not detecting the BB Black alternatively.
I teach a course on the Raspberry Pi. With Raspian, all we have to do is change the cmdline.txt file and add something like ip=169.254.0.2 to set it to a fixed IP address. Then we plug it into a PC via any USB to Ethernet adapter. Now we can use any SSH, VNC, RDA connection to that address. Very simple, and with RDA on every windows computer in our college a pretty elegant solution to accessing the RPi anywhere. On the BBB side I have loaded up Debian 7.9 on the SD card but I am at a loss how to set up a similar environment to the RPi, and in the Debian world on the BBB I don’t even have the 192.168.7.2 access, which only seems to work with Angstrom. Angstrom is just not main-stream enough for my liking. So I’ll continue to work through the above to see if I can get things working in Debian, but any help would be appreciated.
Hello Derek, I’m Brazilian.
Thank you for this tutorial…
I am getting problem in USB connectivity of BBB with my laptop. The BBB is not recognized on my laptop.pls suggest me something i am new in this.
extremely sorry for such a silly doubt.
Thanks in advance.
Hi Derek, (and others)
I’m running Stretch/testing. I can ssh into the BeagleBone no problem but no matter what I do, I cannot ping the outside world. On the Debian (laptop) side I tried:
$ echo 1 > /proc/sys/net/ipv4/ip_forward
$ iptables -A POSTROUTING -t nat -j MASQUERADE
And on the BBB side I have run:
/sbin/route add default gw 192.168.7.1
And in /etc/resolv.conf I’ve added the line nameserver 8.8.8.8
The first problem I’m coming up with is that when I restart the BBB… that line vanishes. It is not persistent between restarts (I’m sure it’s getting written though as after saving and quitting nano, more /etc/resolv.conf reflects the changes).
I don’t think the network topology of Stretch changes anything radical. Any ideas how to accomplish this? From what I gather from the video, you’re essentially creating a bridge. I tried these instructions along with your instructions for the BBB side but I’m still not getting anywhere.
http://ask.xmodulo.com/configure-linux-bridge-network-manager-ubuntu.html
Cheers, Joe
Just a short note… on my Beaglebone Black, “/usr/bin/ntpdate” didn’t work for me… it was in sbin: “/usr/bin/ntpdate”
Thanks for the book, tutorials and videos!
-mark.
Hi Sir,
I saw your video above, it was helpful and excellent. I’m able to follow it step by step, it’s my first time on Beaglebone Black so I follow the guidelines you gave, it was okay until the part where you mention to ping http://www.google.com after adding nameserver 8.8.8.8 in root@beaglebone:/etc# nano resolv.conf. It says here :
root@beaglebone:~# ping http://www.google.com
ping: unknown host http://www.google.com
I have already shared my internet connections like what you have mentioned above, turn off my firewall, I’m able to ping 192.168.7.1 it was okay. I ping 192.168.7.2 it was also ok. I can ping 8.8.8.8 it came out ok.
Do you have any idea why?
Mind giving any suggestion?
Thank You.
Best Regards,
Rosliana Nas
i tried all the steps but i am getting these errors.Plz help me out..i am unable to procced in my project.
ping http://www.google.com
ping: unknown host http://www.google.com
debian@beaglebone:~$ /sbin/route add default gw 192.168.7.1
SIOCADDRT: Operation not permitted
debian@beaglebone:~$ ip route list
default via 172.16.92.1 dev eth0
172.16.92.0/22 dev eth0 proto kernel scope link src 172.16.95.180
192.168.7.0/30 dev usb0 proto kernel scope link src 192.168.7.2
debian@beaglebone:~$ route add default gw 192.168.7.1
SIOCADDRT: Operation not permitted
debian@beaglebone:~$ ip route delete 172.16.92.0/22 dev eth0
RTNETLINK answers: Operation not permitted
Hello Derek,
I want update the date and time in my beaglebone but /usr/bin/ntpupdate binary is not present in my system.
uname -a ( output)
Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux
.
Can you help me what needs to be done?
Thanks,
Monojit
Hi,
Thank you for this video. It has been very helpful. My BBB was purchased a couple of months ago and is using Debian 7.4 (Wheezy). Apparently ntpdate is not part of the distribution so the StartUSBNetwork script fails that step. Using get-apt I can install ntpdate but am reluctant to try it with out some validation and comments on any side effects from an expert.
Hi,
can anyone provide me block driver video series.
thnks in advance
Hello Derek,
First, your book is very helpful in understanding the BBB at a professional level.
I have configured the BBB as a WiFi AP using a D-Link DWA-123 (rtl8188eu) dongle. There is a serious issue of the ‘babble’ interrupt occurring and freezing the BBB when more than one client connects.
Any comments on the same would be appreciated.
Thank you.