application runs 9 times out of 10 NRF_ERROR_RESOURCES error free and then, once in a while, NRF_ERROR_RESOURCES massively present from the beginning

To the kind attention of Nordic support team,

I'm testing a freertos project, with softdevice and radio notifications. A constant number of notifications is queued before the starting of the connection interval, and sent during the connection interval itself. It works very well, I get this high speed data stream. Every time I get a sporadic NRF_ERROR_RESOURCES, the feedback mechanism exploiting BLE_GATTS_EVT_HVN_TX_COMPLETE starts working as well, and the resource error disappear after a while.

Everything works fine, like 9 executions of the program out of 10 are really stable and NRF_ERROR_RESOURCES free. If I reset (Ctrl+Shift+F5 using Segger), it seems that, once in a while, from the beginning of the connection NRF_ERROR_RESOURCES is massively there, and it never goes away. Only reducing the number of queued notifications help.

But why the number of notifications should be reduced once in a while? All this sounds to you like a problem in the application, or there could be something changing in the connection? I thought about master forcing a different connection interval than the desired one. But using BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST I have no evidence for now that this behavior is due to a change in connection interval timing. I attached systemview files to the project and next days I'll be possibly able to post some more thing about this issue (also I'm gonna use Nordic sniffer). Really, just a quick opinion from your experts would be very much appreciated. Also, any debug strategy you would recommend.

Thank you in advance, best regards.

Parents
  • Hi all, some systemview data. This is the nice condition: (a resource error can still occurs, but everything seems to return to "normal" after a while) 

    This is the condition where the communication starts to struggle and seems never to return back to "normal"

    These are systemview files, you can open them renaming them as *.bin -> .SVDat:

    1)

    28_09_2022_2.bin

    2)

    28_09_2022_3_holes.bin

    Best regards

  • I saw that - if switching on bluetooth in my phone and having it close to my antenna device - during "normal" case execution, ,i get lots of resource errors, that end as soon as I'm switching off bluetooth in my phone. Could be a problem in transmission channels. Is it possible to force the master (windows + built in ble chipset) to ask for new channels? Or, is nRF Connect Bluetooth Low Energy Standalone v4.0.0 able to update frequency channels? 

  • Hi,

    You are getting NRF_ERROR_RESOURCES because the Tx buffer is full and have to wait for a Tx to complete before a new buffer is available. This is normal, but the question is why this happens. Something happens on the link, but we cannot say from here what that is without more information. Can you make a sniffer trace that shows the communication between the nRF and the phone? That should show if there are connection parameter changes, a lot of re-transmissions, or other things that could explain this.

    astella said:
    Could be a problem in transmission channels. Is it possible to force the master (windows + built in ble chipset) to ask for new channels?

    Note that Bluetooth is frequency hopping, and normally most of the channels will be in use. It is possible to request a new channel map from the nRF, but that requires quite a bit, and it is not likely that it would help (the phone and desktop computer Bluetooth stacks keep track of this and typically update the channel map regularly if needed). (In any case it seems premature before knowing what actually causes this issue.)

Reply
  • Hi,

    You are getting NRF_ERROR_RESOURCES because the Tx buffer is full and have to wait for a Tx to complete before a new buffer is available. This is normal, but the question is why this happens. Something happens on the link, but we cannot say from here what that is without more information. Can you make a sniffer trace that shows the communication between the nRF and the phone? That should show if there are connection parameter changes, a lot of re-transmissions, or other things that could explain this.

    astella said:
    Could be a problem in transmission channels. Is it possible to force the master (windows + built in ble chipset) to ask for new channels?

    Note that Bluetooth is frequency hopping, and normally most of the channels will be in use. It is possible to request a new channel map from the nRF, but that requires quite a bit, and it is not likely that it would help (the phone and desktop computer Bluetooth stacks keep track of this and typically update the channel map regularly if needed). (In any case it seems premature before knowing what actually causes this issue.)

Children
No Data
Related