Thursday, June 20, 2013

Windows 7 Internet Sharing for BeagleBone Black

I wish I better understood WHY this was necessary.  

At one point my BBB "just worked".  When it was plugged into my desktop computer via USB (Windows 7 machine) the BBB had internet connectivity just fine.  After working to solve other issues it stopped.  In any case, it works again with the following steps:

On the Windows 7 computer:

  •     Control Panel -> Network and Internet -> Network Connections
  •     Right-click your internet connection, Properties, Sharing Tab
  •     Click "Allow other network users to connect thru this computer's Internet connection"
  •     Select the BeagleBone Black's network connection under "Home networking connection:"
  •     Click OK.

    Here's the trick:  when I did this, Windows assigned a static IP to the BBB connection.  Why?  No idea.  
    You have to go back to that connection and reset it to DHCP.

  •     Control Panel -> Network and Internet -> Network Connections
  •     Right-click the BeagleBone Black's connection, Properties
  •     Click Internet Protocol Version 4 (TCP/IPv4), Click Properties
  •     Click "Optain an IP address automatically"
  •     Click "Obtain DNS server address automatically"
  •     Click OK.  Click CLOSE.

On the BBB:

This makes the BBB route internet traffic thru the host (Windows 7 in this case) and DNS thru Google's DNS Servers (  

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

Try It:


Make it Persistant:

To make this "stick" after a reboot of the BBB, you need to add these commands to the ethernet startup script on the BBB (/usr/bin/  

NOTE:   You CANNOT simply add these commands to the bottom of that script file.  They must go  before the udhcpd starts.  It does not return control to the script so adding them at the bottom of the file does nothing for you.  My script file now looks like this:

    /sbin/ifconfig usb0 netmask
    /sbin/route add default gw
    echo 'nameserver' >> /etc/resolv.conf

    /usr/sbin/udhcpd -f -S /etc/udhcpd.conf


A big thanks to who got me moving in the right direction.  Read his description of the parallel steps for a Linux host!



  1. Amazing!!! I was stuck with this for a long time! Thanks a ton for sharing this!!!

  2. Can we do this on Windows vista.?
    I have USB 3G connection & Vista / Ubuntu 12. Please post procedure to share connection in either OS.

    1. I am sorry but I do not have nor do I know Windows Vista.

  3. This comment has been removed by the author.

  4. THANK YOU!! I looked everywhere to get this to work, I tried bridging the connections, but that flopped. I didn't think of doing it this way. Thanks for saving me hours of trolling through the internet!

  5. this worked fine for angstrom but it didn't work for ubuntu 13.10 . please help !!

  6. Hi, I'm running Ubuntu in my BBB and there is no /usr/bin/ in Ubuntu, could you help me?

    1. I'm running Debian on my BBB and I didn't find the /usr/bin/ file either. I was able to get it to work by editing the /opt/scripts/boot/ file.

      Look for the following lines towards the bottom of that file:

      /sbin/ifconfig usb0 netmask
      /usr/sbin/udhcpd -S /etc/udhcpd.conf

      Immediately after those lines, add the following line:

      /sbin/route add default gw

      That worked for me.

  7. Ita a really a nice blog. This blog help you for solve your windows 7 related problem ,and its fix you error . please visit this link .
    windows 7 problems
    Thank you
    Aalia lyon

  8. Just tried this on a bbb running ubuntu 13.04 linked to a win7 pc. Works great. Many thanks!

  9. Interesting blog. This is one of my favorite blog also I want you to update more post like this. Thanks for sharing this article.
    Internet Center in Chennai

  10. Really Nice Information,Thank You Very Much For Sharing.Wordpress Development Company

  11. Discovered this little type and was easy to solve, Otherwise thanks a lot for the post, just hope it really sticks because I don't have time to do this all the time.

    root@beaglebone:~# /usr/sbin/udhcpd -f -s /etc/udhcpd.conf
    /usr/sbin/udhcpd: invalid option -- 's'
    BusyBox v1.20.2 (2013-04-03 21:07:04 CEST) multi-call binary.

    Usage: udhcpd [-fS] [CONFFILE]

    root@beaglebone:~# /usr/sbin/udhcpd -fS /etc/udhcpd.conf
    udhcpd (v1.20.2) started

  12. I want to thank Sara here, she has won my business and I'll be posting my experience to you and others.
    My old computer crashed days ago. I had to buy a new computer. It costed me much.
    My budget was not much. To purchase a windows 7 product key from MS was not enough. Then I went to Tomshardware, and one guy recommended to me. Their price did attract me. So I decided to try after several emails to Sara. She was very patient and answered clearly to all my questions. I receved the key immediately after I sent 35 bucks. It worked perfectly. I was very very satisfied.
    I'll be buying from from now on as well.

  13. Bonjour à tous ! sur mon site vous trouverez des codes Free Wifi privé et qui ne ce désactive jamais ou du moin pour longtemps !

    ︻̷̿┻̿═━一 Code Wifi Orange

  14. Bonjour, à tous j'offre et partage des codes Free Wifi Code Orange et SFR chaque semaine pour vous connecté a internet dans toutes la france

    Mon site de partage ▄︻̷̿┻̿═━一

    internet gratuit wifi code

  15. Bonjour, à tous j'offre et partage des codes Free Wifi Code Orange et SFR chaque semaine pour vous connecté a internet dans toutes la france

    Mon site de partage ▄︻̷̿┻̿═━一

    piratage wifi gratuit

  16. I just got a product key from it worked perfectly. I'm so excited to share my experience here.their customer service is 1st class and I will definitely be recommending the site and I will be using the site again.

  17. technogics sorgt für beste Qualität und Web-Entwicklung Dienstleistungen in Deutschland. Wir bieten derzeit Web und mobile Anwendung Entwicklungsdienstleistungen in Deutschland.


  18. I got windows 7 ultimate sp1 shop for my Sony Vaio Pcg-r505elkit laptop from about 17 weeks ago, you could try.

    Software arrived fast & exactly what I ordered and I saved $30 compared to everywhere else! sharepoint server 2010 enterprise key windows 8 key would buy again from. This was the third time I have purchased something from them and they have quickly become the first first place I look for buying what I need! Provided a shipping number that never worked in shipper's database. Shipment arrived later than predicted date. When I queried about the shipment, I received two e-mails, one saying it shipped via USPS (wrong), and DHL (right). They had what I needed at a good price. The purchase went smoothly and the delivery worked as promised (eMail & download). The product installed and works as expected. This is about as good as anyone could expect from a Vendor. 2VlV1

  19. Schöner Artikel. Ich denke, es ist sinnvoll und einzigartige Artikel ist. Ich liebe diese Art von Artikel und diese Art von Blog. Ich habe es sehr genossen. Vielen Dank für Ihre Website. Es wird für Webentwicklung Hannover .