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

Receive Advertisement Packet in Mesh Beaconing Example

Hi,

Got some questions about receiving adv packet in Mesh Beaconing Example:

According to the description "The beaconing example also demonstrates the usage of the Packet RX callback. This functionality allows to receive all non-filtered, BLE-compliant advertisement packets in the application code. These packets are captured by @ref SCANNER". I expect getting the iBeacon advertising but during I run the example it's actually only received adv packet from another mesh node. I'm not sure if this is how the example exactly works. Is the example could scan and print all ble adv packet or I need implement it myself ?

Parents
  • Hi,

    The beaconing example, while documentation for "testing" states it prints all incoming packets and documentation for "RX callback" states it can receive all non-filtered packets, actually does use a filter on BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME. The callback will only be called for packets with this advertising data type in them.

    The filter is set in the function adv_start(), in main.c:

        /* Let scanner accept Complete Local Name AD Type. */
        bearer_adtype_add(BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME);

    The filter is employed for all packets before they get sent to the Scanner module, which again is responsible for calling the callback. You can read more about filtering in the Packet filtering API documentation.

    I have reported documentation bugs internally, for updating Beaconing example documentation to reflect the behavior of the example, as well as clarify the behavior of the Scanner in relation to Packet filtering in the Scanner API documentation.

    Regards,
    Terje

  • Hi Terje,

    It works! Many thanks for help. I must misundertand the description and thought it's for advertising but not receiving...

Reply Children
No Data
Related