0
votes

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.

2

2 Answers

1
votes

Please double check Arduino TX is connected to Sigfox RX, and Arduino RX is connected to Sigfox TX Check also, that the module has VCC on pin 1, and GND on pin 9. If it still don't work, it's probably because there is something else connected to RX and TX lines. Remove it. Personnaly, I put a logic analyser on these lines to check the dialog. for the "ON": AT\r\n is sent, and "OK\r\n" is answered.

Hope this helps

0
votes

The problem was relatively simple to solve. It turns out that it is not possible to run the combination Arduino/Xbee/Sigfox with the serial cable connected (I used it for power, and for sending debugging info to my computer). All I had to do was:

  • put switch to USB
  • upload new code via serial cable
  • unplug the serial cable
  • put switch to Xbee
  • power the arduino via the 12V jacket (or other power input)

Then it works.