Resources
Cloud9 Credentials
Install Python
First verify that python is installed on the BBB
username: debian; password: temppwd
Introduction
Because the BBB is an offline system, installation of any Python software must be completed via SFTP and Cloud9.
Connecting to Internet
sudo nano /etc/resolv1.conf Add nameserver ###.###.###.### (copy this from a network attached PC) sudo mv /etc/resolv1.conf /etc/resolv.conf sudo nano /etc/network/interfaces consider using connmanctl?
If gateway not added, enter sudo route add default gw ###.###.###.###
Following the
Notes on programs for the CES drone-worthy NO2 instrument
7/10/25
The Beaglebone will have a Linux-based operating system: Debian.
To use the Ocean Optics SR6, we need to install a python program, called python-seabreeze. I need to figure out what the distribution flavor of Debian is because the instructions call for a different line code to install the drivers depending on ‘distribution flavor’ of the Linux operating system. I think it will use the .deb packages.
So this will be the suitable code to install the packages for python-seabreeze:
1) Setup Linux
>>sudo apt-get install git-all build-essential libusb-dev
2) Prepare pip
>> python -m pip install --upgrade pip
3) Finally we can clone and install python-seabreeze:
>>git clone https://github.com/ap--/python-seabreeze.git python-seabreeze
>>cd python-seabreeze
>>python -m pip install .
This should install seabreeze in your python environment.
4)
Operating System dependent setup Additional installation steps required by the specific operating system should be done by running the script provided by python-seabreeze. After installing via pip or conda or manually, run:
>>seabreeze_os_setup
BBB for CES setup instructions - DRAFT - 28Oct2025[30].docx
507.5 KB
How-to Guide for setting up a Beaglebone Black (BBB) for a CES instrument
Last updated: October 28, 2025
Introduction: The CES instruments developed at NOAA CSL use the Beaglebone Black to control the electronics, save data, and communicate with the user. The BBB was originally selected in ~2020 over something like a Raspberry Pi because it had been previously used effectively in the NOAA POPS instrument development, and it was just easier to copy them. However, in retrospect, it also does have a lot more I/O ports than a Pi, as well as some other benefits, so we will likely keep using it, despite the smaller online community than the Pi.
The original mACES used a BBB with Debian 10 Linux and some custom code written in C. It was not especially robust, and so in 2025, we have been attempting to improve the code, with the first step being to update to the latest Linux kernel (Debian 13). There are a number of substantial changes that have occurred between Debian 10 and Debian 13, some of which have completely invalidated the Getting Started instructions on Beaglebone’s own website (!!), as well as many online help forums from before ~2023. Therefore, this document serves as a record of the optimized method for setting up a BBB for CES instruments.
There are 4 major steps:
1) Install the latest Debian OS
2) Install additional software needed for the CES instrument
3) Install additional python libraries needed for the CES instrument
4) Configure the BBB with certain overlays and autostart scripts
You will need the following items:
- A BeagleBone Black
- A USB-to-miniUSB cable, which should have come with in the BBB box. (Yes, a miniUSB cable, not a microUSB or a USB-C cable!)
- An ethernet cord, and access to an ethernet plug (i.e. your router)
- A microSD card with at least 8 GB storage
- If you don’t have a microSD card slot on your computer, you will need an adapter. Something like would probably work.
A final note: I’ve tried to make this accessible to people who don’t have a ton of experience with Unix, Linux, BBB, or Python. I am also not an expert, so I’m not saying these are the absolute best ways to do this, but this is what worked for me. Any text in this font is code typed directly into the BBB terminal
Install the latest Debian OS:
Note: The first steps described below are actually pretty well described by the . - Download the latest image by going and choosing Beaglebone Black from the dropdown menu labeled Filter Software Distribution. At the time of this writing, the latest version was BeagleBone Black Debian 13 2025-09-05 IoT (v6.16.x). It’s a lightweight Linux distribution that doesn’t provide a GUI, which is fine with us. - Download the image to your computer.
- Install the free program on your computer (or use another similar program if you prefer). - Insert the microSD (via an adapter, if necessary) into your computer.
- Open balenaEtcher, select the image file you downloaded, and choose the microSD as the location to write the image. Click “Flash!” and wait until it finishes.
- Remove the microSD card from your computer, and put it in the microSD card slot on the BBB. Do not power the BBB on yet!
- While holding down the BOOT button (see picture above), apply power. You can either do this with the 5V power jack, or just by connecting the USB-to-miniUSB to your computer via the USB Client port labeled above. (Don’t be tempted to use the port labeled USB Host yet. That’s for something else.)
- The 4 blue LEDs will light up and stay solid. KEEP HOLDING THE BOOT BUTTON! Don’t release it until the 4 blue LEDs start blinking, which takes about 10 seconds or so. Then you can release it. Wait about few minutes. The lights will turn off, then all four light up again during this period. Don’t panic, this is fine. You don’t need to be holding the BOOT button for that step.
At this point, the official instructions cease to be helpful. In the early days of BBB, you simply navigated in a browser on your computer to 192.168.7.2 (the IP address of the BBB), and the Cloud9 IDE would automatically show up and allow you to interact with the BBB. Apparently Amazon has shuttered Cloud9 and the newest Debian images don’t ship with the Cloud9 server program anymore. Now the instructions say to navigate in a browser to 192.168.7.2:3000 and you will automatically have access to an alternative: Visual Studio Code IDE. This is false. It will not load automatically. You need to take additional steps to enable this, but even when you do, the (allegedly lightweight) VSCode Server program that runs on the BBB is still very bloated and runs very slowly. I recommend the following alternative: Install the regular VSCode on your laptop, and enable tunneling via SSH (more instructions on that later), which will provide a mirrored IDE.
However, to set this up, you will first need access to the BBB via a basic SSH connection, so let’s do that now. Linux and Mac users can simply use the Terminal (type sudo ssh ), while PC users can technically do the same in Command, but may find using a program such as PuTTY easier.
- Connect to the BBB via SSH. It will ask for the password (BBBs ship with the default password “temppwd”, but will ask you to change the password immediately).
- Confirm that you have successfully booted Debian 13 off the microSD card by typing “cat /etc/dogtag” and you should see something that matches the image you downloaded: BeagleBoard.org Debian Trixie Base Image 2025-09-05.
- Now you need to flash this version to the eMMC (i.e. the onboard memory), so that in the future, you don’t need to boot off the microSD card each time. Navigate to the /boot directory (cd /boot) and open up the uEnv.txt file with vi (sudo vi uEnv.txt). Scroll down to the very last two lines, which should be something like this:
##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher
- Uncomment the last line:
##enable Generic eMMC Flasher:
cmdline=init=/usr/sbin/init-beagle-flasher
- Save the file (type :wq and hit enter, if you are not familiar with vi)
Side note: This version of Debian 13 doesn’t have vim, only vi. If you are used to treating them , and mostly doing all your editing in INSERT mode, like I was, keep in mind that old-school vi doesn’t recognize arrow keys correctly when in INSERT mode. We’ll install vim in the next section, so my suggestion for this step only is to not go into INSERT mode at all. Just stay in to hover your cursor over the “#” you want to delete and type “x” to delete the single character.
- Turn off the BBB (sudo shutdown -h now, followed by the password) and wait until the all the lights turn off. Do not remove the microSD card.
- Now you need to boot off the microSD card one more time, so that this time it copies to the eMMC, as we instructed it to do when we changed the uEnv file. Repeat the step starting with “While holding down the BOOT button…”. In this case, your USB cable is still probably plugged in, so you can power up by pressing the POWER button (see picture) rather than unplugging and replugging the cable. You only have two hands, after all.
- Unlike last time, the LEDs will soon enter a sequential siren-like pattern (left-to-right-to-left etc). This is a sign that the flashing to the eMMC is working correctly. Wait for this to finish. It may take more than 15 minutes. The BBB will turn off when it is done and all the lights will be off.
- Now, remove the microSD from the BBB. Start up the BBB again with the power button. Now you do NOT need to hold down the BOOT button, and won’t need the BOOT button again!
- After it starts up, connect via SSH again, and read the dogtag again (see above) to confirm the correct version is loaded. If so, you have successfully installed the latest Debian OS, and we are on to part 2.
Install additional software needed for the CES instrument:
Note: You absolutely need the internet for this section, no way around it. The official BBB website has occasionally made reference to being able to forward internet from your laptop via the USB, but I’ve never been able to figure this out. The only way I have ever been able to do this is to directly connect via an ethernet cord. On home networks, I believe that the BBB is smart enough to assign itself an IP address, but this is more complicated when trying to connect to a network such as at NOAA or at a university. I don’t pretend to be an expert in networking, so it might be easiest to just take your BBB home and plug in to your house’s router. You won’t always need the internet once the BBB is set up, so it doesn’t have to be a permanent solution.
- Connect to your BBB via SSH
- Connect your ethernet cable from the BBB to your ethernet port or router and confirm your internet is working (i.e. type ping google.com in the terminal and you should get a response back.
- First, check for any updates to the BBB that have been released since the Debian image was release (Sept 5, 2025, in this example). Type sudo apt update and wait for it to give you a list of upgrades available. Then type sudo apt upgrade to actually install them.
- Now let’s install vim: sudo apt install vim. Now you can use arrow keys within vim to your heart’s delight.
- Next is installing the updated python virtual environment software, which you can read more about : sudo apt install python3.13-venv - Next is installing libopenblas-dev, which you’ll need for the spectrometer to open: sudo apt install libopenblas-dev
- WILL FILL THIS IN MORE LATER
Install additional python libraries needed for the CES instrument:
- You now need to create a python virtual environment in the home folder. Navigate to /home/debian and type “python -m venv .CES-env”. It takes about 30 seconds to do it.
- Type “source .CES-env/bin/activate” and then your command line should look like this:
(.CES-env) debian@BeagleBone:~$
- You are now in your virtual python environment and can install all the libraries you need using pip.
- Install numpy: pip install numpy
- Install seabreeze: pip install seabreeze[pyseabreeze]
- Then you need to run its extra installation script: type “seabreeze_os_setup” and type y when it asks you if it can install 10.oceanoptics.rules.
- Install gpiod: pip install gpiod
- WILL FILL THIS IN MORE LATER
Configure the BBB with certain overlays and autostart scripts:
- Go back to the /boot folder and open the uEnv file again (sudo vi uEnv.txt)
- Uncomment the line that says: #enable_uboot_overlays=1 to remove the # sign
- A few lines below that, you’ll see the following text:
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr0=<file0>.dtbo
- Uncomment the first two and add the following dtbo file names, which will enable the uart ports we need. They are already installed, the BBB just needs to know to read them
uboot_overlay_addr0=BB-UART1-00A0.dtbo
uboot_overlay_addr0=BB-UART2-00A0.dtbo
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr0=<file0>.dtbo
- Then scroll further down to where you see this text:
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
- Remove the # signs in front of the 2nd, 3rd, and 4th lines (disable the video, audio, and wireless, because we need those ports for other things)
- Save the file and reboot (sudo reboot)
- THERE WILL BE MORE HERE LATER