So, you decided to wire your console panel to BlinkenBone?
We'll, you'll invest much time into this! So at first you will check that the BlinkenBone stuff is working as expected.
Prerequisites:
- your panel!
- many free hours, support by your family ...
- You have read all pages of the main BlinkenBone article.
- a BeagleBone Black with a prepared SD card. On this SD card, a DebianLinux distribution and all BlinkenBone software is preinstalled.
- a BlinkenCape
- a BlinkenBoard, extra driver chips and a few jumpers
- a PC power supply
- a 40 pin flat ribbon cable
- an Ethernet cable connected to a switch in your local LAN.
- a ssh-capable terminal emulator on your Linux or Windows host system ("putty", for example)
Cutting the BeagleBone Black
To run BlinkenBoard error free, a trace on the BBB must be cut.
As both the eMMC's serial "Command" and the serial "Clock" wires receive alternating BlinkenBus signal patterns, at some time the eMMC recognizes a valid "read block" command and begins to drive its 4 data wires, disturbing BlinkenBone operation.
Early eMMC could be disabled with a software patch and a boot-time GPIO signal. For me this did not work for the current "Kingston" chip, only solution was to cut off the eMMC "Command" wire from P8.
Cabling the BlinkenBone components
- Mount driver chips and jumpers on the BlinkenBoard. For lowside drivers ULN2803, see the blue jumpers on the image below.
- Plug the BlinkenCape onto the BeagleBone. Shift the DIP switches away from the driver IC to the board edge.
- Cut off a drive connector from the PC power supply, unisolate the RED and a black wire and connect it to the screw terminal on the BlinkenCape.
You also can get +5V/GND from the screw terminals on the BlinkenBoard, if you don't like to cut off a drive power connector. - Plug the ATX connector of the PC power supply into the BlinkenBoard
- Connect BlinkenBoard and BlinkenCape with your 40 pin flat ribbon cable.
- Shift all BlinkenBoard 8xDIP switches to board edge. The board now has address 0.
- Plug your Ethernet cable in to the BeagleBone
See here:
First system test
Time to do the smoke test:
Power on!
These LEDs indicators should come to life:
- On the BlinkenBoard, two LEDs beside the DIP switch indicate good +5V and 3.3V power.
- On the BeagleBone, the LEDs sit near the Ethernet female connector.
One should shine steady, the other one should blink. - Don't interpet the LEDs inside the Ethernet female connector: Early BeagleBone revisions had problems driving them correctly.
Login
If the LEDs are good, try to log into the BeagleBone. Its hostname is "blinkenbone".
Start your terminal emulator. Under Windows, use putty.exe. From a Linux, use a terminal windows and enter:
ssh root@blinkenbone
The password is empty.
You should see the shell prompt of the BeagleBone's Angstrom Linux:
root@blinkenbone:~#
Checking the software configuration
On the Beaglebone SD card, these software components are installed:
- blinkenbus.ko: the kernel driver wich generates the BlinkenBus signals to access the BlinkenBoards over a file interface.
- blinkenbustest:a low level test tool for "blinkenbus.ko" to access the local BlinkenBoards directly over the register interface. It tests the cabling, BlinkenCape and BlinkenBoards.
- blinkenlightd.conf:a configuration file, which makes defines high level "controls" for the console panel elements. One control is made up of several bit groups on BlinkenBoard input or output register connections.
- blinkenlightd: a service demon. It makes the panel controls accessible over network.
- blinkenlightapitst: a high level test tool for blinkenlightd. It checks the logical panel configuration. To be used after the panel is connected and the configuration file "/etc/blinkenlightd.conf" is written and debugged.
Checking BLINKENBUS GPIOs:
The flat cable between BlinkenCape and BlinkenBoards is connected to some of the "General Purpose I/O pins" (GPIO) on the ARM CPU on the BeagleBone. These pins are shared with many other CPU functions. So there's always the danger that an updated Angstrom Linux activates some driver module which uses these pins too. To check this, do
# cat /sys/kernel/debug/gpio
GPIOs 0-31, gpio:
gpio-6 (mmc_cd ) in lo
GPIOs 32-63, gpio:
gpio-35 (w1 ) in hi
gpio-53 (beaglebone::usr0 ) out lo
gpio-54 (beaglebone::usr1 ) out lo
gpio-55 (beaglebone::usr2 ) out lo
gpio-56 (beaglebone::usr3 ) out lo
GPIOs 64-95, gpio:
GPIOs 96-127, gpio:
The BlinkenBus uses GPIO pins 32-39, 70-77 and 61,62,63. These must not be appear as "used" in this list.
In the example, there's a collision between gpio-35 and a "w1" driver module!
Checking the driver:
You can check that the driver "blinkenbus.ko" is running with
# dmesg
There should be "BLINKENBUS" messages in the kernel log. Scroll up and search for
[ 13.078460] BLINKENBUS - driver for BlinkenCape and BlinkenBus
[ 13.078460] BLINKENBUS - compiled at Aug 26 2013 16:34:08
[ 13.078491] BLINKENBUS - Contact:
[ 13.078491] BLINKENBUS - Web: www.retrocmp.com/projects/blinkenbone
[ 13.078948] BLINKENBUS - Module registered successfully. The device number is (100,0).
[ 13.078948] BLINKENBUS - udev should automatically create a device file with "mknod blinkenbus c 100 0"
[ 13.078979] BLINKENBUS - else check uevents with ????
[ 13.078979] BLINKENBUS - blinkenbus_modules_setup() - module CONTROL_MODULE
[ 13.079010] BLINKENBUS - blinkenbus_modules_setup() - module GPIO1
[ 13.079010] BLINKENBUS - blinkenbus_modules_setup() - module GPIO2
[ 13.079040] BLINKENBUS - blinkenbus_modules_setup() - set pin mux for GPIOs
[ 13.079071] BLINKENBUS - found board ctrl reg @ 0xf with value 0x1
[ 13.079132] BLINKENBUS - board 0x0 has type=0x0, bbuci_timing=0
And there should be the BlinkenBus file interface device:
# ls -l /dev/blink*
crw------- 1 root root 100, 0 Aug 26 14:43 /dev/blinkenbus
The driver must match the Linux version installed:
root@blinkenbone:~# uname -a
Linux blinkenbone 3.2.42 #1 Mon Aug 26 08:16:54 CEST 2013 armv7l GNU/Linux
root@blinkenbone:~# find / -name blinkenbus.ko
/lib/modules/3.2.42/kernel/drivers/blinkenbus/blinkenbus.ko
/lib/modules/3.2.34/kernel/drivers/blinkenbus/blinkenbus.ko
root@blinkenbone:~#
Here you see two drivers installed, but only one is fitting the current Angstrom Linux version 3.2.42.
Checking the service demon.
You can check that the service "blinkenlightd" demon is running with
root@blinkenbone:~# ps | grep blink
80 root 2004 S /home/root/blinkenlightd -c /etc/blinkenlightd.conf -b
102 avahi 2936 S avahi-daemon: running [blinkenbone.local]
272 root 2116 S grep blink