-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nRF51822 advertising interval problem #2
Comments
Lovely. Thanks for reporting this. Will look into this on Monday. The fix should come shortly. |
at nRF51822/nRF51Gap.cpp:143, you'll find that the nordic implementation has an upper limit of 4096 for the adv-interval. Expressed in units of 0.625ms, this means a maximum interval of 2.56seconds. You could try binging this question up with Nordic. an error is returned from startAdvertising if any of the parameters are out of bounds. |
The valid range for advertising interval is 0x0020 (20ms) to 0x4000 (10.24s). The mbed headers aftifcially limit it further: #define GAP_ADV_PARAMS_INTERVAL_MAX (0x1000) This line in GapAdvertisingParams.h should be (0x4000) |
I'll updated the headers and push a fix shortly. But this applies to the nRF51822 library; so look for an update there. |
I've updated the 'develop' branch of both BLE_API and nRF51822 to reflect the changes needed to address this issue. Thanks for bringing them to our attention. The fixes will be released into the master branch at a future date. |
============= Features ~~~~~~~~ * Introduce GattServer::initializeGattDatabase(). This populates the GATT server with added services. * Add helper funcs: Gap::MSEC_TO_GAP_DURATION_UNITS() to ease setting up of connection parameters. * Enhance connectionEventCallback() to take in peer addr information. * Minor cleanup of a few public API classes and removal of unnecessary header-file includes. Bugfixes ~~~~~~~~ * Increase GAP_ADV_PARAMS_INTERVAL_MAX to 0x4000. This addresses /issues/2. Compatibility ~~~~~~~~~~~~~ One new API has been added (GattServer::initializeGattDatabase()) and Gap::ConnectionEventCallback_t has been extended. Applications depending on these should be updated.
This has now been resolved with v0.2.4 (just released) and is available in the master branch. |
Author: Rohit Grover Release 0.2.4 ============= Features ~~~~~~~~ * Introduce GattServer::initializeGattDatabase(). This populates the GATT server with added services. * Add helper funcs: Gap::MSEC_TO_GAP_DURATION_UNITS() to ease setting up of connection parameters. * Enhance connectionEventCallback() to take in peer addr information. * Minor cleanup of a few public API classes and removal of unnecessary header-file includes. Bugfixes ~~~~~~~~ * Increase GAP_ADV_PARAMS_INTERVAL_MAX to 0x4000. This addresses ARMmbed/ble/issues/2. Compatibility ~~~~~~~~~~~~~ One new API has been added (GattServer::initializeGattDatabase()) and Gap::ConnectionEventCallback_t has been extended. Applications depending on these should be updated.
Premininary support for OS X High Sierra
Hello,
There is a bug somewhere in the library regarding the advertising interval setting.
If using setAdvertisingInterval() I choose advertising interval <=4096 then all works fine, but if I choose advertising interval >4096 then device is not sending advertising packets.
The text was updated successfully, but these errors were encountered: