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
  • I have not tested the current firmware thoroughly, but I had a test running for 6-8 hours that was doing nothing but sending packets at high rate (6580 bytes/sec), in a scenario and setup similar to yours. I think I've killed the source code now, as I've been using the same little project for all my experiments, but it was based on the heart rate sensor (hrs) example.

    Are you sure that you can disconnect and connect at any time, and also sure that you are not destroying your packet sequencing when this happens. I remember that I listened for connection events and checked the connection state before even trying to enter the send loop.

    It sound a little strange that you are seeing these problems, and I don't think it's common. Did you also check this on another board to make sure it's not a HW problem?

    What compiler are you using etc. Can you make an example project that demonstrates the problems you describe and upload it here.

Reply
  • I have not tested the current firmware thoroughly, but I had a test running for 6-8 hours that was doing nothing but sending packets at high rate (6580 bytes/sec), in a scenario and setup similar to yours. I think I've killed the source code now, as I've been using the same little project for all my experiments, but it was based on the heart rate sensor (hrs) example.

    Are you sure that you can disconnect and connect at any time, and also sure that you are not destroying your packet sequencing when this happens. I remember that I listened for connection events and checked the connection state before even trying to enter the send loop.

    It sound a little strange that you are seeing these problems, and I don't think it's common. Did you also check this on another board to make sure it's not a HW problem?

    What compiler are you using etc. Can you make an example project that demonstrates the problems you describe and upload it here.

Children
No Data
Related