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

scans the beacon message and uuid

Hi,

I am using nRF51822 dongle beacon and i have two dongles. iam flashing the code ,beacon transmitter(C:\sdk_12.1.0\examples\ble_peripheral\ble_app_beacon\pca10028\s130\arm5_no_packs) in one beacon and i able to view the data (uuid and major and minor numbers) in android app(i.e Master Control Panel).i want to observe the beacons (i.e scans the data uuid and major and minor values) from second beacon. please tell me which example is used for scanning the beacon's uuid and major,minor values??

Parents
  • Hi,

    As described in the documentation of the Beacon Transmitter Example, the UUID, major and minor values are broadcast to devices in its range as Manufacturer Specific Data in the advertisement packets. The data is put into an array in the following order:

    APP_DEVICE_TYPE,     // Manufacturer specific information. Specifies the device type in this
                         // implementation.
    APP_ADV_DATA_LENGTH, // Manufacturer specific information. Specifies the length of the
                         // manufacturer specific data in this implementation.
    APP_BEACON_UUID,     // 128 bit UUID value.
    APP_MAJOR_VALUE,     // Major arbitrary value that can be used to distinguish between Beacons.
    APP_MINOR_VALUE,     // Minor arbitrary value that can be used to distinguish between Beacons.
    APP_MEASURED_RSSI    // Manufacturer specific information. The Beacon's measured TX power in
                         // this implementation.
    

    We dont have any examples for scanning for beacons, but you can use any of the Central examples as a starting point for creating your application. The Nordic UART Service Client example is my recommendation.

    When the central application receives an advertising packet, you will get a BLE_GAP_EVT_ADV_REPORT event in the BLE event handler, on_ble_evt(). Here you need to extract the manufacturer specific data from the advertisement package and extract the UUID, major and minor values from this.

    Best regards,

    Jørgen

  • Hi @Jørgen Holmefjord

    The Nordic UART Service Client example is my recommendation.

    When the central application receives an advertising packet, you will get a BLE_GAP_EVT_ADV_REPORT event in the BLE event handler, on_ble_evt(). Here you need to extract the manufacturer specific data from the advertisement package and extract the UUID, major and minor values from this.

    can you give me this code if available

Reply Children
Related