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

BLE_GAP_EVT_ADV_REPORT

Hi Nordic, I have decoded the advertise report below. Will you please confirm my understanding is correct. Especially [02] --> NUS_SERVICE_UUID_TYPE [01] --> BLE_UUID_NUS_SERVICE is it correct ?

static void on_ble_evt(ble_evt_t * p_ble_evt) { case BLE_GAP_EVT_ADV_REPORT: {

			0c 09 4e 6f 72 64 69 63 5f 55 41 52 54 02 01 05 
				[0C]  	  N  o  r  d  i  c  _  U  A  R  T  [02]  [01]  [05] 
				[0C] --> TOTAL LENGTH = 09 + N  o  r  d  i  c  _  U  A  R  T
       09  --> #define BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME                 0x09 // Complete local device name. 
				[02] --> NUS_SERVICE_UUID_TYPE
				[01] --> BLE_UUID_NUS_SERVICE
				[05] -->advdata.flags              = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;

Thanks and Regards Lakshman,PMP,PMI-RMP

Parents
  • Hi

    You are almost correct. The advertising packet is ordered in a triplet system and it looks like this

    [length byte , type byte, one or more data bytes]

    The first byte in the triplet, the length byte, is holding the number of remaining bytes in the triplet (type byte + data byte(s)). The second byte in the triplet is the type byte. The value of this byte shows what information the following data byte(s) holds. Here is a list of type values. The next byte(s) holds the real information. So with this knowledge we can see that your packet 0c 09 4e 6f 72 64 69 63 5f 55 41 52 54 02 01 05 is:

    • 0x0C = Length byte. There are 12 more bytes to follow in this triplet.
    • 0x09 = Type byte. Looking at the list in the link above we can determine that this triplet holds a «Complete Local Name».
    • Finally, the next 0x0C - 1 = 0x0B (11 decimal) bytes hold the complete local name: "Nordic_UART"

    Then there is one more triplet:

    • 0x02 = Length byte. There are 2 more bytes to follow in this triplet.
    • 0x01 = Type byte. Looking at the list in the link above we can determine that this triplet holds the «Flags».
    • Finally, the last byte in this triplet holds the flag value 0x05

    Here are two relevant posts from devzone: One & Two.

  • The link " Here is a list of type values" is broken. Is this the new and improved link? www.bluetooth.com/.../

  • Hello,

    Yes. The link you provided is the new link corresponding to the broken one in this thread.

    Best regards,

    Edvin

Reply Children
No Data
Related