Disconnection request from peripheral device.

Hi Everyone,

sdk : nrf Connect v1.7.0

ide : VS code

I was trying out central_hr sample on nrf52840 dk. I have simulated hrs server in nrf Connect mobile application. So basically our dk is Central and nrf Connect app is peripheral here.

Suppose I have disconnected in nrf Connect app,after central made a connection, I couldn't see any callback related to disconnection on central side.

This isn't the case with peripheral_hr sample in nrf52dk. 

My question is ...

1.How the Central device knows if the peripheral is still in connection?

2.Can we disconnect from peripheral side in a ble connection?

3.Suppose I have both functionalities central and peripheral running parallely in a nrf52 chip, how to handle connection and disconnection from two independent roles?

Parents
  • Hi

    Sorry, just to confirm. Here you're using the nRFConnect mobile app alongside the "BLE sensor" you mentioned earlier as a peripheral device, correct? From this screenshot, the device seem to have disconnected just fine, but you have only enabled "INFO" in the log, so you won't see a disconnect reason. The servers "Disconnected" message will come a bit before the central/app initiates the disconnection, and the central will write its buffer to the peripheral before disconnecting it seems.

    Best regards,
    Simon

Reply
  • Hi

    Sorry, just to confirm. Here you're using the nRFConnect mobile app alongside the "BLE sensor" you mentioned earlier as a peripheral device, correct? From this screenshot, the device seem to have disconnected just fine, but you have only enabled "INFO" in the log, so you won't see a disconnect reason. The servers "Disconnected" message will come a bit before the central/app initiates the disconnection, and the central will write its buffer to the peripheral before disconnecting it seems.

    Best regards,
    Simon

Children
No Data
Related