BeagleBone Computers

Introduction

The BeagleBoard line is a series of open source single-board computers (SBCs) developed by BeagleBoard.org and Texas Instruments, bringing a range of affordable yet powerful boards to the masses, designed for embedded computing, prototyping, and educational purposes. Starting with the original BeagleBoard introduced in 2008, one of the first SBCs to gain widespread popularity, which was followed by a number of successors, including the BeagleBoard-xM in 2010, BeagleBone in 2011, BeagleBone Black in 2013, the BeagleBoard-X15 in 2015, and the BeagleV-Ahead in 2023. All of the mentioned boards aside from the latter, which uses a RISC-V core, are ARM based, and run Linux, giving users flexibility in how they use the boards. Each board offers a range of I/O options, including expansion headers, supporting digital and analog interfaces such as LCD, UART, SPI, I2C, and PWM. Support is provided in the form of the BeagleBoard.org community, offering software, documentation, and tutorials, giving users the means to quickly get started and bring their ideas to life while solving most issues promptly.

Please check out this page to learn more about the BeagleBoard/BeagleBone computers that I have come across and my experiences of using them.

The images featured on this page can be downloaded at the bottom of the page for better viewing.

BeagleBone Black

Overview

The BeagleBone Black were first available in 2013 for £32/$45 and is the successor to the original BeagleBone, the Black adds TV/monitor support through HDMI (and is its only native support for audio) and on board eMMC flash, and ships with Angstorm Linux kernel 3.8 (Rev B and below, Rev C came with Debian Linux 4.1.15-bone kernel).

The product page can be found at:

https://www.beagleboard.org/boards/beaglebone-black

On the page there are links to documentation, quick start guide, and software images, as well as links for various capes and projects further down the page. If you click on the Design link you will be taken to a page with various design information including schematic (BBB_SCH.pdf) and system reference manual (BBB_SRM.pdf).

A more detailed summary of the Black's specification is as follows:

Texas Instruments Sitara AM3358 (AM3359 on Rev A only) ARM Cortex-A8 @1GHz, with integrated SGX 3D Graphics Engine, NEON floating-point accelerator, and 2×32-bit 200-MHz programmable real-time units (PRUs)
512MB DDR3L 800MHZ SDRAM
2GB (Rev B and below, 4GB on Rev C) Embedded MMC (eMMC)
SD/MMC microSD connector
TPS65217C PMIC power management chip and separate LDO
Optional Onboard 20-pin CTI JTAG and 6-pin serial header (UART0) providing debug support
Can be powered from mini USB USB, DC Jack, or via expansion header
USB 2.0 client port (USB0) via mini USB
USB 2.0 host port (USB1) Type A Socket, 500mA LS/FS/HS
10/100M Ethernet (RJ45) port
Reset, boot, and power buttons
LED power indicator
Four user configurable LEDs
HDMI D (micro) type interface (including stereo audio)
LCD interface
Expansion interfaces via 2x46-pin headers with support for LCD, UART, eMMC, ADC, I2C, SPI, and PWM

The digital GPIO should not be exposed to voltages beyond 0 to 3.3V, and the analog inputs are limited to 0 to 1.8V. Do not apply any voltage to any I/O pins while the board is unpowered.

Unfortunately the BeagleBone Black doesn't have integrated Wi-Fi or Bluetooth so you will need to either use a USB dongle (since the board only has one USB socket that will likely mean needing a hub) or a wireless module connected using the board's GPIO with appropriate software.

The board has a number of LEDs, all blue, which include the power PWR LED and the following user controllable LEDs which also has a particular use when not under user program control:

USER0 Linux kernel heartbeat indicator (Linux is running).
USER1 microSD card access light.
USER2 activity indicator (illuminated when the kernel is not in the idle loop).
USER3 onboard eMMC access indicator.

The particular version of the BeagleBone Black, which I bought second hand, is branded element14, the box claims the computer to be software and hardware compatible with the standard BeagleBone Black. On the board it has 'mbest An element14 Company' on the silkscreen near the ethernet port. The board came boxed with a mini USB cable, and quick start guide, with English (a few minor grammatical errors) on one side and Chinese on the other. The side of the box says it's Rev B, which we can find out the significance at:

https://docs.beagleboard.org/latest/boards/beaglebone/black/ch02.html

Which tells us that Rev B changed the processor to the AM3358BZCZ from the AM3359AZCZ (not mentioned on the site), but with no significant differences in how they operate. From the page we can see that there is also a Rev C and minor revisions following. The important thing to note about Rev C is that it increases the on board eMMC from 2GB to 4GB, which helps overcome problems such as the difficulty of updating the firmware of a 2GB board, something that I wasn't aware of when I bought the board - this will be covered later on.

It's inevitable to compare the BeagleBone Black to other single board computers with the original Raspberry Pi being a suitable candidate since it came out a similar time (2012). As a brief comparison, the Black has the advantage of more GPIO then the original Pi, and on board flash memory, additionally, the Black is more powerful than the original Pi, the Black can be used headless out of the box, and there are more ways to power the Black than the original Pi. A disadvantage of the Black is that it's single core whereas later Pi's are multi core, and another downside of the Black is its single USB port. Ultimately, which you use will be down to your needs, such as how much GPIO you need, processing power, storage options, and so on.


Getting started

I plugged the board into my Surface Pro using a mini USB cable, the BeagleBone Black's PWR LED came on and the ‘heartbeat’ LED regularly flashed on and off, the other user LEDs also turned on and off frequently. In Windows the board appeared as a 69.4MB drive called ‘BeagleBone Getting Started’, on the drive I found an App folder, Docs folder, Drivers folder, and various files.

To get started using the board I followed a tutorial at:

https://docs.beagleboard.org/latest/boards/beaglebone/black/ch03.html

This is as simple as opening the start.htm file on the board’s drive in Windows, as seen below:

From there I followed the guide to install the drivers, below you can see the driver installer:

However, I got multiple errors, and the device driver install failed:

From looking online it seems the issue is due to Windows (note: I was using Windows 10) not liking BeagleBone drivers because they aren't signed and while there is a temporary fix I decided to not go further; from my understanding the drivers are only needed to access the board over USB as a network device. There are other ways to connect to the BeagleBone Black remotely, such as through the COM port when connected to a PC's USB port even if the USB drivers previously mentioned didn't install. Use PuTTY or something similar, set to Serial, enter the board's COM number (check Device Manager, shows up as a USB Serial Device), set baud to 115200 and click the Open button.

Notice the Angstrom Linux greeting. You can log in, by default it's set to root with no password so just enter root and press enter. We can now enter commands and use the board remotely as long as the board is connected to your PC via USB. By issuing the ifconfig command we can get the board's IP address, which will be listed under eth0 next to 'inet addr:'. Put that IP address into your browser and provided the board is connected to your router either through its ethernet connection or by using a USB Wi-Fi adapter you'll have access to the board's webserver:

By using the browser interface we have a means to access the board without a USB connection although will need to get the board's IP address each time you want to connect to it as it may change such as throguh a power cycle. However, you can set up a static IP address, please see:

https://elinux.org/Beagleboard:Terminal_Shells#SSH:_Setting_up_a_Static_IP

The webserver gives you a wealth of information on using the board - pinouts, programming functions, and even allows you to run code examples from within the browser:

Unfortunately a few of the demo program pages did not display correctly for me, I tried on both on Edge and Chrome.

I also tried the Blink an external LED demo built into the webserver, the image shows how to connect the LED and limiting resistor, but it would have been nice to list the resistor value as the image wasn't very clear, I could see just about see the value. Although the diagrams are helpful it would have been nice if the pins had been label as a reminder of their function.

What's helpful about the built-in demos other than the convenience is that they run as soon as you click the Run button, and the code can be altered and restored with the Restore button.

Additionally I tried the Potentiometer demo, this is one of the demos that doesn't display correctly (the formatting is off) but it worked nonetheless.

There is also the Cloud9 IDE accessible from the main page, which I'll go into more detail about in its own section but note that the screenshot below is of an older version of Cloud9:

As well as accessing the board remotely we can also use it like a typical desktop, connecting a monitor to HDMI, as well as making connections for ethernet, keyboard and monitor, and power. When booting with the preloaded Angstrom after 12 seconds you will see the BeagleBone banner, 32 seconds total the desktop begins to appear, and then at 42 seconds the log in prompt appears (it will automatically log in), 52 seconds total to finish completely loading.

If you are using a wireless keyboard and mouse with a single USB dongle then that will give a good experience. I found the O/S to be fairly responsive with simple apps taking seconds to open, more intensive apps such as GNU taking about 20 seconds. Speaking of apps there are various installed, such as gedit text editor, GNU, Chromium, etc. I was disappointed that no programming IDEs and no Terminal was present, at least not though the main menus.

Chromium took about 6 seconds to open, however, of the few sites I tried I couldn't get them to load due to either issue with server security certificate or an error saying the webpage was not available. I tried the Epiphany browser, which loaded even quicker, and it opened Google OK and I could do Google searches, but not Wikipedia (Unable to load page error), and YouTube when loaded advised to update the browser (selecting the Remind me later option resulted in a mostly blank page). Of course a lot of these issues can be fixed with an update.

The screen was cut off on my small monitor so I had to change the resolution from 1920 x 1080 to 720 x 576 (System->Preferences->Monitors) and even then the top bar still was mostly cut off. One solution is to right-click the top (menu) bar, select Properties. Set Orientation to Bottom, Size to 70 pixels.

Looking at Applications->System Tools->System Monitor, and selecting System tab we get the following:

Angstorm Release v2012.12 (Core edition)

Kernel Linux 3.8.13

Memory 498.6MiB

Processor 0: ARMv7 Processor rev 2 (v7l)

Available disk space: 491.1 MiB

The system takes about 10 seconds to shut down.

Programming/upgrading the operating system/debugging

When I looked into programming the BeagleBone Black using Python I came across this video, which shows a more 'traditional' approach (that is, not using the Cloud9 IDE, which I cover in its own section):

I recommend watching all the videos, you can find the playlist at:

https://www.youtube.com/watch?v=UMEUo6Wm6u4&list=PLGs0VKk2DiYyThNvj6VyDFmOnQ8ncXk8b

I connected to my BeagleBone, entered Python into the command line, revealing that V2.7.3 was installed - you can use Ctrl + D to exit. Interestingly, typing pwd at the command line results in /home/root rather than /root, as shown in the video.

I then followed through with the subsequent videos, which teaches how to control the GPIO using Python. When I got to lesson 4, because of having the older version of the O/S, I didn't have the required Adafruit library installed so I attempted to upgrade the O/S as Paul advises in his video, and is a good idea to do anyway. The O/S can be obtained from:

https://www.beagleboard.org/distros

I went with AM335x 12.2, an October 2023 Debian release, eMMC flasher.

Note that this is a .img.xz file and there are versions that flash the board's eMMC and others that are for running off an SD card.

After downloading the image I then extracted it using 7-Zip, resulting in a .img file. To write the image to the SD card you will need to use a program such as Win32 Disk Imager if using Windows. I used a Sandisk 4GB micro SD card as I happened to have one at hand and is the minimum size required, writing to the card will take some time (10 minutes for me).

The next step was to put the SD card into the BeagleBone, hold the S2 boot/user button (to the left of the full size USB) and apply power while still holding the button for a further 4 seconds. All four user LEDs should come on solid, then go off, then turn on and off in turn at high speed (the 'cyclone' pattern). After 10 minutes all 4 LEDs will rapidly flash on and off together a few times before staying off. When this happens, remove power from the board, take the SD card out and power the board on again. However, after doing so I got no output from the HDMI port and the board didn't appear as a COM port in the Device manager, even though the board appears to boot as there is LED activity. I later realised that I was trying to write a 4GB image to a 2GB board!

I tried reverting to the oldest O/S I could find for the board, an Angstrom distro dated 2013-06-20. That bought the board back to life, I was able to log in through its COM port, however, it wouldn't boot successful if I powered the board on without the SD card, as it turns out that the O/S runs of the SD card only. Note that you don't need to press the boot button when powering on the board if the O/S is running off an SD card.

Next I tried Debian 9.5 2018-10-07, which is supposed to flash the eMMC, but again I didn't think to check that it was too big for my board's storage, same with AM335x Debian 11.7 2023-08-05, which appeared to flash the board but couldn't boot after as again, it was too big. So the reality is that if you have Rev B or earlier you are stuck with the preinstalled O/S unless you can get one of the other 2GB images to install, which is only Debian 7.5.

While trying to get a newer O/S installed and faced with a board that wouldn't boot I looked at getting debug information so if nothing else I at least learned how to do that. To get debug information we can connect up a UART to USB converter/cable to the board, make sure you use a 3.3V version; I used a Waveshare PL2303 with the VCCIO shunt set to 3.3V. The debug UART connector on the Black is J1, pin 1 is marked with a circle, the pinout is as follows:

1 GND
4 Receive
5 Transmit

You need to connect up like this:

UART-USB BBB-UART
GND GND
RXD Transmit
TXD Receive

After connecting up, power on the BeagleBone and plug the UART-USB adapter into your PC. If you don't get any messages press the reset button on the Black. When the board finishes booting you will be able to log in.

Now I could see when booting off an SD card I got this error:

No NAND device found!!!

It was at this point that I realised that I had been trying to install a 4GB distro on a 2GB board. Another error I faced was:

ERROR: writing to [destination=/dev/mmcblk1] failed...

Which is a failure writing to the eMMC and confirms that although the updating appears to take place it failed.

However, it doesn't explain why the 2GB eMMC Angstrom distro wouldn't flash, which gives me an EXT4-fs error.

I did try the Debian 7.5 eMMC flasher 2GB image and even that didn't work, giving me this error:

Gave up waiting for root device.

But at least looking online I could see I wasn't alone in my struggles.

In the end I settled on:

Debian 7.8 2015-03-01 (bone-debian-7.8-lxde-4gb-armhf-2015-03-01-4gb.img)

This way I could have a newer version of the O/S but would have to run off an SD card, getting around the memory limitation as this install is 4GB, and having the advantage that there would be plenty of space left as I used a 64GB SD card, and the eMMC could be used as an additional drive. Note that I didn't try a newer O/S running of an SD card, I'll perhaps try that in the future, I was just happy to get the board working again.

Fortunately, booting off SD card is quite fast but oddly I found that sometimes I had to press the reset button after powering on otherwise it wouldn't boot off the SD card. Running off the newer O/S I can still access the board over ethernet and access its webserver - all the demos pages render correctly unlike when using the older O/S, which was stored on the eMMC, and of course HDMI output works.

Do now I had Debian rather than the Angstrom distro that originally came with it. If you use uname -a in the command line it reports:

Linux beaglebone 3.8.13-bone70. lsb_release -a reports Debian GNU/Linux 7.8 (wheezy).

Since I was using a 64GB SD card and the O/S only takes up 4GB I wanted to expand it to have the remaining storage available. If you do the following from the terminal:

lsblk

You will see mmcblk0p is 96M and mmcblk0p2 is 3.5G, which certainly doesn't equal 64GB. So we need to expand the Linux partition on the SD card, there are instructions at:

https://elinux.org/Beagleboard:Expanding_File_System_Partition_On_A_microSD

I ran the grow_partition.sh script as suggested, even though you get this warning:

BLKRRPART: Device or resource busy

The command to re-read the partition table failed.

But it did the job and the warning is just because of it being a boot drive.

If you do:

lsblk

You should see that mmcblk0p2 is now 59.4G (or whatever for your size SD card, either way it should be larger than before).

We could format the eMMC and use it as a general 2GB drive if booting off an SD card.

Next I updated the O/S software using:

apt-get update

apt-get upgrade

When I returned to Python and the YouTube tutorial previously talked about I was able to use the required Adafruit library without manually installing it (the library is included in Debian).

Cloud9 IDE

Cloud9 IDE is the native IDE for BeagleBone boards, as of 2016 Cloud9 IDE is now part of Amazon Web Services. Various programming languages are supported by Cloud9, Bonescript (based on JavaScript), C/C++, Jave, Python, etc, and there is an integrated debugger. To reach Cloud9 put the BeagleBone Black's IP address into a browser, click Cloud9 IDE to the left of the page and click on the Cloud9 IDE link on the page that loads. You will be greeted by the welcome page:

There are various menu options along the top, navigation trees to the left, walkthroughs to the right, and terminals at the bottom. It's a good idea to follow the tutorial on the Cloud9 IDE page previously mentioned. In the following screenshot you can see the demo code entered, which toggles the board's USR3 LED on/off:

A nice feature is that you can have a JavaScript app run automatically when the board boots by placing it in the autorun subfolder (/var/lib/cloud9/autorun). Within the Cloud9 IDE you just have to save to the autorun folder. 

Accessible from the navigtion tree left side of the IDE are various folders which can be expanded, containing documentation, examples, etc. that can be opened within the IDE.

Another demo I tried, a Python blink example, can be seen loaded and running:

Although I did find some examples wouldn't run, I was successful in getting the Python, JavaScript, and Ruby blink examples to work.

Please see this site for more information on using the Cloud9 IDE:

https://randomnerdtutorials.com/cloud9-ide-on-the-beaglebone-black/

Here is me debugging blinkled.js as test a example, having set a breakpoint:

Initially I was unable to get debug to work, sometimes the breakpoint would trigger and I could inspect the variables but couldn't resume execution or step over. But after restarting the board and debugging again I could now resume/step over/etc. as seen in screen above.

Tips

I/O is limited to 6mA, if a load to be driven by the I/O requires more current you can use a transistor, please see:

https://subscription.packtpub.com/book/iot-and-hardware/9781784399702/3/ch03lvl1sec27/driving-higher-currents-from-gpio-pins

Only some pins are capable of PWM - see pinout.

Unlike the Raspberry Pi, for example, the BeagleBone Black has several analog inputs, however they are limited to 0 to 1.8V. Fortunately there is a VDD_ADC 1.8V reference pin provided by the board.

If the Black can't find a bootable image on the eMMC then it will attempt to boot off an SD card, thus if you have a 'flasher' O/S distro on an SD card then it should automatically install without having to press the boot button if the eMMC doesn't have a valid image.

All content of this and related pages is copyright (c) James S. 2024