Skip to main content
Associate III
January 27, 2025
Question

P2P_Client Update_Service() case APP_BLE_DISCOVER_WRITE_DESC Infinite Loop

  • January 27, 2025
  • 1 reply
  • 886 views

Hello,

I added a new characteristic to the P2P_Server application that is a, CHAR_PROP_WRITE and GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP = Yes, all other notifications are set to No.  The UUID = 50 50.  I added the processing of the incoming char and verified that this characteristic shows up in BLE Toolbox and works correctly.

I then edited the P2P_Client uuid.h file and set, P2P_WRITE_CHAR_UUID (0x5050).  The characteristic gets discovered in the Update_Service() method and handled in the case APP_BLE_DISCOVER_WRITE_DESC.  The handling of the case is the generated code, no changes made.

At this point my application quits working.  I discovered the reason by placing a breakpoint inside the case APP_BLE_DISCOVER_WRITE_DESC.  It's basically in an infinite loop processing this "event" constantly and no other processing happens.

Is there a reason why adding a write char characteristic would cause this infinite loop situation during the discovery phase?

Kindest regards.

1 reply

STTwo-32
Technical Moderator
February 27, 2025

Hello @kumaichi 

Could you please check your Update_Service implementation and try to test what is wrong on it. 

Best Regards

STTwo-32