The SigRPI shield is a HAT standard board providing SigFox connectivity to your Raspberry PI. As it is not certified for this network it can’t be used in production for this usage, but you can use it as a long range RF that does not need certification. I will later details this with a project related to this function.
By-the-way, the purpose of this board is to let you play easily with sigfox. The raspberry-pi offering a really efficient way to code and to make prototypes.
The shield comes with TD1204 (including accelerometer & GPS) of TD1208 (sigfox modem). You can use it with the standard firmware or upload your own one.
The shield can be ordered in the shop section : here
This posts details how to setup it and use it.
- RaspberryPI B+
- RaspberryPI 2
- Kernel 3.18.10 and higher
Install the board
- Switch you raspberry PI off
- Connect the Shield
- Switch your raspberry PI on
Configure your Pi
You must enable the i2c_vc to makes HAT detection work
- Edit /boot/config.txt
- add the line at end
Then you need to activate the serial port for the shield
- Edit /etc/inittab
- Comment the following line by adding dash
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Then you need to remove kernel console trace
- Edit /boot/cmdline.txt
- Change the line
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 ...
- For this line ( remove ttyAMA0 references )
dwc_otg.lpm_enable=0 console=tty1 ...
At this point you must reboot your RaspberryPI
Make sure it works !
- The shield should be visible on the HAT directory
# cat /proc/device-tree/hat/product SigFox TD1208 Shield
- You can now connect to the Sigfox modem
Install minicom if not done
# sudo apt-get install minicom
Then run it
# minicom -b 9600 -o -D /dev/ttyAMA0
Now you can type a AT command and make sure it respond
AT OK AT? ---------------- E => Echo I => Information Q => Quiet V => Verbose X => Extended result code Z => Reset ? => Help &F => Factory &V => Status &W => Save S200 => Reboot banner display
Understand the board LEDS & Connectors
The SigRPI shield have 4 different led. One is the TD120x led – blinking on reset ; the 3 other are connected to the RapsberryPi GPIO so you can use them as you want
The shield have a FTDI port. It can be use to reflash the TD without using the PI. As the Serial port is shared with the raspberry PI, you must use it not connected. In this cas you will have to provide +3.3V to the circuit. For this reason to reprogram the chip it is better to do it from the RaspberryPI, see later.
The HAT Flash WR Protect is a jumper you can put if you need to reflash the serial prom used to save the board description. You should not do it but the shield is subject to serial prom upgrade – documentation will be provided when needed.
The customization Area allows you to extend the shield by adding some component or an extension card. They are not connected to anything. But in from of it you have the main TD120X signals exported.
Using the Leds
To use the led, you can configure each of the GPIO like this :
echo <GPIONUM> /sys/class/gpio/export echo out > /sys/class/gpio/gpio<GPIONUM>/direction echo 1 > /sys/class/gpio/gpio<GPIONUM>/value #light it echo 0 > /sys/class/gpio/gpio<GPIONUM>/value #clear it
If you want to with D5 aka GPIO22
echo 22 /sys/class/gpio/export echo out > /sys/class/gpio/gpio22/direction echo 1 > /sys/class/gpio/gpio22/value #light it echo 0 > /sys/class/gpio/gpio22/value #clear it
Upgrading the Telecom Design firmware
You can upgrade the telecom design firmware directly from the Raspberry PI. You need to get the new firmware from the Telecom Design website
- For the TD1204 : https://developers.insgroup.fr/cloud-on-chip/td1204/download.html
- For the TD1208 : https://developers.insgroup.fr/cloud-on-chip/td1208/download.html
Then upload it to the raspberry pi
Now we need the tool to update the firmware :
- Download cflash.zip
- Copy it on the raspberry pi using scp
- unzip it
- build it
# make cflash
- execute the flashing command line with the right -p parameter
- Use 10 for TD1208
- Use 8 for TD1204
# ./cflash -d /dev/ttyAMA0 -p 10 ./td1208_modem_SOFT1451.bin
- The upgrade should start and the progress indicated
root@(none):~/cflash# ./cflash -d /dev/ttyAMA0 -p 10 ./td1208_modem_SOFT1451.bin cflash version 4.1 Copyright (c) 2012-2013 Telecom Design S.A. Serial port /dev/ttyAMA0 opened at speed 115200. Flashing 90744 bytes on products id 0x0a Synchronising, any key to abort... ATZ reset sent... cpt: 62 - c: 31 / 1 Dans upgrade - product: 0a... Upgrading, hit ESC to abort... 100% Upgrade OK ErrorCode : 0