I want to know the specification of NUS advertising and response data packet.

hi!

I am developing BLE communication with NUS.

I want to check the detailed specifications of advertising and response data packets of peripheral and central, but I can't find them.

I found what is briefly explained in the academy of the link below, but I don't know the full data specification?

https://academy.nordicsemi.com/topic/advertisement-packet/

In addition,

I want to modify the manufacturer ID... Is it okay for the manufacturer that makes the product to modify it at will?

Please also check which part needs to be modified in the actual NUS Source.

 

thank.

  • Hello,

    You can modify both the advertisement packet and the UUID at will. In fact, we recommend that you modify the UUID so that it is easier to distinguish your devices from other BLE products. 

    I don't really recommend changing the UUID for the NUS, as it will affect all applications that you build that are using the NUS service. What I recommend that you do is to create your own file with your own service, and you can look at the Nordic UART Service for reference, as an example on how to do it. If you continue a bit further down the devacademy course, you will eventually reach the lesson and exercises where you will learn how to create your own custom service. Please see:

    Lesson 4 Exercise 1 (But also do the other parts up until this point, as they are also useful.

    We also recommend to use something like this UUID generator to ensure a unique UUID.

    To actually answer your questions, please see nus.c and nus.h found in:

    NCS\nrf\subsys\bluetooth\services\nus.c
    NCS\nrf\include\bluetooth\services\nus.h

    nus.h holds the actual UUID definitions, while nus.c is responsible for setting up the service and characteristics. The advertisement is set up in main.c in the NCS\nrf\samples\bluetooth\peripheral_uart sample.

    Look at how the 

    static const struct bt_data ad[], and
    static const struct bt_data sd[] are set up, where the initial advertising message (ad) contains the flags and the device name. The scan response data (sd) holds the list of the NUS' UUID.

    Best regards,

    Edvin

Related