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

BLE - NUS and characteristics

Hi,

I'm little confused regarding BLE NUS and characteristics.

I know that the characteristics are used to expose data, but we also have BLE nus which is used to send and receive data.

Is there any connection between them?

Do they use the same way to send and receive the data?

Thanks!

Parents
  • Hello,

    I know that the characteristics are used to expose data, but we also have BLE nus which is used to send and receive data.

    Is there any connection between them?

    Yes, BLE NUS is actually short for BLE Nordic UART Service, which implements a service with two characteristics simulating the RX and TX pins of a physical UART interface. You can see the BLE NUS demonstrated in the BLE NUS example from the SDK.
    The service contains the two characteristics which are used to actually exchange the information between the devices, by notifying data on the two RX and TX characteristics.

    Please do not hesitate to ask if anything still should be unclear, or if you have further questions!

    Best regards,
    Karl

  • Thanks for your answer, it helps me a lot!

    Actually - I have another question:

    What about other characteristics which are discovered by other side? How can they be transmitted if not via BLE NUS?

  • Hello,

    Please have a look at this blogpost for an in-depth explanation of how ATT and GATT relates to any service that a peripheral may be offering. The theory part in the beginning covers the topic very well, but you wont need to complete the tutorial part.

    Best regards,
    Karl

  • Thanks, it helped me a lot!

    I still have a question regarding Rx and Tx characteristics - how does it align with attributes?

    I know that attributes contain data, but what kind of data Rx and Tx characteristics contain? Those characteristics should be attributes as well, right?

  • Hello again,

    Roei said:
    Thanks, it helped me a lot!

    I am happy to hear that you found it helpful! :)

    Roei said:
    I know that attributes contain data, but what kind of data Rx and Tx characteristics contain? Those characteristics should be attributes as well, right?

     Yes, all sections in the GATT (general attribute) table are attributes. Please see this stack overflow answer for an elaboration on this. The answer also contains a link to one of our videos which covers the essential parts of the whole BLE protocol more in depth. You can skip to the parts of the video that covers the GATT section, to learn more in depth about it.

    Please do not hesitate to ask if you should have any more questions about this, or any other related topic!

    Sorry for my short answers, the summer holidays have already begun here in Norway, and we are thus operating DevZone with reduced staffing. 

    Best regards,
    Karl

  • Thanks, the video is very helpful!

    After watching the GATT part of the video, I didn't understand how does the attributes which represents service/characteristics are sent to the client.

    For example - if we have the heart rate service - how does it send its attributes and rate data? How often? Does it send the whole attributes in the same message (service, characteristics, value, descriptors)?

  • Roei said:
    the video is very helpful!

    I am happy to hear that! :)

    Roei said:
    I didn't understand how does the attributes which represents service/characteristics are sent to the client.
    Roei said:
    For example - if we have the heart rate service - how does it send its attributes and rate data? How often? Does it send the whole attributes in the same message (service, characteristics, value, descriptors)?

    When the a connection is made, the GATT client will initiate attribute discovery of the GATT server, to learn what the GATT server is offering (what profiles, services and characteristics it exposes).
    You can read more about this in the Attribute Discovery section of this blogpost(almost at the bottom).

    Best regards,
    Karl

Reply
  • Roei said:
    the video is very helpful!

    I am happy to hear that! :)

    Roei said:
    I didn't understand how does the attributes which represents service/characteristics are sent to the client.
    Roei said:
    For example - if we have the heart rate service - how does it send its attributes and rate data? How often? Does it send the whole attributes in the same message (service, characteristics, value, descriptors)?

    When the a connection is made, the GATT client will initiate attribute discovery of the GATT server, to learn what the GATT server is offering (what profiles, services and characteristics it exposes).
    You can read more about this in the Attribute Discovery section of this blogpost(almost at the bottom).

    Best regards,
    Karl

Children
Related