Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NUS & BLE Security

Hello,

I'm exploring the possibilities of implementing the Nordic UART Service but am having trouble understanding its security functionalities. I have a few questions:

In the ble_app_uart example from the nRF5 SDK v16.0.0, is there no implementation of security protocols at all ? not even Just Works pairing?

Best regards,

Parents
  • Hello,

    You are correct, the ble_app_uart example does not implement any BLE security. From the BLE event handler you can see that it will reject any security requests received by the peer device. 

    If you want to support BLE security, I would recommend you use another example such as ble_app_hrs as a starting point instead. It is easier to integrate the NUS service with another example, than it is to include the security dependencies (peer manager, fds, fstorage) in ble_app_uart. You should also patch the nus.c implementation to increase the required security level on the characteristics.

    Best regards,

    Vidar

  • Hello,

    Thank you for your response.

    The situation is that we already have an existing project that uses the NUS (Nordic UART Service), and now we simply want to add BLE security. Since the device doesn't have input or output capabilities, LESC Just Works seems like the only viable option.

    I reviewed the ble_app_hrs example as you suggested, and I attempted to integrate it into our project. However, there are many new defines and source/include files. When I add all the necessary defines and files to the makefile of the project, I encounter memory overflow errors.

    Is there a way to identify which specific defines and files are necessary for LESC Just Works, and which ones can be excluded?

    Best regards,

  • Hello,

    You need the peer manager module and its dependencies in addition to fds and fstorage to allow for persistent storage of bonds in flash. 

  • Hello,

    I couldn't get it to work with just these changes. I encountered many errors, and each time, I had to add a new module to the config or include additional source files in the Makefile. In the end, I had to structure everything exactly like the example to get it working.

    Do you have any other suggestions?

    Also, does the legacy Just Works version require the same dependencies? Does it have the same level of security as the LESC Just Works?

    Best regards,

Reply
  • Hello,

    I couldn't get it to work with just these changes. I encountered many errors, and each time, I had to add a new module to the config or include additional source files in the Makefile. In the end, I had to structure everything exactly like the example to get it working.

    Do you have any other suggestions?

    Also, does the legacy Just Works version require the same dependencies? Does it have the same level of security as the LESC Just Works?

    Best regards,

Children
  • Hello,

    There is not any other way than to add the missing dependencies. I can help with this if you are able to share your project.

    soprom said:
    everything exactly like the example to get it working.

    Did you manage to resolve the missing dependencies or not?

    soprom said:
    Also, does the legacy Just Works version require the same dependencies? Does it have the same level of security as the LESC Just Works?

    Legacy pairing requires fewer dependencies but is also less secure.

Related