the two connect evt

Hi Nordic,

I am developling a porject with nRF5 SDK 17.1.0, with nRF52832.

the 52832 serve as a central role.

1、I am wondering what is the difference between  BLE_GAP_EVT_CONNECTED and  NRF_BLE_SCAN_EVT_CONNECTED.

2、when  a central want to connect to a specific slave, it will transmit a SCAN_REQ, and then what will happen, a BLE_GAP_EVT_CONNECTED  event or NRF_BLE_SCAN_EVT_CONNECTED?

Parents
  • Hi,

    1、I am wondering what is the difference between  BLE_GAP_EVT_CONNECTED and  NRF_BLE_SCAN_EVT_CONNECTED.

    You always get the BLE_GAP_EVT_CONNECTED event from the SoftDevice when a connection is established. If you are using the scan module, then you will also get the NRF_BLE_SCAN_EVT_CONNECTED event in this case (this is sent by the scan module when it sees the BLE_GAP_EVT_CONNECTED event). The latter is a scan module event, and the former is a normal Bluetooth event. You can search for these events in the SDK examples to see how they can be used.

    2、when  a central want to connect to a specific slave, it will transmit a SCAN_REQ, and then what will happen, a BLE_GAP_EVT_CONNECTED  event or NRF_BLE_SCAN_EVT_CONNECTED?

    Neither. A scan request is not related to establishing a connection. That is just a way to request a scan response packet, which is sort of an extra advertising packet.

Reply
  • Hi,

    1、I am wondering what is the difference between  BLE_GAP_EVT_CONNECTED and  NRF_BLE_SCAN_EVT_CONNECTED.

    You always get the BLE_GAP_EVT_CONNECTED event from the SoftDevice when a connection is established. If you are using the scan module, then you will also get the NRF_BLE_SCAN_EVT_CONNECTED event in this case (this is sent by the scan module when it sees the BLE_GAP_EVT_CONNECTED event). The latter is a scan module event, and the former is a normal Bluetooth event. You can search for these events in the SDK examples to see how they can be used.

    2、when  a central want to connect to a specific slave, it will transmit a SCAN_REQ, and then what will happen, a BLE_GAP_EVT_CONNECTED  event or NRF_BLE_SCAN_EVT_CONNECTED?

    Neither. A scan request is not related to establishing a connection. That is just a way to request a scan response packet, which is sort of an extra advertising packet.

Children
No Data
Related