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

Cannot discover characteristic

Hi all,

I am new to nordic. I have two pca10031 dongle. First of all I had programmed example codes (one as peripheral and other one as central) and tested, it works fine. But as per my end requirements, I have to scan and connect to iphone. So, i was testing with my custom iOS app with nordic(as a central). I am able to discover the Service successfully, but not able to get the characteristics.

Here are the results what i am getting while debugging the code.

in static void db_discovery_evt_handler(ble_db_discovery_evt_t * p_evt) function, i am getting p_characteristic->characteristic.uuid.uuid = 0x00; p_characteristic->characteristic.uuid.type = 0x00;

Can any one help me?

Am i missing anything on nordic side or iOS side.

Please help me.

Thanks in advance.

  • Are you using a custom UUID? if that is the case you should register this so you can get the UUID type when discovering the service. Can you also try to connect to the iPhone and do a service discovery using the master control panel for pc to check that the services and characteristics is there and that you are trying to discover the right UUID's?

  • Is it possible to use iOS as a peripheral? (I'm just curious)

  • Thank you for replying. Issue is resolved. Actual problem was at iPhone side. UUID of service and characteristic was causing the problem. UUID of service : E20A39F4-73F5-4BC4-A12F-17D1AD07A961 UUID of characteristic : 08590F7E-DB05-467E-8757-72F6FAEB13D4

    after changing the UUID of characteristic to E20A39F5-73F5-4BC4-A12F-17D1AD07A961, everything works fine.

  • I have another question. Let me describe the whole situation. First of all peripheral starts advertising. -Central starts scanning. -Performs the connection with peripheral. -Central discovers the service and characteristic -enable the notification on the characteristic -As peripheral detects that the notification is enabled by central, it sends the data (e.g. hello). -Central detects the event BLE_GATTC_EVT_HVX in function void client_handling_ble_evt_handler(ble_evt_t * p_ble_evt). -Further parcing the ble_evt_t * p_ble_evt data, i found the testing data (hello string) was here.

    p_ble_evt->evt.gattc_evt.params.read_rsp.data.

    We can see that there are multiple objects of p_ble_evt, like common_evt, gap_evt, l2cap_evt, gattc_evt, gatts_evt

    So my question is, how i come to know that which particular object i need to search for. In simple words, how i can know that for what reason this function is called?

Related