-
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
Which are the allowed values for txPower? > BLEDevice::setTxPower(int8_t txPower) #30
Comments
ble_error_t BLEDevice::setTxPower(int8_t txPower) resolves to sd_ble_gap_tx_power_set().
do you get an error as a return value? If not, then you'll need to take this up with Nordic. devzone.nordicsemi.com |
Hello Rohit, Thanks for your help. I have now finished checking all the accepted values for setTxPower / sd_ble_gap_tx_power_set(), and verified that the underlying Nordic SoftDevice is working as expected. For all -30, -20, -16, -12, -8, -4, 0, 4 dBm, the RSSI at the Central device follows. For instance, if the RSSI at the Central device is ~-50dBm for a TX power of 4dBm, changing the TX power setting to 0dBm is seen from the Central device as a RSSI of ~-54dBm. And so on... As a nice to have improvement to the actual BLE API documentation, I suggest to add a the range of valid input values for setTxPower(). Best regards, |
Hi Jose, You commented "I suggest to add a the range of valid input values for setTxPower()." |
Hello Rohit, As the library currently supports only one backend (nRF51822), you could simply add a little description to the high level documentation of the BLEDevice::setTxPower() method. However, paving the way for new backends, a simple API like the one below will do, Regards, P.S.: For those landing in this page with little C++ experience... C++ can get tricky really fast, and something apparentrly trivial as returning an array of integer values turns out to be not so trivial, My rationale,
|
how about keeping things really simple: return a static array--i.e. pointer On Tue, Feb 24, 2015 at 6:08 PM, José Ángel Jiménez <
|
Absolutely yes to the C style. Simpler for this case. Sorry, I jumped straight to C++ style. |
The signature could be, |
fixed in f557237 |
Fix Stop() call in linux/device
Hello,
I am developing with the latest version of the BLE_API. So far, I have successfully created fairly complex Peripheral examples. However, I have been only partially capable of changing the TX power.
I have been trying different values for txPower,
ble_error_t BLEDevice::setTxPower(int8_t txPower)
However, so far I only could make it work for txPower = 0 (0 dBm) and txPower = 4 (dBm). I have tried some negative values with no success.
Is there any documentation on the subject?
Best regards,
Jose Angel
The text was updated successfully, but these errors were encountered: