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

Scan IBeacon through nRF mesh and get UUID, major, minor, and the Device name.

Hello,

For clarification I use the nrf5_SDK_for_Mesh_v2.1.1. and the nrf52832.

I'm trying to scan for Ibeacons in which I need to get the UUID, major, minor, and the device name, and for efficiency I want to intergrade this with the nrf mesh. From the beaconing example I was only able to get the MAC and RSSI with some other stuff with the nrf_mesh_rx_cb_set(rx_cb) function, but I don't see any of the variables I am looking for in the nrf_mesh_adv_packet_rx_data_t struct.

Is there a way to get the UUID, major, minor, and device name through the nRF mesh?

Sincerely.

Mr sunshine. 

Parents
  • Hi,

    The nrf_mesh_adv_packet_rx_data_t structure gives you a pointer to the advertising packet payload in the p_payload field, and the size of that data is provided in the length field.

    You then need to parse the advertising data according to the format of an iBeacon advertising packet. The information that you want is part of the "manufacturer specific data" advertising data type which should be part of the advertising packet payload.

    You could use the advertising and scan response data encoder from the nRF5 SDK for parsing or searching in the advertising data. Relevant functions would then be ble_advdata_parse() and ble_advdata_search().

    Please note that the latest version of nRF5 SDK for Mesh is currently version 4.2. Especially if this is a new project I highly recommend using that version, rather than version 2 which you are using now.

    Regards,
    Terje

Reply
  • Hi,

    The nrf_mesh_adv_packet_rx_data_t structure gives you a pointer to the advertising packet payload in the p_payload field, and the size of that data is provided in the length field.

    You then need to parse the advertising data according to the format of an iBeacon advertising packet. The information that you want is part of the "manufacturer specific data" advertising data type which should be part of the advertising packet payload.

    You could use the advertising and scan response data encoder from the nRF5 SDK for parsing or searching in the advertising data. Relevant functions would then be ble_advdata_parse() and ble_advdata_search().

    Please note that the latest version of nRF5 SDK for Mesh is currently version 4.2. Especially if this is a new project I highly recommend using that version, rather than version 2 which you are using now.

    Regards,
    Terje

Children
  • thank you for the response,

    The p_payload contains the UUID of the iBeacon but not the major and minor which should be behind the UUID according to the advertising packet structure. Any idea where I can find those?

    In addition I read from other forums that iBeacon doesn't support local names. But the iBeacon devices I use all have a local name which I can see on the nRF connect app. Do you know any tricks to still find this local name?

    Sincerely,

Related