Go Down

Topic: Controller comm. error:255 / Error code : 15 (Read 1 time) previous topic - next topic

AdeleK-Gregory

Hello,

In EventTrigger example, we can read :

...
  if (debug == true) {
    if (ret > 0) {
      Serial1.println("No transmission");
    } else {
      Serial1.println("Transmission ok");
    }

    Serial1.println(SigFox.status(SIGFOX));
    Serial1.println(SigFox.status(ATMEL));
...


It works fine but SIGFOX and ATMEL variables are always in the same state even the transmission fails :
Transmission ok/Controller comm. error:255 / Error code : 15

Isn't it strange ?

Thanks for your help...

ballscrewbob

#1
Jun 13, 2017, 02:17 am Last Edit: Jun 13, 2017, 02:17 am by ballscrewbob
Its strange trying to analyse only a partial piece of code and having to try use a crystal ball to work out all the missing pieces. (Analogy...Here is a 1000 pieces jigsaw can you complete it using only 500 of them)

BTW please use CODE TAGS ( </> ) when posting code or errors as the forum has a bad habit of reading it as markup or even changing characters which makes it unusable.

Code: [Select]

  if (debug == true) {
    if (ret > 0) {
      Serial1.println("No transmission");
    } else {
      Serial1.println("Transmission ok");
    }

    Serial1.println(SigFox.status(SIGFOX));
    Serial1.println(SigFox.status(ATMEL));
It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

kickouille

Hello,

I get the same results with the EventTrigger example sketch provided by Sigfox library.

But everything seems to be working fine, I get the frames as it should.

I didn't go through the code, but this is always indeed frustrating to get errors, not knowing why.

Did you sort this out? If so how?

Regards,

Yanik

riccalisci

try to move "SigFox.end ()" after "SigFox.status(...)"

Code: [Select]

void loop()
{
  // Sleep until an event is recognized
  LowPower.sleep();

  // if we get here it means that an event was received

  SigFox.begin();

  if (debug == true) {
    Serial1.println("Alarm event on sensor " + String(alarm_source));
  }
  delay(100);

  // 3 bytes (ALM) + 8 bytes (ID as String) + 1 byte (source) < 12 bytes
  String to_be_sent = "ALM" + SigFox.ID() +  String(alarm_source);

  SigFox.beginPacket();
  SigFox.print(to_be_sent);
  int ret = SigFox.endPacket();


  if (debug == true) {
    if (ret > 0) {
      Serial1.println("No transmission");
    } else {
      Serial1.println("Transmission ok");
    }

    Serial1.println(SigFox.status(SIGFOX));
    Serial1.println(SigFox.status(ATMEL));

  // shut down module, back to standby
  SigFox.end();

    // Loop forever if we are testing for a single event
    while (1) {};
  }
}

kickouille

Hi riccalisci,

Well, that totally make sense, and that wrks, thank you.

Maybe it would that examples provided by libraries we are supposed to follow are correct...

Regards

Go Up