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

How to make a simple unconnected Broadcaster ?

Hello everyone,

I would like to make an unconnected broadcaster to send data to the advertising channels ... I come from a X-NUCLEO-IDB05A1 board and that's has been pretty simple. It is just need to use a function and determine the interval of broadcast and pass the data to this function.

Are there an easy way to do that with the powerful nRF-52840 PDK ?

The "ble_app_alert_notification" example seems to do what I expect. Maybe, it could be a good starting point to understand the Nordic environment.

Thank you,

Sylvain.

Parents
  • Hi,

    If you only want to broadcast information and be non-connectable, I think the beacon example is what you are looking for. Yes, you should be able to implement BLE beacons on the nRF52840. Have a look at this post on devzone, there is also a beacon example attached. It is updated for SDK14.1 and should work with the nRF52840. 

     

  • Yes I have used this example as It's said as in other post. But I have few trouble when I try to modify the payload. I juste want to send a payload like that :

    #define PAYLOAD_LENGTH  0x04
    char payload [PAYLOAD_LENGTH] = {0xFF,0xFF,0xFF,0xFF};

    So I modified this function :


    I receive the expected data but with other data ... Here's the received data :

    [[0x02,0x01,0x04,0x07,0xFF,0x00,0x00,0xFF,0xFF,0xFF,0xFF]]

    And I don't find where this data is set ...

    Can you help me ?

    Sylvain.
  • I found a solution. For any people interested, you need to specify what is the AD type. So, specify the AD type as Manufacturer Specific Data with the following code :

    After that you can pass all the data you want to sent in this function (with a maximum of 29 Bytes):

    Here's the topics that help me :

    https://devzone.nordicsemi.com/f/nordic-q-a/7080/sd_ble_gap_adv_data_set

    https://devzone.nordicsemi.com/f/nordic-q-a/8854/fully-custom-advertisement-data/32548#32548

    https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial

    devzone.nordicsemi.com/.../bluetooth-smart-and-the-nordics-softdevices-part-1

Reply Children
No Data