Project Overview
This report documents the installation of Debian 13.5 on a BeagleBone Black and the configuration of its CAN Bus interface using an SN65HVD230 transceiver.
The primary motivation for upgrading the operating system was CAN Bus support: the previously installed Debian 7.8 did not support SocketCAN, making a fresh OS installation necessary. The installation was performed by booting from a microSD card, then migrating the OS to the internal eMMC flash memory for long-term stability.
BBB vs Raspberry Pi & Similar Boards
The BeagleBone Black is targeted at embedded and industrial applications. Here is how it compares to mainstream alternatives like the Raspberry Pi 4/5.
| ✅ Advantages | ❌ Disadvantages |
|---|---|
| Programmable Real-Time Units (PRU) — deterministic hard real-time I/O without an RTOS | Only 512 MB RAM — limiting for modern workloads |
| Open hardware — full schematics publicly available | Slower CPU (1 GHz Cortex-A8) vs RPi 4 (1.8 GHz Cortex-A72) |
| Industrial-grade reliability, wide voltage tolerance | Smaller community and ecosystem than Raspberry Pi |
| Built-in eMMC — stable boot without SD card | Only 4 GB eMMC — most consumed by OS |
| Native CAN Bus support via SocketCAN | No built-in Wi-Fi or Bluetooth |
| Rich header: I2C, SPI, UART, ADC, PWM, GPIO | No GPU — not suited for desktop or media use |
| Low power consumption — ideal for embedded deployment | Fewer ready-made HATs/shields vs Raspberry Pi |
The PRU (Programmable Real-Time Unit) subsystem is the BBB's strongest advantage over the Raspberry Pi. It allows precise microsecond-level timing for protocols like CAN, without the latency jitter of a general-purpose OS — something the RPi cannot reliably achieve.
Hardware Overview
Board Specifications
| Component | Detail |
|---|---|
| Board | BeagleBone Black (BBB) |
| Processor | TI AM335x — ARM Cortex-A8 @ 1 GHz |
| RAM | 512 MB DDR3 |
| Internal Storage | 4 GB eMMC |
| Operating System | Debian 13.5 (Trixie) IoT |
| Kernel | 6.18.32-bone35 |
CAN Bus Hardware
| Component | Detail |
|---|---|
| Transceiver | SN65HVD230 — TI CAN Bus Transceiver (3.3 V) |
| CAN Interface | CAN0 (SocketCAN) |
| TX Pin | P9.20 |
| RX Pin | P9.19 |
| LED Pin | P9.14 |
| Bitrate | 500,000 bps (500 kbps) |
Why Upgrade from Debian 7.8?
The BBB was originally running Debian 7.8 (Wheezy, 2013 — end-of-life May 2018). An upgrade was mandatory for the following reasons:
- No SocketCAN support — Debian 7.8 kernels for BBB did not include AF_CAN socket layer required for
can-utilsandip link set canX up. - Outdated kernel — the 3.x kernel series lacks modern device tree overlay support needed to activate CAN0 via
BB-CAN0-00A0.dtbo. - End-of-life — no security patches or package updates available.
- Incompatible toolchain — modern Python and build tools are not available on Debian 7.8.
Debian 13.5 (Trixie) with kernel 6.18.32-bone35 provides full SocketCAN support, up-to-date device tree overlays, and an active package repository.
Storage — eMMC Usage & SD Card
The BeagleBone Black includes 4 GB of eMMC internal flash. After installing Debian 13.5 IoT, available free space is limited.
Only ~500 MB remains free for user projects. This is sufficient for lightweight embedded applications but may be a constraint for data logging, large binaries, or compiled toolchains.
Re-enabling the SD Card for Projects
Since the OS runs from eMMC, the microSD slot is free to be used as additional storage at any time:
# Insert SD card and verify detection lsblk # Mount the SD card sudo mkdir -p /mnt/sdcard sudo mount /dev/mmcblk0p1 /mnt/sdcard # For persistent mounting — add to /etc/fstab: /dev/mmcblk0p1 /mnt/sdcard auto defaults,nofail 0 2
Debian 13.5 Installation
Image Selection
Selected from beagleboard.org/distros:
- Image: BeagleBone Black Debian 13.5 2026-05-19 IoT (v6.18.x)
- Kernel branch: am33x-v6.18
- U-Boot: v2022.04-bbb.io-am335x-am57xx
Writing to SD Card
xzcat bone-debian-13.5-*.img.xz | sudo dd of=/dev/sdX bs=4M status=progress sync
Migrating to eMMC
After booting from SD, the image was copied directly to eMMC:
dd if=/mnt/usb/am335x-debian-13.5-base-v6.18-armhf-2026-05-19-4gb.img \ of=/dev/mmcblk1 bs=4M status=progress sync
Boot Partition & fstab Fix
# Copy boot partition sudo dd if=/dev/mmcblk0p1 of=/dev/mmcblk1p1 bs=4M status=progress # Fix fstab — change mmcblk0 → mmcblk1 sudo mount /dev/mmcblk1p3 /mnt sudo sed -i 's/mmcblk0/mmcblk1/g' /mnt/etc/fstab
Verification
After removing the SD card and rebooting:
lsblk mmcblk1 179:0 0 3.6G 0 disk ├─mmcblk1p1 179:1 0 36M 0 part /boot/firmware ├─mmcblk1p2 179:2 0 512M 0 part [SWAP] └─mmcblk1p3 179:3 0 3G 0 part /
Root filesystem (/) is mounted on mmcblk1p3 (eMMC). SD card no longer present — system boots fully from internal flash.
CAN Bus Configuration
Locating the Overlay
find /boot -name '*.dtbo' | grep -i can /boot/dtbs/6.18.32-bone35/overlays/BB-CAN0-00A0.dtbo
Enabling via uEnv.txt
Added the following line to /boot/uEnv.txt:
uboot_overlay_addr4=BB-CAN0-00A0.dtboBringing Up CAN0
sudo ip link set can0 up type can bitrate 500000 ip link show can0 4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP
Communication Test
candump can0 & # listen in background cansend can0 123#DEADBEEF # send test frame
Issues & Resolutions
| Issue | Resolution |
|---|---|
| Debian 7.8 had no SocketCAN support | Upgraded to Debian 13.5 |
| SSH not available in Windows PowerShell | Used PuTTY as SSH client |
| USB driver not recognized (unknown device) | Switched to a different USB port |
| fstab still pointing to mmcblk0 after eMMC copy | Fixed with sed command |
| config-pin not found in Debian 13.5 | Used uEnv.txt overlay instead |
| No internet connection on BBB during setup | can-utils was already pre-installed in the image |
| SD card instability caused boot issues | Migrated OS to eMMC for stable operation |
Conclusion
The BeagleBone Black was successfully upgraded from Debian 7.8 to Debian 13.5 (Trixie) with kernel 6.18.32-bone35. The OS was migrated from a microSD card to the internal 4 GB eMMC for long-term stability.
CAN Bus communication was configured using the BB-CAN0-00A0.dtbo device tree overlay with an SN65HVD230 transceiver on pins P9.19 (RX) and P9.20 (TX), and verified at 500 kbps using can-utils.
System boots from eMMC, CAN0 is active at 500 kbps, and the microSD slot is available for additional project storage when needed.
Session 2 — GPIO & CAN Bus Testing
This session focused on building the infrastructure for BBB ↔ ESP32 CAN Bus communication and GPIO-controlled LED testing. Approximately 1 hour was spent resolving GPIO pin compatibility issues caused by API changes in the modern kernel (v6.18).
Session Summary
GPIO test on P9.12 (gpiochip0 line 28) — LED on/off/blink successful. CAN interface can0 active at 500 kbit/s, ERROR-ACTIVE (healthy, TX=0 RX=0).
GPIO Pin Map
| BBB Pin | gpiochip | Line | Status |
|---|---|---|---|
| P9.14 | gpiochip0 | 18 | I2C / ehrpwm1a — UNAVAILABLE |
| P9.12 | gpiochip0 | 28 | Free GPIO — IN USE ✓ |
On BBB kernel v6.18, sysfs GPIO (/sys/class/gpio/export) is deprecated. libgpiod v2 API is required. P9.14 was initially attempted but found to be in I2C mode (mode 8) — switched to P9.12 (gpiochip0 line 28).
Issues & Resolutions — Session 2
| Step | Issue | Resolution |
|---|---|---|
| GPIO export (P9.14) | write error: Invalid argument — pin in I2C mode (mode 8) | Switched to P9.12 (gpiochip0 line 28) |
| config-pin command | command not found — bb-cape-overlays not available, no internet | Used gpioinfo to scan all chips manually |
| devmem2 pinmux override | command not found | Python /dev/mem approach attempted — restricted in kernel v6.18 |
| sysfs GPIO (gpio50) | No such file or directory — P9.12 = mmc0_dat1 (SD card conflict) | Scanned with gpioinfo, found gpiochip0 line 28 = P9_12 |
| gpioset v1 syntax | invalid line value — libgpiod v2.2.1 installed | Switched to gpioset -c /dev/gpiochip0 -t 0 28=1 syntax |
| Python gpiod blink | gpiod v1 API deprecated (Chip/get_line) | Used gpiod.request_lines() v2 API — blink test successful |
CAN Interface Status
| Parameter | Value |
|---|---|
| Interface | can0 (BBB internal DCAN — 481cc000.can) |
| Bitrate | 500,000 bit/s (matches ESP32) |
| State | ERROR-ACTIVE — healthy, TX=0 RX=0 ✓ |
| Kernel | 6.18.32-bone35 (Debian Trixie) |
| Previous test | can0 123 [4] DE AD BE EF — verified in Session 1 |
Working Commands
GPIO — LED on/off# LED ON gpioset -c /dev/gpiochip0 -t 0 28=1 & # LED OFF killall gpioset gpioset -c /dev/gpiochip0 -t 0 28=0 &
python3 -c " import gpiod, time with gpiod.request_lines('/dev/gpiochip0', consumer='led', config={28: gpiod.LineSettings( direction=gpiod.line.Direction.OUTPUT)}) as req: for i in range(5): req.set_value(28, gpiod.line.Value.ACTIVE) time.sleep(0.5) req.set_value(28, gpiod.line.Value.INACTIVE) time.sleep(0.5) "
ip -details link show can0 # detailed status candump can0 # listen mode cansend can0 123#01 # LED ON command cansend can0 123#00 # LED OFF command
Next Steps
- Flash Arduino firmware to ESP32 (TX=GPIO17, RX=GPIO16, 500 kbit/s)
- Send
cansend can0 123#01from BBB → ESP32 LED turns on - Send
cansend can0 123#00from BBB → ESP32 LED turns off - Verify signals with logic analyzer (D0=CAN_H, D1=CAN_L, D2=ESP32 TX, D3=ESP32 RX, D4=BBB TX, D5=BBB RX)
- Develop
can_send.cfor bidirectional communication