Skip navigation
1 2 3 Previous Next


97 posts

To take advantage of the freedom wireless networking offers I wanted to integrate the BeagleBone Black WirelessBeagleBone Black Wireless and the 4.3" LCD touch screen cape4.3" LCD touch screen cape into a fully portable development kit.

You can get an overview of how to get started with the BeagleBone Black Wireless and the display cape on a separate blog post here.



Rather than trying to print or build an enclosure from scratch, I shopped around to find a small plastic lunchbox of the right size and proportions. I secured the BeagleBone Black Wireless to the bottom of the Lunchbox with 25mm long M3 standard bolts – just the right size to fit the mounting points on the board and long enough to secure the LCD display cape in place. This will help with keeping it in place when additional capes are inserted as the pins have quite a tight fit.


I really wanted all the potential of the BeagleBone to be available in the Lunchbox kit. As part of this the two rows of headers need to be accessible to allow for adding of more capes or even other things like LEDs, GPIO switches or for interfacing small motors and sensors. As the board is mounted to the bottom and the lunchbox is deep enough, most capes can be attached and integrated while still allowing the lid of the Lunchbox to be attached.


Wireless is great for networking, but still being tethered to a power outlet negates that advantage. Fortunately, the BeagleBone Black Wireless can be powered over USB, so some smartphone power banks are able to provide a battery solution. Some smaller or cheaper units may not provide enough power to run the BeagleBone Black Wireless and the LCD display simultaneously, so I made sure to use a battery bank that could provide at least 1 amp of current. I took the battery and circuitry out of the plastic case of the power bank and used mounting tape to attach it to the side of the Lunchbox. I cut a slot to give access to the charging port for the battery and twisted a small micro USB cable around to the port on the BeagleBone Black Wireless. A good tip when assembling this is to have the battery completely discharged so you can test out various fitting positions for the cable without worrying about the BeagleBone Black Wireless turning on.


Fortunately the BeagleBone Black Wireless has integrated power and reset buttons, meaning the battery could be connected directly to the micro USB port without having to put a switch in line. The first time it is connected the board will power on, but after shutting it down it can be turned back on with the power button located near the wireless antenna on the board.


Connecting a range of things like a keyboard, mouse and a USB thumb drive quickly makes one USB port inadequate, so I integrated a 4 port USB hub into the build. I couldn’t use an actively powered hub as the small battery wouldn’t supply enough power to run it. This unfortunately means high power devices like a hard drive will not work, but low power peripherals like keyboards will function perfectly. I cut a hole and mounted the hub to the right side of the box and secured it in place with some thin nuts and bolts.


I didn’t want the LCD display to be irremovably fixed to the Lunchbox, so rather than a permanent adhesive I used double sided mounting tape to fix the panel to the bottom. Over time it may become a little loose, but this way it can be easily removed with a thin craft knife. I cut a thin slit on the edge of the Lunchbox to fit the LCD ribbon cable through to the BeagleBone Black Wireless underneath. I was careful that the cut slit didn’t have a very sharp edge, as this would wear away at the fragile ribbon cable. To help keep it in place I fixed it in place with a strip of electrical insulation tape.


To have some redundancy if the BeagleBone Black Wireless is used without the display cape I needed the HDMI port to be accessible. I used an adapter to convert the micro HDMI into a more common full sized HDMI port. The adapter slotted into a small hole in the side of the Lunchbox. To stop it wiggling loose I stuck it in place with a glob of hot glue.


I sprayed the completed Lunchbox with a metallic silver paint to give it a more sophisticated finish. To give it a little bit of iconography I taped an image of the mascot inside the box and used painters tape to keep that area unpainted on the outside.


List of Materials
BeagleBone Black Wireless with WiFi and BluetoothBeagleBone Black Wireless with WiFi and Bluetooth
Element14 4.3 inch TFT LCD Display Cape with capacitive touchElement14 4.3 inch TFT LCD Display Cape with capacitive touch
5x M3 x 25mm Nuts and Bolts
micro HDMI to HDMI adapter
4 port Bus Powered USB Hub
USB Lithium battery Powerbank with 5v minimum 1000mA outputUSB Lithium battery Powerbank with 5v minimum 1000mA output
8GB class 4 micro SD card8GB class 4 micro SD card


If you have any questions or suggestions for improvement about this BeagleBone Black Wireless in a Lunchbox project, comment below and I’ll do my best to answer. I’d also be very interested to read about any other development platforms or single board computers that have been put together in a case with some peripherals to make a custom portable unit.

The BeagleBone Black WirelessBeagleBone Black Wireless is the newest board in the family, replacing the wired Ethernet from its predecessor with full WiFi and Bluetooth connectivity. It’s a development kit loaded with connectivity options that can also be used as a very capable single board computer. It can be powered from a microUSB port or a round 5 volt barrel socket, either way works equally well.


The latest operating system for the BeagleBone Black Wireless can be found on the page. Debian Jessie is currently the standard system of choice and the one most widely used, but there are other official options available like a text only terminal version. There are also a range of community developed operating systems including some designed for use as a media center, an IOT device and even a Super Nintendo Entertainment System game emulator.


The BeagleBone Black can run an operating system from a microSD card or on a fast 4GB eMMC flash chip that is installed directly on the board. Running from a SD card is a good way to sample an operating system, but for longer term use it’d be beneficial to install it to the onboard flash.


Note that some operating system images are protected from being written to the eMMC flash chip and can only be run from the SD card without modification to allow for a full installation.


Installing an operating system is done by writing an image to a microSD card then using that to update the onboard chip. There are various programs that can write an image to a microSD card. Win32 Disk Imager is a lightweight option for Windows users and Etcher is a multiplatform option compatible with Windows, Linux and Mac. For official Debian releases the microSD card needs to be a minimum of 4GB in size. Depending on the format the image file is in you may need to decompress it using 7zip.


To start the flashing process, just insert the microSD card into the BeagleBone Black Wireless and power it on. If the image on the card is setup to do so, it will take the operating system from the microSD card and install it to the onboard chip. Depending on the speed of memory card used this can take over 30 minutes – you can tell when the installation is complete when all four LEDs stop blinking rapidly and stay solid blue. Power down the board and remove the microSD card to complete the process. You can get more information on the flashing process at the eLinux Wiki.


For optimal WiFi and Bluetooth reception the BeagleBone Black Wireless has thin wire antennas pre installed. By default they are oriented to face over the board to keep the unit compact, but they can be rotated around to point away from the board to potentially increase the reception. Be sure to rotate the antenna carefully as the connections are small and fragile.


The easiest way to get started with the BeagleBone Black Wireless is to just connect it to a PC using the included microUSB cable. On first installation it will be recognized as a standard USB mass storage device just like a normal memory stick, making it universally compatible with most computers. When the drive shows up, open the START.htm file inside a web browser to get access to the digital manual.


Before playing around with the BeagleBone Black Wireless it is useful to get the Virtual Ethernet to USB drivers installed and running. This makes it function as a mini web server, letting you access and code various features just by connecting it over USB.


Scroll down on the START.htm page to Step #2 – Install drivers and choose the driver that matches the operating system you’re using. If you encounter errors when installing the drivers in Windows it might be due to them not being digitally signed – if that is the case, download the alternative signed drivers here.


The two long rows of headers on the BeagleBone Black Wireless are for stacking on various expansion modules called capes. Recently a new cape released by element14 was a 4.3” LCD display with full capacitive touch.


The LCD display cape comes in two parts – the circuit board cape and the capacitive touch LCD panel. There are two orange ribbon cables attached to the LCD panel that slot into the similar sized zero insertion force sockets on the circuit board. The larger one is for video and the smaller is for the touch screen signal.


Pull the grey part of the connector out slightly then lift it to hinge it up. Gently slot the ribbon cable into the connector then hinge it back down to secure it in place. Be sure to orient it correctly with the LCD screen and the circuit board both facing upwards, with the pins pointing down and the sockets facing up. The ribbon cable is fairly durable, but be careful not to tear or bend it out of shape.


Upon first boot the touch screen can be somewhat inaccurate and require calibration. Under Preferences there is a Calibrate Touchscreen option that can fix any issues. Connecting a USB mouse can help if accessing the menu can’t be done with the touch screen uncalibrated.


I put together a project to assemble these two devices together into a portable development kit unit. Read about it here.

After receiving my first beaglebone black a couple of weeks ago, I was eager to get started playing around with it.

So I followed the instructions, plugged into my PC, opened the BBB as an external drive and opened the getting started page. So far so good, I downloaded the drivers and ran the wizard.


Here is where the problems began, I kept getting an error at the end saying that the wizard was unsuccessful. I keep trying, running as admin, re downloading the drivers, trying to install drivers through device manager; but nothing worked.

So after a lot of expletives and shouting (I had just finished a fifteen hour shift and was already a little annoyed) I got fed up of trying and put the BBB in the drawer to try another day.


I haven't heard of anyone on the community having this problem, but whilst searching online I found a lot of other people who this affected.


I had a look online and found out that window 10 needs drivers to have a Signature to be allowed to install. So I had a look for how to disable this feature, finding a tutorial online at How to Disable Driver Signature Verification on 64-Bit Windows 8 or 10 (So That You Can Install Unsigned Drivers) from How-To-Geek. I won't go into detail here on how to do this but will give a brief overview.


Two options exist for doing this the first permanently disables the requirement for signatures (which I didn't want to do, as I know it is there for security reasons) the second only temporarily disables the function, and that is the way I used.


  • Restart computer whilst holding down the shift key
  • Click on "Troubleshoot"
  • Select "Advanced Options"
  • Select "Startup Settings"
  • Press F7
  • Finally click restart


Now you can run the driver installer and that should be you. Happy days

Build a professional grade up to 4 Axis LinuxCNC control with Beaglebone Black and our CNC cape on Kickstarter.


The Cape comes with pre-installed LinuxCNC Open Source Software (Machinekit) and has opto coupled inputs.

For more information see:



Follow the steps in this guide to join the Internet of Things using NodeJS, Bluetooth and 10 powerful sensors. You will need the BeagleBone Black IoT Solution Kit Buy KitBuy Kit See All Parts

What Exactly are we Using Here?

You may have seen this guide in parts, however I like everything in one place, on one page and appropriately up to date. Or as much up to date as I can possibly do, technology moves so fast!


IMG_20160413_233704.jpgTexas Instruments (TI) have this interesting little board called a Sensor Tag and the version I have is a CC2650 running the default firmware. To update the firmware, you need the right cable to plug into it. This cute little board comes with a plastic enclosure, that then can be contained within a rubber sleeve. I imagine you could have a number of these devices placed around though with them being Bluetooth you're going to have to be in an open area or have thin walls, it is 2.4Ghz after all.


What's ridiculous (in a good way) about the Sensor Tag is that it comes with 10 sensors on board, and it can sync with any Bluetooth device, including your phone, you can even expand it to add more sensors to it. I'm not sure why you'd want to add more sensors to it, because it already has these:


  • "10 sensors including support for light, digital microphone, magnetic sensor, humidity, pressure, accelerometer, gyroscope, magnetometer, object temperature, and ambient temperature"


Elementary, my Dear IoT


Those clever people at International Business Systems (IBM) have been developing a way to make sense of data, lots and lots of data, in various different ways. It may be an artificial intelligence, or it may just be intelligent ways of looking at data. I'm not entirely sure, it helps to watch a video and make sense of it all.



Since all things Internet will be creating a lot of data, it makes sense that Watson is thrown at IoT. You will need to sign up for an IBM Bluemix account to be able to work through attaching your IoT sensor(s) to it. Fortunately, there is a free tier of Watson IoT for us to play with, however this can scale up to cover thousands of devices with some amount of data traffic and storage. It is a little weird, even if you select Free you're put into the Free Trial, just see it as a nice 'try before you proceed' affair.


You need not be Sherlock to join Watson

In a few easy steps you can sign up for then IBM Bluemix account before we look at the hardware you'll need to get started with IBM - Explore IoT



{gallery} Joining IBM Watson


Step One: Visit the IBM Explore IoT site and click Sign Up


Step Two: Fill out your details on IBM Bluemix


Step Three: Confirm Sign Up with your E-Mail


Step Four: You'll be put onto a premium trial first, but this falls back to a free account.


Step Five: At the login prompt, your IBM ID is your e-mail


In case you missed it in the image gallery overlay, your IBM ID is your e-mail address.


What do I Need to Get Started?

Set yourself up with IBM and the BeagleBone Black with the Texas Instruments SensorTag. Follow the steps in this guide to join the Internet of Things using NodeJS, Bluetooth and 10 powerful sensors.

BeagleBone Black IoT Solution Kit Buy KitBuy Kit

The kit consist of the following 5 items:

BeagleBone BlackBeagleBone Black

TI Sensor Tag CC2650TI Sensor Tag CC2650

Bluetooth 4 USB AdapterBluetooth 4 USB Adapter

8GB microSD Card8GB microSD Card

Ethernet cableEthernet cable with a connection to the internet.

*You need a way to write to a microSD Card from a laptop or desktop computer.


With this hardware I'm making the assumption that you're going to plug the Beaglebone Black into a wired network. Yes, I know that it is possible to setup a 'soft network' using the USB cable that comes with the BeagleBone Black and connecting it to your computer. However, I discovered that the driver bundled with even the latest Debian image does not work with Windows 10 64bit, you're advised to compile the driver yourself. If you don't have a way to view the desktop on the BeagleBone Black (it does require a mini HDMI to something sensible cable) then you won't be able to setup WiFi either. So I suggest plugging in an Ethernet cable to a switch, whether that's a home gateway or on the same network as a computer that's running a DHCP server. If you're not connected to the internet via this connection, you'll have to scour the packages and offline files for yourself.


Setting up the BeagleBone Black

20160414_154133.jpgLet's get set up with a reasonably up to date version of Debian Linux. Angstrom hasn't been the default stable for the BeagleBone Black for a while now and thankfully we can use the armhf architecture from Debian. You can download the latest Debian 8.3 Jessie image. If you're using Linux then the setup of the microSD card is straight forward, you can use unxz as a command (or you can even use simply 'xz -d', search your distribution's repository if you don't have either) to extract the downloaded image file, and then use dd to write the image file to the microSD card using something like this:


sudo dd if=./BBB*.img of=/dev/sdX


Be wary using BBB*.img as the filename if you have more than one image file in the folder you're running this command in. The command is ran from a terminal window, and /dev/sdX is an example name of your SDCard device reader where the microSD card is plugged into. If you're not sure which one it is, then you're going to have a fun dance with "ls /dev/" and dmesg commands as you plug/unplug your SDCard into the computer and correlate the names as to which device is your SDCard.


On Microsoft Windows, you can use win32DiskImager, insert your SDCard into your reader, select the appropriate drive letter and the .IMG file, after extracting it with something like 7-Zip and write it to the card. However, I encountered a problem when using win32DiskImager and writing the Debian image, it wouldn't do more than 2gByte of data sometimes and I had to resort to using Linux. Now, it may have been a faulty microSD card, or it could have been Windows to blame. Just be wary that if you're not able to write properly to your SDCard that you may need to try a different operating system, or your card is broken.


Once you have your microSD card setup, you can insert it into your BeagleBone Black and connect power to it. Either by powering it with the USB cable or a wall wart rated at 5V, perhaps above 1Amp. Ensure your BeagleBone Black is connected to the wired network.


Accessing the BeagleBone Black on the Network

There are many different ways you can find out what the IP address is of the BeagleBone Black if you haven't connected it to your computer using the USB port, ranging from a network scan using nMap (don't run that on corporate networks, your network administrator won't be happy) to looking up the DHCP allocation table on your network router. The method you use will be entirely dependent on your network setup and how you've chosen to connect to it, and unfortunately we won't be covering that here, but by all means ask in the comments below.


You'll want to login to the BeagleBone Black via SSH, using either PuTTy on Windows, or just ssh on Linux. You can login as root as by default there is no password set and root is permitted over ssh, alternatively the username and password is:


User: debian

Pass: temppwd


Once you're connected to your BeagleBone Black then it's time to ensure that your distribution is fully up to date. To keep track of any potential problems, separately you should run:


sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove

sudo apt-get clean


This will update your operating system, and you should run through this set of commands at least twice in case any packages are held back. A command I run when I'm being quick, dirty and lazy is:


sudo apt-get update; sudo apt-get upgrade -y; sudo apt-get dist-upgrade -y; sudo apt-get autoremove -y; sudo apt-get clean -y


Which goes through them autonomously, use at your own discretion. Yes, those are semi-colons between commands.


Configuring the BeagleBone Black and the Sensor Tag to Access IBM Watson

What we're going to do now involves using the repository software called 'git'. From here we're going to get hold of software from github, and then modify it because it's out of date. I did consider forking the repository and having this fixed in an element14 repo, but I think it serves as a good example to introduce you to the code and also using git.


The software basically downloads and installs bluetooth and also sets up nodejs which is a set of Javascript libraries.


Make sure you're connected to the internet and we'll download the git repository, effectively cloning it from github and then change to that directory. First you should navigate to your home directory, and we're assuming here that you logged into the BeagleBone Black as the root user:


cd ~/

git clone

cd iot-beaglebone/samples/nodejs


There is a setup script which should take care of everything for you. If you logged in as root, you do not need sudo:


sudo ./


Take note of any error messages that you see, this bundled up setup script which installs the packages of bluez and libbluetooth-dev. It also performs an 'npm install'.


Fixing the Code

There is a Javascript file which we have to alter ourselves, This is not hosted in github, but is likely pulled through when npm is run, so it is not necessarily straightforward to have been able to apply a preliminary fix.


We need to replace a file after successful running of the script, the file is attached to this blog post, you can download the file by using wget:




This will download the file to the current folder you are in, you then have to move the file to replace "iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js". We should be able to do this in one command, like so:


wget  -O ~/iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js


This is to fix an API change in the node/javascript calls. The -O parameter here may not strictly be correct,


Using the IoT Cloud


Now to associate the Sensor Tag with the BeagleBone Black and use it with the IBM Watson service:


cd ~/iot_beaglebone/samples/nodejs

node iot_sensortag.js


Registering your Device


Now you'll want to register your devices in the IBM Watson IoT Platform, there is also a Quickstart where you can check what information the device(s) are sending.

IOT setup using a bluetooth sensor streaming data to the Beaglebone which submits it to the IBM cloud


Note: This blog post is being superceded with updates here: BeagleBone Black IoT Project Bundle


This is forked from a project HERE, but changed slightly to work with the TI Sensor Tag CC2650.


It is a very easy project with only a few minor edits needed. This can be done in about 20 minutes from start to finish, and looks great at the end.



What You'll Need


Beagle Bone Black

TI Sensor CC265024701812470181



Installing Script


First we need to grab the code:

cd ~

git clone


Then we need to get to the code's directory

cd iot-beaglebone/samples/nodejs


Then we need to install the dependencies. Luckily this very easy thanks to the automated script provided

sudo ./


Editing the script


We only need to edit one file to get this to work. The credit for this edit goes to AshokRao.


You need to download the file attached to this blog, See at the bottom.

This file needs to replace the file iot_beaglebone/samples/nodejs/node_modules/sensortag/lib/cc2650.js. Copy the file at the bottom and replace the existing file with this new one


The only differences are on lines 186-188 where we have used a different version of the API from Node.js framework that does not evaluate the offset & continues to read the data from the buffer. The default is “false”. For documentation on this and other API’s, please refer: .



Running it


Everything is now done!

Just run the main script using the command

cd ~/iot_beaglebone/samples/nodejs
node iot_sensortag.js


Now follow the link below and type in your BBB's mac address (shown when you start the .js script) to view the data.



Hope it now works for all of you. Please leave your comments, suggestions, and problems below.

I have a Beagebone Black I/O cape on Kickstarter.




Features List

Here's the specific list of features that the card supports:

  •   (19) GPIOs GVS pins
  • (3) UARTs GVTxRx pins
  • (1) I2C bus GVSdaSck
  • (8) Channels of 3.3V to 5V level translators
  • Use female to female jumpers to route the GPIO lines to the translator channels 5V side has GVS pins
  • (7) 1.8V analog GVS connections with analog voltage/ground Buffer opamps on the analog inputs
  • 5V pins are all ESD protected pins with 15 kV of protection
  • Selectable 5V source (SYS_5V or VDD_5V)
  • 3.3V and 5V are fuse protected
  • Cape configuration EEPROM with write enable jumper
  • Beaglebone Black form factor

I am new to linux platform. Started working for beagle bone black platform development by following the steps given in the link, but i could not ale ot build u-boot to create MLO and image files.


After my last post Build fbtft drivers for Linux 4.4 on BeagleBone Black, I was curious what patches are needed to run mainline Linux kernel on BeagleBoard.  Here's what I've found so far:


Mainline Linux kernel


Robert C. Nelson's bb-kernel repo

"This git repo contains just scripts/patches to build a specific kernel for some ARM devices. The kernel source will be downloaded when you run any of the build scripts"


Patchset for BeagleBone:


BeagleBone Cape Manager (bone_capemgr):

Workaround: Disable DMA for SPI driver:


Related GitHub Gists:

Chicago hackerspace Pumping Station: One uses BeagleBoard to control door access:



There is BeagleBone Black on the Front Door and the Back Door:




The BeagleBone is a connected to a Sparkfun USB RFID breakout with a ID-12 RFID Reader.  This scans the RFID keys:


[More photos]


PS1 president Derek Bever and other members are collaborating on this GitHub repo:


Client-side RFID authentication (and general access control)

This system is built on a BeagleBone Black and Sparkfun's USB board for RFID readers for hardware, and PS1Auth's server-side RFID authentication on the backend.

Client-side software is written in Go.


In previous blog posts, I've showed how to use small LCD displays as a Linux framebuffer on the BeagleBone Black thanks to the fbtft drivers:


In this post, I will show how to use fbtft drivers on BBB with the latest version of the Linux kernel.  In this case, that is Linux 4.4.

Full transcript in this GitHub Gist.



Step 1: Build kernel

Clone Robert C. Nelson's bb-kernel repo and checkout the am33x-v4.4 branch.  When I did last week, the latest kernel version was 4.4-rc1-bone0:

laptop$ git clone


laptop$ cd bb-kernel/


laptop$ git checkout am33x-v4.4


laptop$ ./


The build kernel script will at some point open the kernel config menu system.  Enable Device Drivers->Staging->fbtft:





Step 2: Install kernel

Flash latest Debian 8.2 (Jessie) console image for the BBB:

laptop$ wget


laptop$ xz -d bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz


laptop$ sudo dd if=/home/afustini/Downloads/bbb-images/bone-debian-8.2-console-armhf-2015-11-15-2gb.img.xz of=/dev/sdc


laptop$ sudo eject /dev/sdc


Remove and re-insert so that fs gets mounted.  Run this from bb-kernel directory:

laptop$ ./tools/


Eject card and boot the BeagleBone with it.  Once booted, grow the filesystem to make use of free space on the card:

bone$ sudo /opt/scripts/tools/


bone$ sudo reboot


Finish installation of the new kernel on the BeagleBone.  The install script fails to do this.  In this case, my new kernel is 4.4.0-rc1-bone0:

bone$ sudo cp -pr /dtbs /boot/dtbs/4.4.0-rc1-bone0


bone$ sudo cp /zImage /boot/vmlinuz-4.4.0-rc1-bone0


Edit /boot/uEnv.txt on Beaglebone so that the new kernel is booted:

bone$ sudo vi /boot/uEnv.txt




bone$ sudo reboot


Verify the the BeagleBone booted the new kernel:

bone$ uname -a

Linux beaglebone 4.4.0-rc1-bone0 #4 Thu Nov 19 20:26:04 CST 2015 armv7l GNU/Linux



Step 3: Configure SPI


Build the latest Device Tree Overlays:

bone$ sudo apt-get update


bone$ sudo apt-get install git


bone$ git clone


bone$ cd


bone$ ./


bone$ ./

Load the Device Tree Overlay for BB-SPIDEV1 "virtual cape" as my LCD is wired up to spi1 pins:

bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF----  -1

1: PF----  -1

2: PF----  -1

3: PF----  -1

bone$ sudo /bin/sh -c 'echo BB-SPIDEV1 > /sys/devices/platform/bone_capemgr/slots'

bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF----  -1

1: PF----  -1

2: PF----  -1

3: PF----  -1

4: P-O-L-  0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1



Step 4: Load fbtft drivers


Load fbtft_device module for adafruit18 (Adafruit 1.8" TFT LCD) which will use the fb_st7735r driver:

bone$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60

Display image on the LCD display:

bone$ sudo apt-get install fbi

bone$ wget ''

bone$ sudo fbi -d /dev/fb0 -T 1 -a BorisTux_w_Logo.png


Texas Instruments has their own Linux kernel repo with branches to support their processors such as the Sitara AM3358 in the BeagleBone Black:


Gitorious@TI: ti-linux-kernel

This repo contains a Linux kernel that has been integrated with outstanding TI open source patches based on the open source Linux kernel found at

Here is a good presentation for TI TechDay 2015 on how TI handles Linux engineering.


The most excellent Robert C. Nelson has made it very easy to run TI kernels on your BeagleBone Black by using his ti-linux-kernel-dev repo.  The newest branch is ti-linux-4.1.y.  While current stable is 4.3, TI is working on 4.1 as it is current Long Term Support (LTS) kernelLinux 4.4 is expected to be released at the end of the year, and that will become the new LTS kernel.  I believe TI will then move forward to that.


A big advantage of moving to Linux 4.1 is that the fbtft drivers are now in the Linux kernel: drivers/staging/fbtftLast December, Thomas Petazzoni of Free Electrons took it upon himself to add notro's fbtft drivers to the kernel: [PATCH 00/29] staging: add drivers from the fbtft project.  Development in notro's repo has ceased and moved to the Linux kernel drivers staging treefbtft is maintained by Noralf Trønnes (notro) & Thomas Petazzoni.


Here are the steps that I followed.  Full transcript is in my GitHub Gist.


Step 1: Build kernel

These commands were on my 64-bit Intel laptop running Debian GNU/Linux 8.2:

laptop$ git clone

Cloning into 'ti-linux-kernel-dev'...

remote: Counting objects: 6549, done.

remote: Compressing objects: 100% (56/56), done.

remote: Total 6549 (delta 37), reused 0 (delta 0), pack-reused 6493

Receiving objects: 100% (6549/6549), 5.21 MiB | 3.17 MiB/s, done.

Resolving deltas: 100% (5036/5036), done.

Checking connectivity... done.



laptop$ cd ti-linux-kernel-dev


laptop$ git checkout ti-linux-4.1.y

Branch ti-linux-4.1.y set up to track remote branch ti-linux-4.1.y from origin by rebasing.

Switched to a new branch 'ti-linux-4.1.y'


laptop$ ./

After running for awhile, will invoke the kernel config menu.  Enable the fbtft modules located in the Device Drivers -> Staging menu.  Here are photos of kernel config menus:





Step 2: Flash SD card

Flash a Debian 8.2 (Jessie) Snapshot console image from the BeagleBoneBlack Debian page on the wiki:

laptop$ sudo dd if=bone-debian-8.2-console-armhf-2015-10-11-2gb.img of=/dev/sdc

3481600+0 records in

3481600+0 records out

1782579200 bytes (1.8 GB) copied, 686.836 s, 2.6 MB/s


laptop$ sudo eject /dev/sdc


Step 3: Install new kernel

Re-insert SD card so that its filesystem is mounted.  Run the kernel install script from your ti-linux-kernel-dev directory:

laptop$ sudo ./tools/

Unmount and eject the SD card:

laptop$ sudo umount /dev/sdc1

laptop$ sudo eject /dev/sdc

Insert SD card into BeagleBone Black and boot it.


The install script fails to do the following so it must be done manually.  Copy the kernel image and device tree bindings to the expected location:

bone$ sudo cp /zImage /boot/vmlinuz-4.1.13-ti-r30

bone$ sudo cp -pr /dtbs /boot/dtbs/4.1.13-ti-r30


Edit /boot/uEnv.txt to set uname_r=4.1.13-ti-r30 and set dtb=am335x-boneblack-overlay.dtb:

bone$ sudo vi /boot/uEnv.txt



Run script to grow filesystem to make use of the SD cards full capacity:

bone$ cd /opt/scripts/tools

bone$ sudo ./

Reboot the BeagleBone:

bone$ sudo reboot


After rebooting, verify that the new kernel is running:

bone$ uname -a

Linux beaglebone 4.1.13-ti-r30 #1 SMP PREEMPT Mon Nov 16 00:50:22 CST 2015 armv7l GNU/Linux


Step 4: Enable SPI

Now build & install the latest Device Tree Overlays from repo:

bone$ git clone

bone$ cd

bone$ ./

bone$ ./


Enable the spi1 peripheral (which LCD is wired up to) by loading the BB-SPIDEV1 Device Tree overlay:

bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF---- -1

1: PF---- -1

2: PF---- -1

3: PF---- -1


bone$ sudo /bin/sh -c 'echo BB-SPIDEV1 > /sys/devices/platform/bone_capemgr/slots'


bone$ cat /sys/devices/platform/bone_capemgr/slots

0: PF---- -1

1: PF---- -1

2: PF---- -1

3: PF---- -1

4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-SPIDEV1


Step 5: Load fbtft driver

Load the fbtft_device kernel module for adafruit18 (Adafruit 1.8" TFT LCD) which will then load the fb_st7735r driver:

bone$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60


Install fbi to display image on the LCD:

bone$ sudo apt-get update

bone$ sudo apt-get install fbi


bone$ wget ''

bone$ sudo fbi -d /dev/fb1 -T 1 -a BorisTux_w_Logo.png


My previous post showed how to use small TFT LCDs as a Linux framebuffer on a BeagleBone Black:


BeagleBone Black LCDs with Prebuilt FBTFT drivers


I showed how to use pre-built fbtft kernel modules to provide the necessary Linux device driver.  However, what if you want to use fbtft modules with a newer version of the Linux kernel?


The BeagleBone Black currently ships with a Linux 3.8 kernel built from Robert C. Nelson's am33x-v3.8 branch.  I do also have fbtft working on the BBB with newer kernels such as TI's 4.1 branch and mainline 4.4-rc1, but I will focus on Linux 3.8 for this post.


Here is how I built FBTFT for Linux 3.8.13-bone79 kernel:

(for my complete transcript see this GitHub Gist)


Step 1: Clone repo & checkout branch

Clone bb-kernel repo & checkout am33x-v3.8 branch

$ git clone


$ cd bb-kernel


$ git checkout am33x-v3.8

Already on 'am33x-v3.8'

Your branch is up-to-date with 'origin/am33x-v3.8'.


Step 2: Run build script

Move into the new branch directory & run the build kernel script:

$ ./



make -j4 ARCH=arm LOCALVERSION=-bone79 CROSS_COMPILE="ccache /home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-" dtbs



Script Complete


Step 3: Add fbtft drivers

Add fbtft drivers into Linux kernel source based on instructions from fbtft README.


From within the bb-kernel dir:

$ cd KERNEL/drivers/video



$ git clone

Cloning into 'fbtft'...

remote: Counting objects: 1170, done.

remote: Total 1170 (delta 0), reused 0 (delta 0), pack-reused 1170

Receiving objects: 100% (1170/1170), 526.16 KiB | 0 bytes/s, done.

Resolving deltas: 100% (726/726), done.

Checking connectivity... done.


Add to KERNEL/drivers/video/Kconfig:

source "drivers/video/fbtft/Kconfig"


Add to KERNEL/drivers/video/Makefile:

obj-y += fbtft/

Verify files were modified correctly

$ git diff

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig

index a0c757a..50c5d62 100644

--- a/drivers/video/Kconfig

+++ b/drivers/video/Kconfig

@@ -2494,4 +2494,6 @@ config FB_SSD1307

  This driver implements support for the Solomon SSD1307

  OLED controller over I2C.


+source "drivers/video/fbtft/Kconfig"



diff --git a/drivers/video/Makefile b/drivers/video/Makefile

index 28bfbca..6bd03af 100644

--- a/drivers/video/Makefile

+++ b/drivers/video/Makefile

@@ -174,3 +174,6 @@ obj-$(CONFIG_DISPLAY_TIMING) += display_timing.o

obj-$(CONFIG_OF_DISPLAY_TIMING) += of_display_timing.o

obj-$(CONFIG_VIDEOMODE) += videomode.o

obj-$(CONFIG_OF_VIDEOMODE) += of_videomode.o


+obj-y += fbtft/



Step 4: Rebuild kernel

Now run the rebuild script to compile the fbtft modules:

$ ./tools/

+ Detected build host ["Fedora release 22 (Twenty Two)"]

+ host: [x86_64]

+ git HEAD commit: [a50680ea2cc2fc4519353dee4c1cbb47e475d8b2]



The kernel config menu should appear shortly after starting the rebuild script.  Follow these screenshots to select the fbtft drivers:





After exit the kernel config menu, the rebuild script should continue:

‘.config’ -> ‘/home/afustini/dev/bbb/bb-kernel/patches/defconfig’


make -j4 ARCH=arm LOCALVERSION=-bone79 CROSS_COMPILE="ccache /home/afustini/dev/bbb/bb-kernel/dl/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-" zImage modules


scripts/kconfig/conf --silentoldconfig Kconfig


Script Complete


Verify in bb-kernel dir that fbtft modules were compiled:

$ find |grep fbtft |grep ko$







Verify in bb-kernel/deploy that kernel and tarballs were created

$ ls -ltar deploy/

-rwxrwxr-x 1 afustini afustini 5552136 Oct 31 13:01 3.8.13-bone79.zImage

-rw-rw-r-- 1 afustini afustini 110207 Oct 31 13:01 config-3.8.13-bone79

-rw-rw-r-- 1 afustini afustini 11690719 Oct 31 13:01 3.8.13-bone79-modules.tar.gz

-rw-rw-r-- 1 afustini afustini 1263879 Oct 31 13:01 3.8.13-bone79-firmware.tar.gz

-rw-rw-r-- 1 afustini afustini 39642 Oct 31 13:01 3.8.13-bone79-dtbs.tar.gz


Step 5: Install new kernel on SD Card (from Linux host)

My SD card already had been imaged with:


From within bb-kernel dir

$ sudo ./tools/

ERROR: MMC is not defined in


Edit script to specify which device is your SD card:

$ vi


Install new kernel onto microSD card:

$ sudo ./tools/


Installing 3.8.13-bone79-modules.tar.gz to /dev/sdd2

info: [3.8.13-bone79] now installed...

This script has finished...

For verification, always test this media with your end device...


Step 6: Boot new kernel

Boot BBB with the updated microSD card:

$ dmesg| head

[ 0.000000] Booting Linux on physical CPU 0x0

[ 0.000000] Initializing cgroup subsys cpu

[ 0.000000] Linux version 3.8.13-bone79 (XXXX@YYYY) (gcc version 4.7.3 20130328 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04) ) #4 SMP Sat Oct 31 13:00:55 CDT 2015


$ uname -a

Linux beaglebone 3.8.13-bone79 #4 SMP Sat Oct 31 13:00:55 CDT 2015 armv7l GNU/Linux


$ find /lib/modules/3.8.13-bone79/|grep fbtft







Edit u-boot config file uEnv.txt so the SPIDEV1 loads at boot and HDMI & eMMC are not loaded




For reference, this is my uEnv.txt


Verify that HDMI & eMMC are not loaded and SPIDEV1 is loaded:

NOTE: My BBB has no need for HDMI or eMMC. It may not be completely necessary to disable, but I did not investigated this.

$ cat /sys/devices/bone_capemgr.9/slots

0: 54:PF---

1: 55:PF---

2: 56:PF---

3: 57:PF---

4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G

5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN

7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV1


Step 7: Load fbtft driver & test display:

Photos of breadboard wiring using SPI1 (CS0, MOSI, SCLK), D/C, RESET.


Load fbtft st7735r driver for adafruit18 (Adafruit 1.8" TFT LCD display):

$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60


Console should now appear on the display. Refer to photos.


NOTE: if you have not already done, so run script to make sure all the free space on SD card can be utilized

$ sudo /opt/scripts/tools/


NOTE: apt-get may fail with warning "There is no public key available for the following key IDs". Fix by running running:

$ sudo apt-get install debian-keyring debian-archive-keyring

$ sudoe apt-get update


Display image file on the display with fbi:

$ sudo apt-get install fbi

$ wget

$ sudo fbi -d /dev/fb0 -T 1 -a tux.png

using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf


Play video clip on the display with mplayer:

$ sudo apt-get install mplayer

$ wget

$ sudo mplayer -nolirc -vo fbdev:/dev/fb0 scale=WIDTH:128 hst_1.mpg


Kernel log with verbose debug output for adafruit18:

If using the Adafruit 2.2" TFT LCD display, then specify adafruit22a [note: the "a" suffix is important]

$ sudo modprobe fbtft_device busnum=1 name=adafruit22a debug=7 verbose=3 gpios=dc:48,reset:60


fbi and mplayer all work OK for adafruit22a.  Kernel log with verbose debug output for adafruit22a:



BeagleBone Black using Prebuilt FBTFT drivers



Step 1: Download, Flash & Boot Image


Download bone-debian-7.5-2014-05-14-2gb image:

Write image to SD card.  Here is example on my Linux laptop:

$ sudo dd if=/home/afustini/Downloads/bone-debian-7.5-2014-05-14-2gb.img of=/dev/sdc


Boot the BeagleBone with the microSD card and verify it is running Linux kernel 3.8.13-bone50:

$ cat /proc/version

Linux version 3.8.13-bone50 (root@imx6q-wandboard-2gb-0) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Tue May 13 13:24:52 UTC 2014


$ cat /etc/dogtag BeagleBone Debian Image 2014-05-14



Step 2: Expand SD card to ensure full capacity


Run script to grow the filesystem as root on BeagleBone:

$ sudo /opt/scripts/tools/


sfdisk: backing up partition layout.

sfdisk: initial calculation.


Disk /dev/mmcblk0: 242560 cylinders, 4 heads, 16 sectors/track

Old situation:

Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0



Re-reading the partition table ...

BLKRRPART: Device or resource busy

The command to re-read the partition table failed.

Run partprobe(8), kpartx(8) or reboot your system now,

before using mkfs

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)

to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1

(See fdisk(8).)


Reboot the BeagleBone and verify that the root filesystem now is using the entire capacity of the the microSD card:

$ df -h

Filesystem Size Used Avail Use% Mounted on

rootfs 7.2G 1.6G 5.4G 22% /




Step 3: Install prebuilt fbtft drivers

Download the prebuilt fbtft kernel modules:

$ wget


Install the kernel modules:

$ sudo tar -zxPvf fbtft-2014-02-07-3.8.13-bone50.tar.gz





$ sudo depmod

Verify the modules are for 3.8.13-bone50:

$ modinfo fbtft


filename: /lib/modules/3.8.13-bone50/extra/fbtft.ko

license: GPL

srcversion: 3C6839F44999EEA4C1D8A9F


vermagic: 3.8.13-bone50 SMP mod_unload modversions ARMv7 thumb2 p2v8

parm: debug:override device debug level (ulong)

parm: dma:Use DMA buffer (bool)

Edit /boot/uboot/uEnv.txt to disable HDMI & eMMC "virtual capes" and enable SPIDEV1 "virtual cape":

$ sudo vi /boot/uboot/uEnv.txt


Uncomment this cape_disable line for HDMI & eMMC:

##BeagleBone Black:

##Disable HDMI/eMMC


Add this line to enable SPIDEV1:



Save the changes uEnv.txt & reboot the BeagleBone



Step 4: Load fbtft driver


Verify which capes are loaded:

$ cat /sys/devices/bone_capemgr.9/slots


0: 54:PF---

1: 55:PF---

2: 56:PF---

3: 57:PF---

4: ff:P-O-- Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G

5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI

6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN

7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPIDEV1

Use fbtft_device kernel module to load the fb_st7735r driver for Adafruit 1.8" TFT LCD display connected to SPI1:

$ sudo modprobe fbtft_device busnum=1 name=adafruit18 debug=7 verbose=3 gpios=dc:48,reset:60


Use fbtft_device kernel module to load the fb_ili9340 driver for Adafruit 2.2" TFT LCD display connected to SPI1:

$ sudo modprobe fbtft_device busnum=1 name=adafruit22a debug=7 verbose=3 gpios=dc:48,reset:60

NOTE: a suffix is important in adafruit22a


/dev/fb0 device should now exist:

$ ls -lsda /dev/fb*

0 crw-rw---T 1 root video 29, 0 Oct 30 06:27 /dev/fb0


The system console should now be displayed on the LCD:


More photos of fbtft working for 1.8" & 2.2" TFT LCDs


Example kernel log:

[ 181.848604] fbtft_device: SPI devices registered:

[ 181.848671] fbtft_device: spidev spi1.1 16000kHz 8 bits mode=0x00

[ 181.848705] fbtft_device: spidev spi1.0 16000kHz 8 bits mode=0x01

[ 181.848728] fbtft_device: 'fb' Platform devices registered:

[ 181.848860] fbtft_device: omapfb id=-1 pdata? yes

[ 181.849152] fbtft_device: Deleting spi1.0

[ 181.851923] fbtft_device: GPIOS used by 'adafruit22a':

[ 181.851960] fbtft_device: 'dc' = GPIO48

[ 181.851982] fbtft_device: 'reset' = GPIO60

[ 181.852002] fbtft_device: SPI devices registered:

[ 181.852033] fbtft_device: spidev spi1.1 16000kHz 8 bits mode=0x00

[ 181.852061] fbtft_device: fb_ili9340 spi1.0 32000kHz 8 bits mode=0x00

[ 182.235255] Console: switching to colour frame buffer device 60x53

[ 182.236682] graphics fb0: fb_ili9340 frame buffer, 240x320, 150 KiB video memory, 4 KiB DMA buffer memory, fps=20, spi1.0 at 32 MHz



Step 5: Display images and video


Based on FBTFT Wiki article: Framebuffer use


When using a fresh Debian image, one should first update the list of available packages before attempting to install new packages:

$ sudo apt-get update

Reading package lists... Done

W: There is no public key available for the following key IDs:


Fix public key ID warning:

$ sudo apt-get install debian-keyring debian-archive-keyring


$ sudo apt-get update

Install fbi utility to display image files on the framebuffer device:

$ sudo apt-get install fbi


$ wget


$ sudo fbi -d /dev/fb0 -T 1 -a tux.png

using "DejaVu Sans Mono-16", pixelsize=16.67 file=/usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf

Tux the Linux mascot should now be displayed on the LCD:


More photos of fbtft working for 1.8" & 2.2" TFT LCDs

Next, install mplayer to play a MPEG-2 video clip:

$ sudo apt-get install mplayer


$ wget


$ sudo mplayer -nolirc -vo fbdev:/dev/fb0 scale=WIDTH:128 hst_1.mpg

MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team


Playing scale=WIDTH:128.

File not found: 'scale=WIDTH:128'

Failed to open scale=WIDTH:128.



Playing hst_1.mpg.

libavformat version 53.21.1 (external)

Mismatching header version 53.19.0

MPEG-ES file format detected.

VIDEO: MPEG1 320x240 (aspect 1) 29.970 fps 320.0 kbps (40.0 kbyte/s)

Load subtitles in ./


Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family

libavcodec version 53.35.0 (external)

Mismatching header version 53.32.2

Selected video codec: [ffmpeg1] vfm: ffmpeg (FFmpeg MPEG-1)


Audio: no sound

Starting playback...

Unsupported PixelFormat 61

Unsupported PixelFormat 53

Unsupported PixelFormat 81

Could not find matching colorspace - retrying with -vf scale...

Opening video filter: [scale]

Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.

[swscaler @ 0xb670f978]No accelerated colorspace conversion found from yuv420p to rgb565le.

[swscaler @ 0xb670f978]using unscaled yuv420p -> rgb565le special converter

VO: [fbdev] 320x240 => 320x240 BGR 16-bit

framebuffer too small for double-buffering, disabling

V: 19.0 570/570 20% 65% 0.0% 0 0



Exiting... (End of file)


You should now see the video clip playing on the display:


Borissmall-tor-bbb.jpgTor logo

My Tor relay running on a BeagleBone Black is even faster after upgrading to Debian 8 (Jessie) and tor 0.2.6 package for Jessie:

15 - 1.jpg

Thanks to Alison Macrina of the Library Freedom Project for the motivation to upgrade after watching her inspiring talk during the Aaron Swartz's Day 2015 celebration at Internet Archive last weekend:


A quick aside, if you've not seen this documentary about Aaron's life, then please be sure to watch it:

And... thanks to Comcast.  Despite their past sins, I've been able to run a Tor exit node (e.g. exit relay) via my cable modem connection for 1.5 years with no problems.  My connect is 50 Mbps down and 10 Mbps up.


My current Tor config


Previous version

My BBB had previously been running Debian 7 (Wheezy) for which package was 0.2.4.

Reduced Exit Policy

If you run a Tor exit node, then I recommend using this Reduced Exit Policy which will limit BitTorrent traffic (and thus DMCA complaints):


Debian 8 image

My BeagleBone Black is running this Debian 8.2 (Jessie) image from Robert C Nelson listed on

Jessie Snapshot console

Flasher: (console) (BeagleBone Black/Green eMMC):


sha256sum: 3c489ef2d6809a7b50396d16770752a8c067478680946428d12a747bb8c4688f


I've not posted about my Tor relay on element14 Community before, so I figure I should provide some context.


Last year I did a presentation at my hackerspace about how to run a Tor relay on a BeagleBone Black:



If that Meetup link breaks over time, then here is a GitHub Gist all my notes and links:



I was inspired to run a Tor relay after watching these talks:




Tor for users


Talks by Josh Datko about Tor & BeagleBone

How Tor works

Tor Hardware Hacking


Tor on BeagleBone blog posts:


Run a your own Tor relay!


Stats for my BeagleBone Black relay

Notes for Tor Relay running as Exit Node


Not into running a Tor relay home?

# file: /etc/tor/torrc

ORPort 443

Exitpolicy reject *:*

Nickname EFFisMyHero

ContactInfo pdp7pdp7 AT gmail dot com GPG: 0x84D44A9317F1138E

Log notice file /var/log/tor/notices.log

RelayBandwidthRate 1024 KB

RelayBandwidthBurst 1024 KB

MaxAdvertisedBandwidth 1024 KB

DisableDebuggerAttachment 0

Stats for my EFFisMyHero relay on DigitalOcean:


Not into running your own Tor relay?