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

How to modify the advertising example to get my own private beacon ?

I am using an nRF52DK kit, SDK V11.0.0 and SoftDevice S132 V2.0.0. I have found an advertising example on the site github.com/.../nrf51-ble-tutorial-advertising. I have modified the address type to BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE ( & set BLE_GAP_ADDR_CYCLE_MODE_AUTO). Then I have changed the advertising_init() funciton to send 14 bytes of my own data and 6 bytes of short name. But I am a beginner in nrf52832 programming and I completely do not know which data/parameters I need to change to get:

  1. advertising time: each 5 seconds (neverending)
  2. the advertising address change in each transmission (implementation of a private IRK table). And in which module I must update my own data field to send it ? Please, help me as quickly as possible.
Parents
  • Hi Joakim !

    Thank you for your answer. The post "advertise nrf52840 unlimitedly" answers one of my questions. My beacon should:

    • Wake up.
    • Read I2C BUS to get some data.
    • Update my advertising frame: 14 bytes.
    • Recount my advertising address (RANDOM_PRIVATE_RESOLVABLE) using my private algorithm.
    • Send advertising frame.
    • Go sleep for 5 seconds

    I still do not know where is a proper place to implement reading I2C BUS, change data in my frame and update advertising address.

    Best regards, have a nice evening,

    Jarek (JGC)

Reply
  • Hi Joakim !

    Thank you for your answer. The post "advertise nrf52840 unlimitedly" answers one of my questions. My beacon should:

    • Wake up.
    • Read I2C BUS to get some data.
    • Update my advertising frame: 14 bytes.
    • Recount my advertising address (RANDOM_PRIVATE_RESOLVABLE) using my private algorithm.
    • Send advertising frame.
    • Go sleep for 5 seconds

    I still do not know where is a proper place to implement reading I2C BUS, change data in my frame and update advertising address.

    Best regards, have a nice evening,

    Jarek (JGC)

Children
No Data
Related