What does it mean if I set my advertising timeout with this macro (which is equal to zero)? I would expect that it would advertise forever but instead sd_ble_gap_adv_start returns an invalid parameter error code.
What does it mean if I set my advertising timeout with this macro (which is equal to zero)? I would expect that it would advertise forever but instead sd_ble_gap_adv_start returns an invalid parameter error code.
Hi Bret,
In the past, I usually ran into this issue when the advertising flags were not set appropriately. Make sure the advertising flags are set to BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE. I suspect it may instead be set to BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE which, being limited, is not allowed to advertise indefinitely. You'll find this in the advertising initialization function.
Hope this helps,
Eric
That worked! The problem was BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE.
Great! Glad you got it working. Please check the answer to help others find an answer to similar issues.