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

event that indicates hid connection is stable

Now I am using hid mouse example to develop a project which requiring bond process. Everything is OK but the question: I need report the btn number which trigger the system power up, I can get the btn number, but failed on send it to iphone.

After power up, I get the btn number and cache it in a varible, then connection is OK I will send it out asap. Problem is I can't get the real "Connection OK" event. I've tried to use the "BLE_GAP_EVT_CONNECTED" event after all the other modules have processed it, I use "sd_ble_gatts_hvx" to send the data, and get the error code: 0x3401.

Will someone give me some hint about the real "Connection OK" event? I am using the bond process.

Parents
  • On the initial connection you can send notifications as soon as it is enabled by the peer (you should get a write event when this happen). You should get an NRF_ERROR_INVALID_STATE if this is not enabled. When reconnecting to a bonded peer the cccd handles should be restored by the peripheral so you cannot send notification before this is finished.

Reply
  • On the initial connection you can send notifications as soon as it is enabled by the peer (you should get a write event when this happen). You should get an NRF_ERROR_INVALID_STATE if this is not enabled. When reconnecting to a bonded peer the cccd handles should be restored by the peripheral so you cannot send notification before this is finished.

Children
No Data
Related