Author Topic: Sigfox functionality works under debug but not always under finial build  (Read 614 times)

mc-Abe

  • Full Member
  • ***
  • Posts: 167
    • View Profile
    • mc-Things
This is missed in our documentation, I will make sure we update this and add an example but here is an explanation of what I think is happening with your code:

Due to FCC regulation, there are time limits on how often sigfox messages can be sent. Effectively, you can only send 2 messages within a 20-second window. The underlying sigfox stack on our device will take care of this timing. However what you need to ensure is that your sigfox message was accepted by the device to be queued for transmission. We have limited memory so this queue size is small. the Lplan.Sigfox() function actually returns whether the message was successfully accepted for transmission or not. I would suggest you change your call to this:

Code: [Select]
While Not Lplan.Sigfox(msg)
    Thread.Sleep(10000000)
End While

Note that this will cause your thread to sleep for 10 seconds if the message is not accepted and continue to do so until the message is accepted (Should never be more than 20s). Not sure if this will be alright in your application but you need to implement a mechanism like this to avoid losing your messages.