This folder contains resources for setting up new Hail boards.
The commissioning process covers a few things:
- Set the FTDI device name and serial number.
- Flashes the boatloader on to the SAM4L.
- Sets the
board
andid
attributes in the flash of the SAM4L. - Flashes the
hail
TockOS kernel on the SAM4L. - Flashes the "hail" app on the SAM4L.
- Flashes the serialization code on the nRF51822 and programs the ID.
- You need the
libftdi-dev
package (or equivalent). - JLinkExe
To initialize a Hail board:
- Connect USB to the board
- Connect a JTAG programmer to the SAM4L
- Run
./commission_new_hail.sh c098e513XXXX
where theXXXX
should be replaced with a unique device ID - Connect a JTAG programmer to the nRF51822
- Hit
any key
to continue the script
Be sure to label the board with a sticker so that the user knows what the device's BLE address is.
The ftx_prog
executable comes from here:
https://github.com/richardeoin/ftx-prog.
It was built for linux amd64, so if the executable doesn't work for you,
you will have to recompile it for your platform.
- Connect Hail to USB
- Run
tockloader listen
and verify that code is running - Press the reset button and verify that code restarts
- Press the User button and verify that the green led activates
- Hold the Hail in your hand and verify that the light and acceleration measurements change
- Verify that BLE is transmitting with the name of
Hail
and that the address matches the sticker
For BLE testing, I recommend running
sudo stdbuf -oL hcitool lescan --duplicates | grep Hail
in the background.
ftdi_usb_open() failed for 0403:6015: inappropriate permissions on device!
You need to add a udev rule for FTDI devices:
sudo cp udev/99-ftdi.rules /etc/udev/rules.d/
Then unplug and replug attached FTDI devices.
ftdi_usb_open() failed for 0403:6015: device not found
This seems to occasionally happen. Just run the script again.