The expansion board is for raspberry pi mainboard and allows sending messages over the SigFox network
You can purchase the board on YADOM.FR.
Two python scripts are provided :
- sendsigfox.py sends data over the Sigfox network.
- sendreceivesigfox.py sends data with a downlink message request. Downlink messages are 8 bytes long. Important note : Sigfox operators may bill downlink messages, please refer to your contract.
./sendsigfox.py MESSAGE [path/to/serial]
./sendreceivesigfox.py MESSAGE [path/to/serial]
MESSAGE
is an hexadecimal encoded string; 2 to 24 characters representing 1 to 12 bytes.path/to/serial
is an optional path to the serial port, default is/dev/ttyAMA0
.
./sendsigfox.py 00AA55BF
: sends the 4 bytes 0x00 0xAA 0x55 0xBF over default serial port/dev/ttyAMA0
./sendsigfox.py CCDD /dev/ttyS0
: sends the 2 bytes 0xCC 0xDD over serial port/dev/ttyS0
./sendreceivesigfox.py 0123456789
: sends the 5 bytes 0x01 0x23 0x45 0x67 0x89 with a downlink request over default serial port/dev/ttyAMA0
The following steps should be performed in the following order
-
Disable Raspberry Pi terminal on serial port with raspi-config utility:
sudo raspi-config
Go to
Interfacing Options
then chooseSerial
thenNO
andOK
-
Install pyserial
sudo apt-get install python-serial
-
Download scripts
- if git is installed then clone the repository :
git clone https://github.com/SNOC/rpisigfox.git
- otherwise paste script content to a new file:
nano sendsigfox.py
-
Enable script execution
chmod +x sendsigfox.py
-
Plug antenna with its cable and send your first message:
./sendsigfox.py 0123
-
Edit
/boot/config.txt
sudo nano /boot/config.txt
- disable if present
dtoverlay=pi3-miniuart-bt
by adding#
character at line begining :#dtoverlay=pi3-miniuart-bt
- if not present, add :
note:
dtoverlay=pi3-disable-bt enable_uart=1
enable_uart=0
might be present at the end of the file, in such case it should be commented or modified toenable_uart=1
- disable if present
-
then reboot :
sudo reboot
Serial port to use is the script's default one : /dev/ttyAMA0
MIT License / read license.txt