Chapter 2: The BeagleBone Black Software

Chapter 2: The Beagle Board Software

/Chapter 2: The Beagle Board Software
Chapter 2: The Beagle Board Software2019-01-11T16:13:55+00:00


This is the chapter web page to support the content in Chapter 2 of the book: Exploring BeagleBone – Tools and Techniques for Building with Embedded Linux. The summary introduction to the chapter is as follows:

In this chapter, you are introduced to the Linux operating system and software tools that can be used with the BeagleBone. This chapter aims to ensure that you can connect to your BeagleBone and control it. By the end of this chapter you should be able to “blink” a system LED having followed a step-by‐step guide that demonstrates how you can use Linux shell commands in a Linux terminal window. In this chapter, you are also introduced to a library of BeagleBone functions, called BoneScript, which can be used with Node.js and the Cloud9 integrated development environment to build code that flashes the same system LED.

Learning Outcomes

After completing this chapter, you should be able to:

  • Communicate with the BBB from your desktop computer using network connections such as Internet‐over‐USB and regular Ethernet.
  • Communicate with the BBB using fallback serial connections such as Serial‐over‐USB or by using a custom USB‐to‐TTL 3.3 V cable.
  • Interact with and control the BBB using simple Linux commands.
  • Perform basic file editing using a Linux terminal.
  • Manage Linux packages and set the system time.
  • Use Linux sysfs to affect the state of BBB hardware.
  • Safely shut down and reboot the BBB.
  • Use Node.js, Cloud9, and BoneScript to write basic applications and code that interacts with BBB hardware.

If you are installing the BeagleBone Black under Windows 8/Windows 8.1, please ensure that you use the latest certified drivers, which are available from: Install the certified drivers directly from: https://github.com/beagleboard/beaglebone-getting-started/tree/master/Drivers/Windows

This book has been written and tested using the Debian 2014-05-14 release. It is recommended that you work through the book using this image and then update to the latest image once you have completed the book.

In March 2015, a new image was added as the official release: Debian 2015-03-01, which requires a revision C board (or booting from the SD card) — Notes are available on each chapter webpage for any impacts that new image have on the content in the book. Please use the comments section at the bottom of the chapter web pages if you notice any other compatibility differences that should be noted.

Updates for Debian (2015-03-01 Release)

Changes to the U-boot Partitioning Layout

On page 26 there is a note to warn you not to alter the MLO, u-boot.img and uEnv.txt files on the FAT partition. As of Linux 3.8.13-bone70 that is no longer an issue. These files were moved to create a more distribution friendly default bootloader. As alluded to in the note on page 26, you can now find these files in the /boot directory on the main Linux partition:

It is not necessary to use these files at this point in the book, but please note this fact for future reference, particularly when performing tasks such as disabling the HDMI overlay by editing the uEnv.txt file.

Writing a New Image to the BBB

Although the BBB is supplied with a Linux distribution already on its eMMC, one of the first steps you may carry out is updating your BBB to have the latest Linux distribution. If you wish, you can skip this section for the moment and come back to it later.

The beagleboard.org website has very clear instructions on writing a new system image to the BBB, so this section only details observations and additional steps that may be useful in achieving a successful upgrade.

Creating an SD Card Image

The instructions that follow will work for any BBB Linux distribution:

  • The latest BBB Linux images are available from BeagleBoard.org/latest-images. There are two versions to choose from: a version that runs directly from the micro-SD Card; or a version that writes to the BBB’s on-board eMMC, called a “flasher” image. The advantage of the eMMC version is that once it is written to the eMMC (which takes about 5–25 minutes) the BBB will boot in about 10 seconds from then on, and the micro-SD card slot will remain available for additional removable storage. For the remaining steps, the eMMC flasher image is chosen and Windows is used as the desktop operating system.
If you are planning to flash the eMMC with a new image, please ensure that you download a “flasher” image — the name of the downloaded image should contain the word flasher. The latest flasher images are available at: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian and the latest image that is currently supported in this book is: BBB-eMMC-flasher-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz

  • Using a web browser, download the image file to the desktop computer. You should end up with a file of the form BBB-eMMC-flasher-distro-YYYY.MM.DD.img.xz.
  • Check whether your desktop computer can open the .xz format file. If it cannot, then please see www.7-zip.org for an open-source file archiving tool, which is capable of extracting the .xz format—a lossless data compression format that uses the Lempel-Ziv-Markov Algorithm (LZMA).
  • If the archive extraction is successful, the result will be a single file with the .img extension (SD image file) of the form BBB-eMMC-flasher-distro-YYYY.MM.DD.img.
  • Under Windows, install “Win32 Disk Imager” from sourceforge.net/projects/win32diskimager/files/latest/download. Extract it to a folder that you can find again in the future, and execute Win32DiskImager.exe directly from within that folder. You will have to “elevate it” by right-clicking and choosing “Run as administrator”. Please note that there is a similar tool for Mac OS X called “Pi Filler”.
  • Place a micro-SD card that has sufficient capacity (ideally 4GB+) into your computer’s SD card reader/writer and then start the Disk Imager tool. Once the disk imager software has started, it will not detect the SD card when it is inserted into the computer, so please insert the SD card first. A Class 10 Micro-SD card or greater is preferable.
  • Using Win32 Disk Imager, write the .img file to your SD card (using its drive letter for the SD reader on your desktop). This will take some time (about 5–15 minutes), which varies according to card speed, writer speed, and the distribution used. See Figure 2.A1 below for a screen capture of Win32 Disk Imager in action. When you are done, you will have a micro-SD card that you can use to flash your BBB’s eMMC.

Figure 2.A1: The Win32 Disk Imager writing to the micro-SD card.

Desktop Linux Alternative

If you are not familiar with Linux then please ignore this section—it is here for reference. Here are the steps required to create the SD card image on Linux:

  1. Find the micro-SD Card device (for example, mine is sdd). Type the following:

  1. Download the flasher image file (get the URL from BeagleBoard.org/latest-images). For example:

  1. Decompress the .xz file:

This gives you the image file: BBB*.img. Write the image to the memory card (please check that you have the correct SD card device—in my case it is /dev/sdd)

where BBB*.img is the full name of the image file—use the Tab key to autocomplete. /dev/sdX is your specific SD card reader device. It should take 5 to 10 minutes for this write to complete.

Flashing the BBB with the SD Card Image

At this point you should have a micro-SD card containing a “flasher” Linux image. Here are the steps to flash the eMMC:

  1. You should perform this process with only a single 5V 2A power supply plugged into the DC jack. Alternatively, you can use a USB adapter for power. Disconnect the Ethernet cable and remove any shields and USB peripherals.
  2. Power off your BBB by physically disconnecting the USB/power cable.
  3. Plug the micro-SD card into the BBB’s micro-SD card slot.
  4. Hold the Boot Button (S2) on the top right (near the SD card slot) and, while holding this button, insert the USB/power lead to connect the power. Keep holding the button until the LEDs start to flash. The blue on-board LEDs should light in sequence and then continue to flash for the next 5–25 minutes (depending on the distribution used and the speed of the SD card). The latest distribution flashes in a Cylon/Knightrider pattern.
  5. Wait until the LEDs stop blinking and all 4 LEDs are fully lit (the latest image then powers the board down). This process can take 5-25 minutes depending on the image used. If the flashing procedure fails—for example, no LEDs flash, or it keeps running for more than 45 minutes —then disconnect the power and try restarting the BBB with the S2 button pressed.
  6. Remove the micro-SD card. This is important, as you could end up flashing the eMMC again by accident.
  7. Finally, press the Power button (S3) to power up the board and you should have the latest image installed.

Digital Media Resources

Here the digital resources referred to in the chapter web page are provided. There are high-resolution versions of some of the important figures and links to videos, resources and websites that are described in the chapter.

Source Code

Octocat_smallAll of the source code that is described in this book is available in a public GitHub repository: Derek Molloy Exploring BeagleBone repository.

You can clone this repository on a Linux desktop computer or your BeagleBone using the command:

You can also install a Windows GitHub desktop application or a Mac OS X GitHub desktop application. Alternatively, you can download a full ZIP archive of the code using the following link: Download Source Code (this is a live link that automatically provides you with the very latest files). The Source Code web page lists all recent updates to this repository.

There is only a small amount of code in this chapter that is related to Node.js using the Cloud9 IDE. The code can be accessed in the chp02 folder of the cloned repository. The formatted code is provided here for your convenience.

Related Video

Getting started with Internet-over-USB

The chapter web page includes a video on getting started with Internet‐over‐USB

External Resources

Zenmap application

Zenmap is described in the chapter as a tool for scanning your network to find a network-attached BeagleBone. You are searching for an entry that has three to five open ports (e.g., 22 for SSH, 80 for the BBB guide, 8080 for the Apache web server, and 3000 for the Cloud 9 IDE). It may also identify itself with Texas Instruments. You can see the Zenmap application in action in the image to the left where is the location of the BeagleBone on my network.

Important Documents

External Web Sites

AM335x ARM A8 Technical Reference Manual

The AM335x Technical Reference Manual (TRM)

BeagleBone Black System Reference Manual

The BeagleBone Black System Reference Manual (SRM)

The BeagleBoard.org website provides the main support for this platform, with software guides, community links, and downloads to support your development. An excellent “Getting Started” guide and blog is available at the website

Recommended Books on the Content in this Chapter:



None for the moment.


  1. TB December 14, 2014 at 1:17 am

    Derek, in reading through chapter 2, I came across the example in the “Note” section ((Loc 1646) dealing with extundelete. Are you sure that example is correct? You haven’t deleted anything–and running your commands has no effect whatsoever. Running the commands doesn’t seem to have any sort of effect–as you’ve posted them in the chapter. In fact, your example doesn’t even create anything in the “undelete” directory…much less delete it.

    I presume you are trying to undelete something to the microSD card (/dev/mmcblk0p2), but I can’t help but wonder if your example code is missing something–as it doesn’t appear as though you ever actually ever created something…much less deleted it.

    Maybe I’m not understanding your example, so I apologize if that’s the case. But it seems “off”…


    • Derek December 14, 2014 at 1:43 am

      Hi Tom, You are correct — extundelete will not do anything at this point in the book, but is there for future reference should it be necessary to undelete a file at some point in the future. However, it cannot be relied upon to be successful. Derek.

      • TB December 14, 2014 at 2:53 am

        Roger that…makes sense when you put it like that.

  2. TB December 14, 2014 at 2:50 am

    At Loc 1878, in the section where you are demonstrating the command to alter the display functionality of USR3 led, you have an error in the line:

    !root@beaglebone:/sys/class/leds/beaglebone:green:usr3# …

    There is an extra ‘!’ character there at the front of the line.

    Not a big deal, but easy enough to fix in the Kindle version of the book.

    • Derek December 14, 2014 at 12:41 pm

      Thanks for that. I’m not sure where that has come from as it is not in my electronic version. I’ll check the printed version for that error when it comes out.

      • TB December 14, 2014 at 2:57 pm

        Just checked in mine again this morning, with my iPad in both orientations (portrait, landscape) as sometimes that seems to change behavior. It is definitely still there–so I would be curious to know if others find that ‘!’ there.

  3. Mark Graves February 5, 2015 at 7:14 pm

    Derek – I just flashed my BBB to the May 15 version. Your instructions above were very helpful. I was having a lot of trouble trying to follow the instructions on the referenced sites.

    • Mark Graves February 5, 2015 at 7:17 pm

      I meant to mention the whole process took me ten minutes, at which point it shut down the unit. At first I was worried that something went wrong, but then I connected it to my router and was able to boot, see the new version and set the password. (No time to do anything else right now.) 🙂

      • Derek February 5, 2015 at 8:07 pm

        Thanks Mark, Derek.

  4. Mark Graves February 7, 2015 at 4:11 pm

    Hi Derek – Another rookie question. In chapter 2 I’m going through the section on Package Management. I do plan to connect a wireless adapter in the near future, so I followed along the steps to “load” wavemon. (Which I did do successfully.) My simple question is this, where did waveman come from? Did the “apt-cache search wavemon” command cause the system to search for it on the Internet? I’m assuming that’s what it did, but I’d like to know for sure.

    • Derek February 8, 2015 at 12:04 am

      Hi Mark, For example, the APT package manager uses the repositories provided in /etc/apt/sources.list to get lists of available packages. When you perform an apt-get update command the package lists are downloaded from the repositories. It is important that you do this to ensure that the latest versions of the package and any dependencies are installed. You can actually find out the source location of a package in advance of installation by typing:

  5. Michał Zięba February 11, 2015 at 6:21 pm

    Hi Derek,
    I have a problem with an example from the book.
    When I try to execute SimpleWebServer.js, I get an error:

    I’ve read somewhere that it is because the port is
    already in use, however I have no idea how fix it.

    • Derek February 11, 2015 at 10:01 pm

      Hi Michał, it is possible that you are running the same application twice. Does the page appear when you connect using the web browser. Alternatively, you could change the port number to another port, e.g., 5432 and try again, ensuring that you use the new port in the web browser address. See if that resolves the issue. If that works then try to kill the old process using pkill node. Kind regards, Derek.

  6. Victor March 6, 2015 at 5:19 pm

    Hi Derek, i have problems with my cloud9 IDE. My .js code run perfectly at on that little screen, but when a put the same code on cloud9 nothing happens. I’m using the debian image that is recommended on the book (Debian 2014-05-14 release).
    I do not know what is going on. :/

    • Derek March 6, 2015 at 9:33 pm

      Hi Victor, there are a few peculiarities with Cloud9. It is vitally important that you save the file after you enter the code. Then press the Run button at the top center. You will get a message “debugger listening on port XXXXX”. Then press the “Resume” button on the top right (looks like a play button under the username – e.g.,”John Doe”). This gives you access to debugging functionality, but is not extremely intuitive. Hope that helps, Derek.

  7. Dennis B March 12, 2015 at 6:02 pm

    Greetings…could you help me understand and possibly fix the following situations. I have an older BBB (A5C). To avoid any Arngstrom v Debian confusion as I work thru the book, I created an SD image with the most recent debian BBB image so I can either boot w Angstrom off the eMMC or debian if I insert the card. I’ve noted that w the card the system boots debian automatically. In the following everything I refer to is with the debian boot.
    (1) with my Win7 desktop / router. I connect just fine, USB or via ethernet (connected directly to router), can access w Putty, etc. The one question here is that after following the instructions on p.48 I connected with the internet OK after the nameserver line fix in resolv.conf . However, the next time I booted up I did not connect until I did the route add (but I didn’t have to do more than that). So it’s acting like it saved the one change but not the other. Does that make sense?
    (2) with my Win7 laptop bigger problems. I can connect as a local network OK thru the usb but I can’t figure out how to access the internet with the laptop as an intermediary, thru the laptop’s wireless connection. Changing the connection parms similar to what worked for the desktop doesn’t seem to do it. And when attempting to run the BBB via an ethernet connect to the laptop I can’t access even as a local network.

    Thanks, Dennis B

    • Derek March 13, 2015 at 12:02 am

      Hi Dennis, I believe that is correct. The route add does not persist across reboots unless you add the route -p flag. My concern with doing this is that if you wish to switch between Internet-over-USB and regular Ethernet this could be problematic. I haven’t tested a -p change properly, as I need to switch my BeagleBone between network connection types. The laptop problems seem strange. I have had Internet-over-USB working fine under Win7 laptops sharing both WiFi and regular Ethernet connections — so, I know it can be done. However, I have seen problems too — most problems I have seen are (somewhat ironically) caused by virus protection software and corporate lockdown tools. Check for any such tools and double check that you are using the WiFi adapter (many laptops have two for power management reasons) and not the Ethernet adapter. Apart from that, I’m not sure what could be happening. Kind regards, Derek.

  8. Jesse April 12, 2015 at 3:58 am

    Hi Derek,
    Is connecting to BBB through Serial‐over‐USB possible?
    Because according to section “BeagleBone Versions” in chapter 1, compared to BBW, USB serial connection functionality was
    removed in BBB.
    There is no /dev/ttyUSB0 device when connecting BBB with USB cable. USB-to-TTL works, though.

    • Derek April 13, 2015 at 1:19 am

      Hi Jesse, Yes, it is possible using the Linux Gadget Serial Driver — You have to install the drivers for your desktop machine and you should see COM port appear. On the BeagleBone side, the device appears in /dev (I don’t have the BBB to hand but I believe that the device is /dev/ttyGS0).

      If I recall correctly, the USB serial communication that was removed, was a dedicated “real” USB-serial connection — the kind that you get when you use the USB-Serial-TTL cable that is described in Chapter 2. I hope that makes sense. Kind regards, Derek.

      • Jesse April 13, 2015 at 2:56 pm

        Hi Derek, thanks for your reply.
        Now I managed to connect through /dev/ttyACM0 from my Ubuntu host.
        After some google I learned that Linux Gadget Serial Driver runs in the BBB side and can talks to either a ACM driver or a generic USB serial driver running on a host PC.
        The device appears in Linux host as /dev/ttyACM0 when the host is running ACM driver, and as /dev/ttyUSB0 when using generic USB serial driver.
        Hopes someone may find this info useful.

        • Derek April 13, 2015 at 7:16 pm

          Thanks Jesse, Derek.

  9. Carlos Saravia Jurado May 12, 2015 at 6:07 am

    Hi Derek, I have a problem when I try to write a new image for my rights . After create a SD card image I start to flashing my BBB , it after 25 minutes start to blink as a heartbeat (the four leds at the same time) and it never ends. Please, I need your help to solve this problem, because I can’t do nothing with my BBB.

    • Derek May 12, 2015 at 9:51 am

      Hi Carlos, it sounds like you are using a regular boot image rather than a flasher image. For the latest flasher image please use the link:
      BBB-eMMC-flasher-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz You should see a knight-rider/cylon back-and-forth light pattern as the image is written to the board. Kind regards, Derek.

  10. xinzhe May 18, 2015 at 4:52 pm

    hi DEREK

    i am trying to flasher image in bbb but it doen’t work
    i use the image ”BBB-eMMC-flasher-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img” , microSD (32G)
    the LED Bright, like 1234 after 4321
    after 10 min ,just the LED 2 Bright
    it’s the problem of the microSD card ?

    Best regards

    • Derek May 18, 2015 at 4:55 pm

      Hi Xinzhe, it sounds like you have a Rev.B board with a 2GB emmc. That image only works for Rev.C boards with a 4GB emmc. If it is a Rev.B board then you need to find the 2GB flasher image from the same page. Kind regards, Derek.

  11. xinzhe May 19, 2015 at 8:52 am

    hi derek

    thinks for you help

    i have a Rev board a 4GB , yesterday evening i have try to flasher with the card SD in 8GB 16GB et 32GB

    and with the card 8GB et 16GB the flasher is work , but with a card 32GB it doesn’t work . i don’t know whay .

    i think maybe other people have the same problem like me

    Best regards


  12. Amir May 24, 2015 at 11:30 pm

    Hi Derek, Thanks for all the good info you’ve gathered. I encountered one of your videos on YouTube and it lead me to your website and now I’m looking forward to get your book.
    I tried to upgrade my BBB’s packages and my upgrade returns with an error, I’ve copied the error below. How can I fix this? Should I burn an image on my BBB?

    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)


    • Derek May 25, 2015 at 10:03 pm

      Hi Amir, it is not recommended that you use upgrade on the BeagleBone. The main issue is that bad things can happen if you run out of space on the eMMC during an upgrade. You should only update individual packages as you need them. Kind regards, Derek.

    • Akhil Varma June 12, 2015 at 9:14 pm

      Hi Amir,

      I have run into the same problem as yours, please let me know what you did to diagnose it.

      Thank You

      • Derek June 13, 2015 at 1:34 pm

        Hi Akhil, I don’t think that the apt-get upgrade can be fixed in the short term. You have probably run out of space on the eMMC. The BeagleBone Foundation does not recommend the use of upgrade and I don’t think anyone has any appetite to make it work any better. Even if you perform this on an SD card with plenty of spare capacity it can take 5-10 hours. It is much more straightforward to download the latest image and update packages individually as you have a specific need. Kind regards, Derek.

  13. evolvingtech May 26, 2015 at 7:21 am

    I literally discovered your book tonight, so I haven’t had a chance to read it yet. It looks like it is going to be very useful.

    In advance of getting your book, I would like to get some clarification about the latest image (BBB-eMMC-flasher-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img.xz). Is this only for the Revision C Beaglebone Black? The reason I ask is that I have a couple of BBB boards at are Revision A5A and would like to bring them to up to date with Debian. If the BBB A5A board can’t use the currently supported Debian, what can they use?


  14. Mitchell May 29, 2015 at 9:36 pm


    Long time fan of your videos, and now thoroughly enjoying your book, which I just picked up a couple of days ago.

    Several months ago I set up one of my BBB boards to connect to the Internet through the Serial over USB connection by following the instructions for one of your videos. I am having trouble recreating that success now following along with the instructions in Chapter 2, “Internet-over-USB” from the book, and it occurs to me the difference might be that I was running Windows 7 then but am now running Windows 8.1. The issue is that when I when I go to the Sharing tab of the Properties dialog for the LAN connection on my PC and check the “Allow other network users to…” option, no drop-down appears that would allow me to choose the BBB connection as described (and as I remember seeing under Windows 7).

    Are the steps needed here different if running Windows 8 (or 8.1)?

    Everything else seems to be working fine – I flashed the latest Debian image, I can connect through a browser or by using PuTTY to the BBB at, etc.

    Thanks in advance for your help, and thanks especially for the superb book.


    • Derek May 29, 2015 at 10:50 pm

      Thanks Mitchell! The procedure should be the same under Windows 8.1. If the sharing tab is visible but there is no drop-down tab that is usually because there is only one possible option. If the ping step fails, keeping going as it is possible that ping has been restricted on your network. There are two major steps to perform on the PC (sharing and resetting the DHCP settings for the BBB adapter — all on pg.28) and two steps on the BBB (in the boxes on pg.29 and pg.43). Hope that helps, Derek.

  15. Mitchell May 30, 2015 at 6:47 pm

    Thanks for the quick reply, Derek – everything works as you describe after all (not surprising! 🙂 )

    As it turns out I was doing things in the wrong order or maybe not being patient enough. I went into the Windows Command Prompt netsh to check the status of the network adapters. After not finding anything out of sorts and exiting I saw that the Network and Sharing Center display had updated and when I checked the Sharing tab of the Properties dialog for the adapter connected to the internet the drop-down was there and the LAN connection to the BBB was shown and selected. I had to reboot the BBB and reenter the gateway and nameserver info but then the pings worked perfectly!

    Thanks again,


    • Derek June 1, 2015 at 3:12 am

      Thanks Mitchell for letting me know. Kind regards, Derek.

  16. Akhil Varma June 12, 2015 at 9:13 pm

    Hi Derek,
    Thanks for all the Videos,
    I have run into the same problem as Amir and I’m new to Microcontrollers, what do I do now??
    Thank You

  17. Carl Johnson July 11, 2015 at 5:31 am

    I refreshed my Beagleboard Black with Debian 7.8 March 1 2015.

    Now I cannot connect to the Beaglebone using the USB cable. I am running on Mac. If I open my network Preferences I no longer see the beagle bone as one of the connections.

    I have tried to reinstall the drivers recommended on the Beaglebone site but this does not help. I am able to connect using the network cable.

    Any idea how I can restore the ability to ssh to the beagle bone using the USB cable.

    I am trying to set up the cross linking tools per the book and video and it would be more convenient to use the USB cable. But I am at a loss as to how to get the USB connection back.


    • Carl Johnson July 11, 2015 at 6:42 am

      Correction the linux version as installed is Linux beaglebone 3.8.13-bone70 #1 SMP Fri Jan 23 02:15:42 UTC 2015 armv7l GNU/Linux

    • Derek August 5, 2015 at 12:57 am

      Hi Carl, I was away so I hope that you have solved your problem at this stage. I’m not sure how that has happened. You should be able to see the USB network adapter using ifconfig. In most cases like this I usually recommend that you re-flash as it could be symptomatic of another problem (e.g., incomplete flash). Kind regards, Derek.

  18. Praveen August 28, 2015 at 8:55 am

    Hi Derek,
    I have successfully install beaglebone 3.8.13-bone70 on my board. Thanks for you good info.
    Now i would like to updgrade the kernal version to 3.12.9. How to upgrade the kernal version what are the steps for that.

  19. john September 22, 2015 at 12:56 am

    I am trying to do some basic things with the BBB. In Chapter 2, page 29 you describe how to enable network sharing. However, when I type ifconfig, I get eth0, lo, and usb0. eth1 does not show up. The inet addr for usb0 is I am using Debian.

    First question: why do I not have eth0?

    I ran the various commands shown with usb0 instead of eth0.

    However, when I tried to ping as described on page 43, I get no response. I did the /sbin/route command so I am not getting the “Network is unreachable” error.


  20. john September 22, 2015 at 12:59 am

    Sorry. I posted a few errors.

    My question should be: why do I not have eth1?
    and I should have said: I ran the various commands shown with usb0 instead of eth1 as shown in your book.

  21. Julio September 25, 2015 at 11:28 am

    Hello Derek.

    In Chapter II of the book, on page 34 you say that “. You may get a security alert that warns about man-in-the-middle attacks, which may be a concern on insecure networks.” is precisely what happens BEAGLEBONE my plate black, your recommendation is that the fingerprint is accepted. I am using an ssh connection to a terminal of Ubuntu but when trying to connect via ssh root@ not give me the possibility to accept the fingerprint and rejects the connection only me and tells me to put me in touch with the administrator.
    What is the solution here.
    Note: I have made many applications with white BEAGLEBONE and only has problems by BBB.
    I hope you can help me, as you have done it several times.
    Thank You

    • Derek September 27, 2015 at 11:07 pm

      Hi there, that sounds like your BeagleBone drivers are not properly installed or there is an issue with your BBB booting properly. That is a stock message that comes when you try to connect to a device that does not exist. Kind regards, Derek.

  22. Kurtuluş February 25, 2016 at 10:16 am

    Hi Derek

    I am quite new in using BBB. I am trying to understand by going through to your books. I downdloaded image which you use througout the book( Debian Image 2014-05-14 ). Everything was okay until I noticed my 16 gb sd card turn into 100 mb. That created a problem when compiling to helloworldcpp example. The error was like this: Fatal error: No space left on device.
    Could you please help me in solving this problem? Thanks in adavance

    • Derek March 21, 2016 at 3:21 am

      Hi Kurtulus, Apologies for the delay in replying. You need to check the log files to see what is causing your file system usage as you should have the full space available to you (see pg.77). Also check the block sizes (see pg.78) to ensure that the card has been formatted correctly. Kind regards, Derek.

  23. Christian March 23, 2016 at 10:55 am

    Hi Derek,
    the BlinkLED3.js example does not work for me.

    error: Unable to find LED: usr3
    error: Unable to find gpio: /sys/class/leds/beaglebone::usr3/brightness
    error: Unable to write to /sys/class/leds/beaglebone::usr3/brightness

    I updated to the Debian 8.3 OS:
    Linux beaglebone 4.1.15-ti-rt-r43 #1 SMP PREEMPT RT Thu Jan 21 20:13:58 UTC 2016 armv7l GNU/Linux

    I’m new but recognized that in the error messages the path to the sysfs is missing the “green”.

    Best regards

  24. Mark March 25, 2016 at 9:51 am

    I’ve been away for the BBB for a bit and see there is a new version of the Debian flasher that I would like to install. However, when I get ready to use Win32 disk imager it only sees 98MB on my 8GB SD card. Hence, it won’t load the image. I’ve tried a few things to “see” the rest of the card, (I’m using Windows 10) but nothing has worked so far. Do you know the best way around this?

  25. Dan March 29, 2016 at 9:23 pm

    Hi Derek;

    Thanks for writing this book. I am a HW architect/designer trying to move to the dark side (SW).
    I have been going through chapter 2 and have run into a small issue that I am hoping you may have run across or may know how to resolve. I am doing the simple web server exercise. I am using the ethernet port so instead of the 192… address I find my BBB at I modified the code to use that IP address. I have tried both IE and Chrome with the same result. I don’t see a test message on the web page, I get a small downloaded file with my text in it. I tried copying your code by cutting and pasting but can do that in the putty window I guess so I did manually type it in. I get no errors and the server seems to be running. In fact whenever I go to the server address I get another download of that text file with my message.

    Thanks for any help you can provide.

  26. Luism April 8, 2016 at 3:45 am

    Hello Derek: Recently bought your book and finally dusted off the BBB. I use Ubuntu 14.04 as my desktop. Trying to implement Network Sharing and have the following issues:
    1. Even though the desktop has a network card (eth0), I connect to the internet using wi-fi. I suggest indicating that the main adapter should probably be wlan0 (page 29 number 3)
    2. After following the steps given, I still don’t get connectivity. These are the commands issued from my terminal:
    – sudo iptables –table nat –append POSTROUTING –out-interface wlan0 -j MASQUERADE
    – sudo iptables –append FORWARD –in-interface eth1 -j ACCEPT
    – sudo sh -c “echo 1 > /proc/sys/net/ipv4/ip_forward”

    Am I missing something here? Thanks in advance if you can answer this or someone reading this page.


Comments are closed.

Exploring BeagleBone

This is the companion site for the book “Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux” by Derek Molloy. The site structures and contains all of the digital media that is described in the book. Each chapter in the book links to an individual web page, which can be accessed using the menu on the top right-hand side of this page when you close this menu. For details of the book itself, click here.

Recent Works

Latest from Derek Molloy YouTube Channel

Oops, something went wrong.