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

S140 return 0x11 error code when nRF52840 discover service

Hi,

I'm using the bluetooth 5.0 and base on the mutilink_center example to add a peripheral and a center. Because I want the center to connect two type device. It could scan and advertise, but when the center use sd_ble_gattc_primary_services_discover to discover service, it returns 0x11 error and then reset. I have debug it and found that the connection handle is 0x01, not 0x00, and the service UUID is what I want and correct.

Could you give me some advice? Thanks.

  • Hi Alice,

    0x11 means NRF_ERROR_BUSY Client procedure already in progress. It could be that there is other service discovery already started. Make sure you don't call service discovery twice for the same device. If you already have 1 active connection, the connection handle will be 0x01.

    Do you see the same problem when testing with mulilink central example ?

  • I'm sure that it just call one time to discovery the service. The center will scan for the device when powered up. I have known the address of the device and I have done a limit to connect the device only. I didn't see the problem when testing with mulilink central example. The device connected now is the same with using to test with mulilink central example.

  • Note that by default service discovery is started right after the device get connected. ble_db_discovery_start() called inside BLE_GAP_EVT_CONNECTED event in on_ble_evt() in the multilink_central example. If you re-use the example, you shouldn't call that call again at other places.

    You may want to capture a sniffer trace to check what exactly happen over the air.

    You can also try to make a simplified code that demonstrate the problem and send me.

Related