Hi Dialog,
Our firmware has to be in constant connected mode. My first question is can we stop advertising after the connection has established i.e. handle_evt_gap_connected() is called or do we need to keep advertising?
Second question is when the device first establishes the connection, what are the connection parameters? Are they set by the central?
Also when the central is trying a re-connection do the connection parameter reset? or are they the same as we suggested (assuming they were excepted) when the connection was previously established.
Lastly during connection when the device has no data to send (we send a notification every 30s) does it simply send a empty packet in the connection interval?
Device:
Hi mutahir,
1) Yes, you can stop advertising while the device is connected, its not a necessity to keep on advertising when you are allready connected. In the demo's for the example in the proximity reporter the stack stops the advertising when starting a connection, since the advertising is stopped the task receives a BLE_EVT_GAP_ADV_COMPLETED event and the handle_evt_gap_adv_completed() function is the one that starts the advertising again.
2) The parameters of the connection are defined by the central and not the peripheral, the peripheral can only update the parameters if the central agrees to that. The central defines the parameters always it doesn't matter if it was connected before to the same peripheral.
3) Since there are no data to be send between the central and the peripheral the devices keep the connection alive in every connection event by exchanging empty packets.
Thanks MT_dialog