This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Application with Soft device has nondeterministic operation

Hi,

I've developed an application which sends sensor data through the BLE interface at maximum available bandwidth by checking the BLE_ERROR_NO_TX_BUFFERS return value.

During development, I've run into (and currently still see) some very strange non-determinism in the application's operation in different executions of the exact same firmware (without reprogramming). See below for some examples:

  • Upon boot, BLE advertising is started. Device can be either discoverable, or not.
  • Upon first disconnection (using either Android or MCP), device is either discoverable, or not.
  • Upon a connection, device is either sending data at high rate, or not at all. (this one is the most common of the three).

Please keep in mind that the above differences in operation come from the very same firmware binary. I suspect the Soft device is somehow overrun with data sends, or is corruptible. What might be the cause, and what can I try to arrive at a solution in an efficient manner?

Thanks, Jamie

Parents
  • Hi KPE,

    Thanks for the reply! Once I am correctly sending data, I can maintain that seemingly indefinitely (I ran a test yesterday for 2.5 hours of successful continuous transmission). The problem is many times it won't reach that state. To answer some of your questions:

    *** I cannot always connect/disconnect--see original post. *** I am not starting timers driving BLE sends until I receive a connection event in the BLE handler. *** I see this same operation on both eval kit boards as well as my own custom HW. *** I'm using Keil uVision 4 IDE. The only issue with sharing an example code is that it relies on an interrupt generated by external HW. I can try removing that part so that anyone can try it.

    Thanks, Jamie

Reply
  • Hi KPE,

    Thanks for the reply! Once I am correctly sending data, I can maintain that seemingly indefinitely (I ran a test yesterday for 2.5 hours of successful continuous transmission). The problem is many times it won't reach that state. To answer some of your questions:

    *** I cannot always connect/disconnect--see original post. *** I am not starting timers driving BLE sends until I receive a connection event in the BLE handler. *** I see this same operation on both eval kit boards as well as my own custom HW. *** I'm using Keil uVision 4 IDE. The only issue with sharing an example code is that it relies on an interrupt generated by external HW. I can try removing that part so that anyone can try it.

    Thanks, Jamie

Children
No Data
Related