I am trying to get an Arduino Uno to send data via Sigfox. Using a Libelium Xbee Shield and Sigfox Module for Arduino (Cooking Hacks). I tried to send a string using the example found in the Arduino library. The Arduino sketch is simple:
#include <Wire.h>
// Cooking API libraries
#include <arduinoClasses.h>
#include <arduinoUART.h>
#include <arduinoUtils.h>
#include <arduinoSigfox.h>
// Pin definition for Sigfox module error LED:
const int error_led = 13;
//////////////////////////////////////////////
uint8_t socket = SOCKET0; //Asign to UART0
//////////////////////////////////////////////
uint8_t error;
void setup()
{
Serial.begin(9600);
pinMode(error_led, OUTPUT);
//////////////////////////////////////////////
// 1. switch on
//////////////////////////////////////////////
error = Sigfox.ON(socket);
// Check status
if( error == 0 )
{
//"Switch ON OK"
digitalWrite(error_led, LOW);
Serial.println("Sigfox Switch ON -> SUCCES");
}
else
{
//"Switch ON ERROR"
digitalWrite(error_led, HIGH);
Serial.println("Switch Switch ON -> FAILED");
}
//////////////////////////////////////////////
// 2. send data
//////////////////////////////////////////////
// Send 12 bytes at most
error = Sigfox.send("000102030405060708090A0B");
// Check sending status
if( error == 0 )
{
//"Sigfox sending -> SUCCES"
digitalWrite(error_led, LOW);
Serial.println("Sigfox sending -> FAILED");
}
else
{
//"Sigfox packet sent ERROR"
digitalWrite(error_led, LOW);
Serial.println("Sigfox packet sent ERROR");
}
}
void loop()
{
//////////////////////////////////////////////
// 3. sleep
//////////////////////////////////////////////
}
The output on Serial port is the following:
AT
Sigfox Switch ON -> FAILED
AT$SF=000102030405060708090A0B
Sigfox sending -> FAILED
Connection between the Sigfox module and the board seems to be OK, because Sigfox.getID() is working, and the correct ID is retrieved. Also subscription of the device on the Sigfox platform seems to be OK.
How can I debug this? I have no idea how to start a diagnosis: something in the libraries? something in the sending? something in the hardware?. All help on this is appreciated.