I'm working on a battery powered device that only has a single button and two leds. I need to make the pairing process as simple as possible. I have studied several different sample applications and I'm unclear of the recommended method for initiating advertising.
Since this device only has 1 button (and no other switches) the initial and default state must be not advertising, to conserver power.
When the user presses the button, I think the device should advertise for a certain length of time....
0) Should I use 30 seconds duration? Should I make different advertising modes like in the HIDDev profile applicaiton?
1) Is the recommended way to start the advertising procedure to use GAP_SetParamValue on attribute GAPROLE_ADVERT_ENABLED ?
2) I have also seen suggested in the forums that the app could directly use osal_set_event on peripheral.c event START_ADVERTISING_EVT, however this would require using the peripherals internals.
3) How does the GAPROLE_ADV_FILTER_POLICY work? Where can i find documentation on this feature? Do I need it for non-secured communications?
Next upon achieving connected state.
4) Should I disable the GAPROLE_ADVERT_ENABLED attribute ?
5) In some apps there is an event that re-enables the advertising called SBP_ADV_IN_CONNECTION_EVT , what is the purpose of this? Does it improve the connection reliability? Does it consume power?
Second if a connection is not established.
6) Will the stack automatically disable GAPROLE_ADVERT_ENABLED ?
7) Should I disable GAPROLE_ADVERT_ENABLED?
8) If I don't disable GAPROLE_ADVERT_ENABLED and I wish to restart advertising what is the recommended procedure?
Third if connected and the disconnecting with new state GAPROLE_WAITING_AFTER_TIMEOUT.
9) Does this most likely mean the device has moved out of range?
10) Will the stack automatically reconnect with the central device ?
11) Do I need to enable GAPROLE_ADVERT_ENABLED to reconnect to the central sever ?
If these questions are already well covered could you please provide a URL where I can become more informed?