This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Example for Extended advertisement receive node

Hi, 

I am using nrf SDK 1.9.0 and want to receive extended advertisements on a device (nrf52832) but I didn't got any example. Do you have any sample? 

  • Hi Ashish, 

    Which feature of extended advertising are you planning to do ? 

    You just need to add CONFIG_BT_EXT_ADV=y in the project config to allow scanning in extended advertising. 
    You would also need .type     = BT_LE_SCAN_TYPE_ACTIVE if you plan to do active scanning. 
     I would suggest to have a look at the central_hr_coded example. In the example we scan for CODED PHY extended advertising. 

  • I just wanted to send around 60 bytes in the secondary channel.

    I modify the example "periodic_adv" and setting the data as bt_le_ext_adv_set_data(adv, NULL, 0, ad, ARRAY_SIZE(ad))

    periodic_advCopy.zip

    I can not see data using central_hr_coded as I assume it need to be connected.

    Whereas, this would be broadcast extended messages. 

  • Hi Ashish, 

    If you simply want to send larger data (60bytes)  you don't need to use periodic advertising. I don't think the central_hr_coded would support periodic advertising. You would need to use periodic_sync central application for that. 

    If you want to test advertising with long packet, please have a look at the multiple_adv_sets example. The connectable advertising set is using extended advertising. 

    I would suggest to use a phone to scan for the packets before testing with NRF52 as the scanner. The central_hr_coded wouldn't work out of the box as the generic scanner, you would need to change scanning to 1MBps instead of CODED PHY and remove connect_if_match=1 to avoid connection. 

  • Hello Hung,

    Just to remind you that I am not using periodic advertisement but only the extended advertisement.

    I tried to use multiple_adv_sets example. 

    I am new to BLE so, as per my understanding there is no example in Nordic to scan the extended advertisement. Of course reading Primary channel is easy but I am trying to check the secondary channels. I am not sure if nRF connect app can read it as I read in devzone that sniffer does not.

  • Hi Ashish, 

    I attached here the code I modified to show how extended advertising can be scan. I based on the central_hr_coded but the advertising is on 1Mbps not CODED PHY. You can testing using nRF52832 dk. 

    You should see something like this in the log of the central: 

    Note that nRF Sniffer and many phones can scan for extended advertising. Please check your phone capability. 

    7571.central_hr_coded_universal.zip

    0537.peripheral_hr_coded_extended.zip

Related