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

Peripheral NUS Service not advertising TX/RX characteristics when on 52840

Hi,

I have been using the NUS on nRF52832 DVK with no issues, however, when I migrated to the nRF52840 DVK and a custom board based on the 52840, the NUS characteristics do not show up via iOS nRF Connect app.

On the app, the DVK shows up as advertising the Nordic UART service but there are no corresponding TX/RX characteristics.

The code running on the DVK is an unmodified ble_app_uart sample app from the nRF5_SDK_17.0.2_d674dde running the S140 Soft device.

Just to be clear: compiling app for 52832/S132 works as expected, compiling same app for 52840/S140 and only NUS service is advertised and not characteristics.

thanks....

Nick

Parents
  • Hi Nick,

    The code running on the DVK is an unmodified ble_app_uart sample app from the nRF5_SDK_17.0.2_d674dde running the S140 Soft device.

    The example advertises the NUS UUID but the Tx/Rx characteristics are nod advertised. Do you mean that you do not see them when doing a service discovery? Please clarify.

    The NUS example should work out of the box on the DK, but a typical cause of confusion is caching on the iOS side. That should not be a problem after connecting with nRF Connect and doing service discovery, though.

    Perhaps you can elaborate on the issue and show screenshots of nRF Connect app showing the missing characteristics? Also, can you check with for instance nRF Connect for desktop or similar, to verify that the issue is not with the nRF itself? 

    Just to be clear: compiling app for 52832/S132 works as expected, compiling same app for 52840/S140 and only NUS service is advertised and not characteristics.

    This is exactly the same example, just with different SoftDevice and nRF IC, so it should behave the same. Can you double check that you have not made any accidental changes in the code you test on the nRF52840?

  • Einar,

    Thanks for the response.

    I'm using a few iOS apps as well as a custom app so I'm pretty sure the NUS RX/TX characteristics are not being advertised on 52840.  If I change the advertised name, the apps pick this up so I doubt caching is the issue...

    Screenshot 2020-12-10 at 11.32.18.png

    Screen shot of iOS app shows NUS service but no corresponding NUS characteristics.  I did try upping the 

    NRF_SDH_BLE_VS_UUID_COUNT from 1 to 3 but it did not make any difference.  When I switch boards, the code is the same so recompiling should be identical except for board differences...

    Nick
Reply
  • Einar,

    Thanks for the response.

    I'm using a few iOS apps as well as a custom app so I'm pretty sure the NUS RX/TX characteristics are not being advertised on 52840.  If I change the advertised name, the apps pick this up so I doubt caching is the issue...

    Screenshot 2020-12-10 at 11.32.18.png

    Screen shot of iOS app shows NUS service but no corresponding NUS characteristics.  I did try upping the 

    NRF_SDH_BLE_VS_UUID_COUNT from 1 to 3 but it did not make any difference.  When I switch boards, the code is the same so recompiling should be identical except for board differences...

    Nick
Children
  • Here is the same code recompiled and running on the 52832.

    Screenshot 2020-12-10 at 11.46.09.png

  • Hi Nick,

    NickH said:
    I'm using a few iOS apps as well as a custom app so I'm pretty sure the NUS RX/TX characteristics are not being advertised on 52840.

    Just to be clear. The characteristics should not be advertised, and is not in any example (t is just the UUID of the NUS service that is advertised). Can you clarify what you mean by this? Perhaps show also screenshots of the "working" configuration to remove any confusion?

    Update: Apparently there was an issue on my end, so I did not see the images first. Looking at your image I see that while the characteristics for the UART service is not there, you have for the LED Button Service. So it does not look like you are running with the correct example. Please triple check that you are using the unmodified NUS example, and not the BLE blink example (which corresponds to the screenshot).

  • Sorry, my poor use of language.  What I mean is that the NUS Service is advertised in both cases but when the app requests the characteristics associated with the service, there are none for the 52840 whilst for the 52832 both the RX and TX characteristics are discovered correctly.  

    The nRF Connect iOS app does this interrogation automatically.  I agree the screen shot looks like other LED button services are running.  I downloaded a fresh copy of the SDK17 and compiled ble_app_uart sample (timestamped 11 Sep 2020 @ 12:35) and when downloaded onto 52840 and run, I still get NUS service and the LED characteristics.

    Weird. 

    I have previously run the Blinky app (ble_app_blinky) with no issues on the 52840 so maybe the LED characteristics are being cached by the apps but they should still be replaced when the RX/TX characteristics are available.

  • Hi,

    This must be related to caching in iOS. Can you try to ensure that any bonds are deleted on the nRF and iOS, and toggle (and potentialy restart) the iPhone?

  • Einar,

    I think you may be right - I did not restart my phone but was continuing to play around and now 52840 app is supporting characteristics for NUS TX/RX.  Bizzare.  Thanks for taking the time to support though:-)

    What was strange was (caching) behaviour persisted over two iOS apps and my Mac app...

    Nick

Related