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

nRF8001 advertising issue

Hi,

We are currently developing a new product using nRF8001 IC and it is pretty much stable (not 100%) until now.

My algorithm is straight forward: When the MCU is in idle mode I issue a connect command to the nRF8001 so it can start advertising and It responds back with a response command event with success, I put the MCU to sleep (deep sleep) and only wake it up after I receive a low level in the "RDYN" pin.

The critical issue is that sometimes (seldom) the nRF8001 doesn't advertise at all, it is like its radio is turned off and, as you can imagine, my MCU stays sleeping forever.

I've separated two log snippets, one that the nRF8001 is actually advertising (after sending the response command event with success) and another that is not.

log 1 - nRF8001 is advertising after connect command

MCU wakes up
[16:56:26:926] C1 :01, 0B,
[16:56:26:927] E15 :0F, 85, 01, 37, 49, 8C, 6A, 78, 40, 27, 00, 00, 00, D0, 07, 05,
[16:56:26:927] 1 :01, 09, ed
[16:56:26:929] E17 :11, 88, FD, 66, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
[16:56:26:929] Evt Pipe Status
[16:56:26:930] E5 :05, 84, 0B, 00, FB, 02,
[16:56:26:930] E12 :0C, 84, 09, 00, 41, 00, 02, 03, 00, 00, 00, 00, 00,
[16:56:26:931] C11 :0B, 0D, 02, 41, 00, 02, 03, 00, 00, 00, 00, 00,
[16:56:26:931] E3 :03, 84, 0D, 00,
[16:56:27:001] E17 :11, 88, FD, 6E, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
[16:56:27:001] Evt Pipe Status
[16:56:27:001] C1 :01, 13,
[16:56:27:001] E3 :03, 84, 13, 00,
[16:56:31:295] E7 :07, 89, 27, 00, 00, 00, 14, 00,
[16:56:31:295] Evt link connection interval changed
[16:56:31:296] C8 :08, 0D, 0E, 27, 00, 00, 00, 14, 00,
[16:56:31:296] E3 :03, 84, 0D, 00,
[16:56:33:684] E3 :03, 86, 03, 08,
[16:56:33:684] Evt Disconnected/Advertising timed out
[16:56:33:685] C5 :05, 0F, 00, 00, 50, 00,
[16:56:33:685] E3 :03, 84, 0F, 00,
[16:56:33:686] Advertising started. Tap Connect on the Access Controller UART app
[16:56:34:052] SLEEP MODE.
[16:56:34:052] WWDT Disabled

log 2 - nRF8001 is NOT advertising after connect command

[16:56:42:954] C1 :01, 0B,
[16:56:42:955] E15 :0F, 85, 01, 37, 49, 8C, 6A, 78, 40, 27, 00, 00, 00, D0, 07, 05,
[16:56:42:955] 1 :01, 09, ed
[16:56:42:956] E17 :11, 88, FD, 66, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
[16:56:42:957] Evt Pipe Status
[16:56:42:957] E5 :05, 84, 0B, 00, FB, 02,
[16:56:42:958] E12 :0C, 84, 09, 00, 41, 00, 02, 03, 00, 00, 00, 00, 00,
[16:56:42:958] C11 :0B, 0D, 02, 41, 00, 02, 03, 00, 00, 00, 00, 00,
[16:56:42:958] E3 :03, 84, 0D, 00,
[16:56:42:997] E17 :11, 88, FD, 6E, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
[16:56:42:998] Evt Pipe Status
[16:56:42:998] C1 :01, 13,
[16:56:42:998] E3 :03, 84, 13, 00,
[16:56:46:555] E3 :03, 86, 03, 13,
[16:56:46:556] Evt Disconnected/Advertising timed out
[16:56:46:556] C5 :05, 0F, 00, 00, 50, 00,
[16:56:46:556] E3 :03, 84, 0F, 00,
[16:56:46:557] Advertising started. Tap Connect on the Access Controller UART app
[16:56:46:908] SLEEP MODE.
[16:56:46:910] WWDT Disabled

The difference between them are only a few commands/events changed by the ACI and nRF8001 (shown below for reference):
[16:56:31:295] E7 :07, 89, 27, 00, 00, 00, 14, 00,
[16:56:31:295] Evt link connection interval changed
[16:56:31:296] C8 :08, 0D, 0E, 27, 00, 00, 00, 14, 00,
[16:56:31:296] E3 :03, 84, 0D, 00,

Just a Connection interval event and a set local data command after that (with the respective response).

Apart from that the only thing different is the disconnection reason:

0x08 timeout for the first one 
0x13 - Remote User Terminated Connection for the second one

This is critical for us, do you guys have any clue about that or is nRF8001 just not reliable enough?

Best Regards,


Parents
  • I think the 300ms delay is the closest to what you may be seeing. An SPI trace is essential to help you, so we have a more controlled environment as compared to the android phone.

    You should have a bit of control of the testing, the SPI trace will help you automate this.

    Suggestion: Keep the REQN line low for 300ms every time the ACI connect is sent and see if the issue occurs.

    Additional suggestion to see if the advertising is running: Turn on the ACTIVE line using the nRF8001 settings so if the advertising is successfully running you will see the ACTIVE line changing state.

    However you definitely need to get control of the test to progress the case.

Reply
  • I think the 300ms delay is the closest to what you may be seeing. An SPI trace is essential to help you, so we have a more controlled environment as compared to the android phone.

    You should have a bit of control of the testing, the SPI trace will help you automate this.

    Suggestion: Keep the REQN line low for 300ms every time the ACI connect is sent and see if the issue occurs.

    Additional suggestion to see if the advertising is running: Turn on the ACTIVE line using the nRF8001 settings so if the advertising is successfully running you will see the ACTIVE line changing state.

    However you definitely need to get control of the test to progress the case.

Children
No Data
Related