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

Get RSSI during connection #118

Open
rosek86 opened this issue Dec 1, 2017 · 3 comments
Open

Get RSSI during connection #118

rosek86 opened this issue Dec 1, 2017 · 3 comments
Labels

Comments

@rosek86
Copy link

rosek86 commented Dec 1, 2017

Hi,

Is there any way to get RSSI during connection? I was trying something like this but this:

 (this.adapter as any)._adapter.gapGetRSSI(this.peripheral.connectionHandle, (a, b) => {
   this.logger.info(a, b);
 });

but this generates this error:

 undefined Error: Error occured when getting rssi. Errorcode: NRF_ERROR_INTERNAL (0x3)
 logMessage: Failed to receive response for command
 status: {"id":4,"name":"Unknown value","message":"Error sending packet to target. Code #3","time":"2017-04-14T09:50:47.269Z"}

It seems also that the error is second parameter in gapGetRSSI callback.

Kind Regards,
Krzysztof

@bihanssen
Copy link
Contributor

Hi,
the way you are calling the function is correct and should work, but there seems to be a bug in the underlying function implementation somewhere. We'll have to look into it.

@bihanssen bihanssen added the bug label Dec 21, 2017
@bihanssen
Copy link
Contributor

There is a bug in the connectivity firmware project for sdk 11.0. The SD_BLE_GAP_RSSI_GET function is missing from an array in middleware (components\serialization\connectivity\codecs\s130\middleware\conn_mw_items.c), so the connectivity fails during runtime when it receives a serialized function it doesn't have handler for. Adding a line for rssi_get in conn_mw_items.c seems to fix the problem.

Note: the function also seems to work out-of-the-box for SD API v3 (sdk 12).

Note2: Remember to call _adapter.gapStartRSSI first.

@NarainMassand
Copy link

@bihanssen I am running into a similar error where I see NRF_ERROR_NOT_FOUND (0x5). Adding which line in conn_mw_items.c might fix it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants