This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why am I seeing an LL_REJECT_IND from the slave intermittently?

I have an nRF51822-based peripheral using the SoftDevice 110 v7.0.0 and SDK v6.0.0. The peripheral uses two custom characteristics under a single custom service. I'm using the Device Manager. The central is an Android app using the new Android L preview BLE stack.

About half the time the central attempts to connect to the GATT server, discover services, and bond, the connection is immediately dropped. Here's a Wireshark screenshot and log of when that happens.

screenshot_wireshark_reject.png

ll_reject_ind_2014-08-29.pcapng

And here are my security parameters:

// Timeout for Pairing Request or Security Request (in seconds).
#define SEC_PARAM_TIMEOUT                 30

// Perform bonding.
#define SEC_PARAM_BOND                    1

// Man In The Middle protection NOT required.
#define SEC_PARAM_MITM                    0

// No I/O capabilities.
#define SEC_PARAM_IO_CAPABILITIES         BLE_GAP_IO_CAPS_NONE

// Out Of Band data not available.
#define SEC_PARAM_OOB                     0

// Minimum encryption key size.
#define SEC_PARAM_MIN_KEY_SIZE            7

// Maximum encryption key size.
#define SEC_PARAM_MAX_KEY_SIZE            16

I'd say this happens about a third to half the time. The rest of the time the connection is fine. Why is this happening? How do I debug this?

[Edit]

Here's the log from nRFLogger/MCP app on Android L:

mcp_log_disconnect_2014-09-02.txt

  • Thanks Hung, have done that. To answer your questions, I'm testing with a Nexus 5 running Android L. This is all on a custom board so porting the ble_app_proximity example code to my board is not completely trivial but I'm happy to do that as a last resort. The app code is our own - I can test a bit with the MCP app but since the problem is intermittent it won't tell me much if I can't recreate it with the MCP. Not sure your MCP app is up to date with Android L either? It certainly runs on it but probably doesn't do any background scanning or use any Android L features. Is the source code for the MCP app available, btw? I can't find it on your site.

  • @Eliot: You can download the MCP app from Google play. The source code for it is not available. We have a small issue with Android L, that you may need to uninstall nRFToolbox and nRFLogger before you install MCP.

    Since you have a PCA10000, could you try to run the Master Control Panel PC software and verify that bonding works properly on your device ? Have you tested with iOS or Android 4.4 devices ?

  • @Hung: I was able to get a disconnection to happen using the MCP app on Android L. I do have the rRFLogger installed too, so let me know if you want me to uninstall that and try again. Will add the log from the MCP app in an edit to the question above now. I can also test using the MCP PC application now. I haven't tested recently with an iOS app or Android 4.4 device and it would be difficult to do so now.

  • Testing with the MCP PC application, I can't recreate the disconnection problem. Not sure what that tells us though, since it's intermittent anyway.

  • If this issue is actually dependant on the execution order of the different procedures, I wouldn't be too surprised that you cannot reproduce it with the MCP PC app. We will need to reproduce it internally with a Nexus 5 to find out what's going on.

Related