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

How can I receive all non-filtered, BLE-compliant advertisement packets in MESH V5, Light switch Client example.

Hi, I am begginer, I work with  SES, Mesh_v5.0.0,  nRF5_SDK_17.0.2, and  s132, SD v7.2.0. I started it two weaks ago. :)

I tryed the examples, Light switch, with server and Client too, with success. Now I need to receive all non-filtered, BLE-compliant advertisement packets from different BLE beacons.

Could anybody suggest to me how can I start?

  • Hi.

    Did you take a look at the beaconing example in our nRF5 SDK for Mesh?

    That example shows how to do concurrent beaconing, which allows an application to advertise beacons (such as iBeacon or Eddystone beacons) while participating in the Bluetooth mesh network.

    Br,
    Joakim

  • Hi, Joakim, thank you for your answer and adwise

    I tryed to mix with the  beaconing example,with the LPN example, with some success Slight smile

    With LPN because I need the DFU feature too. Now I stopped the LPN functions, because I dont use this.

    The button is works,  the MESH messages transmit and receive with Light server works, DFU works,

    I can see some beacons`s ADV but not continuously, not all, only 2-3 adv/ per sec, but I have 5 different beacons and they send advs in every 200ms.

    I dont undestand why I see only few advs. Where can I set the MESH scan interval parameters?

    How can I filter  the advs, for example beacon address?

    Br, Lajos

  • SOLVED !

    I can catch all incoming advs in scanner.c and print it in main.c

    The main.c

    char msg_adv[128]; //global variable in main.c
    .....
    int main(void) {
     initialize();
     start();

    for (;;)
     {
      if( msg_adv[0] != 0) // ADV is ready?
      {

      SEGGER_RTT_printf(0, msg_adv) ; // print new adv
      SEGGER_RTT_printf(0, "\n") ;
      msg_adv[0] = 0; //reeady to new

      }

    (void)sd_app_evt_wait(); // ha ezt kiremelem nem indul el az RTT log!!??
     }
    }

    The scanner.c

    extern char msg_adv[];      //from main
    .
     inside the:         static void radio_handle_end_event(void)

      inside of             : if (successful_receive) {
    .......
    if( msg_adv[0] == 0)        // save new adv parameters  if buffer is empty,  in text format to print in app ,
     {

      sprintf(msg_adv, "ADV-RX [@%u]: RSSI: %3d ADV TYPE: %x ADDR: [%02x:%02x:%02x:%02x:%02x:%02x]",
      p_packet->metadata.timestamp,
      p_packet->metadata.rssi,
      p_packet->metadata.adv_type,
      p_packet->metadata.adv_addr.addr[0],
      p_packet->metadata.adv_addr.addr[1],
      p_packet->metadata.adv_addr.addr[2],
      p_packet->metadata.adv_addr.addr[3],
      p_packet->metadata.adv_addr.addr[4],
      p_packet->metadata.adv_addr.addr[5]);
     }

  • Thanks for sharing the solution for others to benefit from.

    Br,
    Joakim

Related