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

URIBeacon2Service Needs initial AdvertisedTxPowerLevels #17

Closed
schilit opened this issue Nov 30, 2014 · 3 comments
Closed

URIBeacon2Service Needs initial AdvertisedTxPowerLevels #17

schilit opened this issue Nov 30, 2014 · 3 comments

Comments

@schilit
Copy link
Contributor

schilit commented Nov 30, 2014

Hi @rgrover @roywant

The UriBeaconConfigService (or the main.c) requires a default array for Advertised Tx Power Levels. Indexing by the current mode results in the dBm value transmitted in the ADV packet.

Since the value used for nRF51822n::setTxPower may not be the same as the Advertised value we also recommend an array for this purpose.

nRF51822n::setTxPower takes values of -40, -20, -16, -12, -8, -4, 0, 4

Suggest

// Values included in ADV packets for
// TX_POWER_MODE_LOWEST through TX_POWER_MODE_HIGH
// TODO: adjust these values using measurements for the packaged device
uint8_t[4] advertisedTxPowerLevels = {-40, -20, -12, 4};

// Values for nRF51822n::setTxPower for
// TX_POWER_MODE_LOWEST through TX_POWER_MODE_HIGH
uint8_t[4] firmwareTxPowerLevels = {-40, -20, -12, 4};
@rgrover
Copy link
Contributor

rgrover commented Dec 1, 2014

Not clear what's needed or appropriate here. Mbed would like to abstract the underlying controller. We shouldn't depend on or encode particularities.

@schilit
Copy link
Contributor Author

schilit commented Dec 1, 2014

If Mbed is trying to abstract out the particulars then perhaps it should offer the LOWEST, LOW, MEDIUM, HIGH abstraction.

The way it is now the caller of setTxPower needs to know the valid firmware values. The nRF51822::setPower only accepts certain values!

Another abstraction for Mbed might be a functions getFirstTxPowerValue() and getNextTxPowerValue() which is chip dependent.

@rgrover
Copy link
Contributor

rgrover commented Jul 23, 2015

This has been resolved. Refer to https://github.com/ARMmbed/BLE_API/blob/master/ble/services/URIBeaconConfigService.h#L47. Please re-open if required.

@rgrover rgrover closed this as completed Jul 23, 2015
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

2 participants