This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF51822 connection issue

Hi support team, We met an issue for connecting our device built in nRF51822 to Android device.

The nRF51822 uses below firmware program:

  • nRF5_SDK_12.3.0_d7731ad
  • s130_nrf51_2.0.1_softdevice The service we use is UART.

For using nRF Connect app. sometimes this app connects to device but gets unknown UUID service, and few seconds later, the app fixes the connection error and return to OK state.

For nRF Toolbox app, it will appear the error message "The device does not have required services." and never can get connection with the nRF 51822. Below is the screen shot: files.slack.com/.../screenshot_2017-06-14-10-44-24_1024.jpg

We have tested several mobile phones and some of them have this issue, the Sony, Samsung, Huawei and HTC is OK, but the Asus and Xiaomi has this issue. The Android OS version we tested is from version 4 to 7. It looks this issue has something to do with the phone manufacture, not the Android OS version.

This annoy us and our customer, it there any way we miss that can correct the error? Is there information you want that can confirm the cause of this issue?

Best Regards, David Huang

  • Hi David, have you considered to sniff what is really happening on the radio to see differences between the phones and getting the glimpse of what is going on? Does the behavior change when you erase network settings/BT Snare process in android or when you reset whole device to factory settings? Many issues with mobiles comes simply from different caching/lean update of parameters because there is low level BT stack managed typically by chipset provider (e.g. Broadcom) which is responsible for certain parts (e.g. GATT Service Discovery procedure, BT LE Security Manager layer implementation etc.) and then upper parts with "driver" and Android itself. These layers interact but it can have many different approaches and the same way you have millions bugs in upper parts of Android and its customs you will see them in BT interface as well.

  • @David: Which BLE profile are you testing on ? Which firmware are you testing ? what is the "connection error" Could you upload the screenshot on other place ? the slack link requires sign in to your group to view.

  • Hi Hung, the screen shot: www.dropbox.com/.../Screenshot_2017-06-14-10-44-24.jpg
    The profile (service?) we use is UART. The firmware we use is mentioned as above:

    • RF5_SDK_12.3.0_d7731ad
    • s130_nrf51_2.0.1_softdevice nRF Connect app may connect failed, but when this happen, it looks it can recover the error after few seconds then connect OK. The nRF Tool doesn't has this ability to recover the error if connect failed. Nordic only provides the nRF Tools app source code, but not provide the nRF Connect app source code, so we cannot make our app to has the recover function by implementing the nRF Connect function.
  • I can see in the screenshot that you are not using the NUS_BASE_UUID, which is:

    {0x9E, 0xCA, 0xDC, 0x24, 0x0E, 0xE5, 0xA9, 0xE0, 0x93, 0xF3, 0xA3, 0xB5, 0x00, 0x00, 0x40, 0x6E}

    Your last value was 55534243 instead of 24DCCA9E as in our description. This explain why the nRFToolbox disconnect and saying that "The device does not have required services."

    If you want you can modify the UUID, but you need to update that in the nRFToolbox also.

    This also explain why you see unknown service in nRFConnect, simply because the UUID is not recognizable.

  • We do not modify any UUID that Nordic originally provides. We load the official firmware (s130_nrf51_2.0.1_softdevice with nRF5_SDK_12.3.0_d7731ad), and expected the UART_SERVICE_UUID = UUID.fromString("6E400001-B5A3-F393-E0A9-E50E24DCCA9E") can be enumerated by the nRF Toolbox and nRF Connect two appls. Sometimes it can be enumerated (or received) by app, but sometime not. If the app cannot get the expected UART_SERVICE_UUID, for nRF Toolbox, it will abort and show error message (we can trace this app source code), for nRF Connect, it seems to try to request UUID again and finally got it (we don't know how this happen and Nordic doesn't provide this app source code). Today we reset the Asus ZenPhone to factory default and it seems the connection issue be corrected. If we know the reason that cause this issue, then we may modify the app to improve connection failed issue.

Related