Skip to content
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

Closed
BaN-Co opened this issue Nov 8, 2014 · 6 comments
Closed

nRF51822 advertising interval problem #2

BaN-Co opened this issue Nov 8, 2014 · 6 comments

Comments

@BaN-Co
Copy link

BaN-Co commented Nov 8, 2014

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.

@rgrover
Copy link
Contributor

rgrover commented Nov 8, 2014

Lovely. Thanks for reporting this. Will look into this on Monday. The fix should come shortly.

@rgrover
Copy link
Contributor

rgrover commented Nov 10, 2014

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.

@introiboad
Copy link

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)

@rgrover
Copy link
Contributor

rgrover commented Nov 10, 2014

I'll updated the headers and push a fix shortly. But this applies to the nRF51822 library; so look for an update there.

@rgrover
Copy link
Contributor

rgrover commented Nov 10, 2014

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.

rgrover pushed a commit that referenced this issue Nov 21, 2014
=============

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.
@rgrover
Copy link
Contributor

rgrover commented Nov 21, 2014

This has now been resolved with v0.2.4 (just released) and is available in the master branch.

@rgrover rgrover closed this as completed Nov 21, 2014
JayBeavers pushed a commit to JayBeavers/ble-api that referenced this issue Mar 19, 2016
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.
jacobrosenthal pushed a commit to jacobrosenthal/ble that referenced this issue Dec 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants