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

Address for the ibeacon example

For the ibeacon example in the connect sdk, located in zephyr/samples/bluetooth/ibeacon, the bluetooth address is never explicitly set in main.c.  What does that mean exactly?

err = bt_le_adv_start(BT_LE_ADV_NCONN, ad, ARRAY_SIZE(ad), NULL, 0);

/** Non-connectable advertising with private address */
#define BT_LE_ADV_NCONN BT_LE_ADV_PARAM(0, BT_GAP_ADV_FAST_INT_MIN_2, BT_GAP_ADV_FAST_INT_MAX_2, NULL)

I'm not sure if "private" really means "random" but a random address would be problematic for a tracking beacon.  It seems like what I want is to call bt_id_create() before starting bluetooth, using an address I read out of DEVICEADDR, but I'm not quite sure how to do that.  Does this happen automatically?

Parents
  • Sorry, I forgot that "private" doesn't mean random, private means that it's just not a registered OUI..... so does that mean I can't use DEVICEADDR to form my address?

  • I'm not sure if "private" really means "random" but a random address would be problematic for a tracking beacon.  It seems like what I want is to call bt_id_create() before starting bluetooth, using an address I read out of DEVICEADDR, but I'm not quite sure how to do that.  Does this happen automatically?

    All nRF devices come with a random static address generated during Nordic production test and programmed to FICR-->DEVICEADDR. By default, the address stored in DEVICEADDR will be used when advertising, I tested it with the nRF5340 by first reading the register:

    nrfjprog --memrd 0x01FF02A4 --coprocessor CP_NETWORK
    0x01FF02A4: E2F6BC64  

    Then I programmed the nrf/samples/bluetooth/peripheral_uart sample onto the nRF53 and saw that it was advertising with "DC:D8:E2:F6:BC:64", which corresponds to the value in DEVICEADDR. I'm not sure what nRF5x device you have, but I belive all of the devices will use the address stored in DEVICEADDR.

    wz2b said:
    Sorry, I forgot that "private" doesn't mean random, private means that it's just not a registered OUI..... so does that mean I can't use DEVICEADDR to form my address?

     There is not a problem using the address stored in DEVIECADDR. I'll copy in an answer from a colleague that you may find helpful:

    "There is no need to use public address type anywhere no, the random static address type is by far the most used (I don't think this address type was available in BT classic). We have seen very few questions on using public address type (only some companies use them for historic reasons coming from BT classic products, and likely have already purchased/registered public address types that can be used).

    So I suggest to stay with random static address type, simply avoid the "hazzle" of registering with IEEE and also the logistic problem of assigning them to products in production.

    All nRF devices come with a random static address generated during Nordic production test and programmed to FICR."

    Best regards,

    Simon

Reply
  • I'm not sure if "private" really means "random" but a random address would be problematic for a tracking beacon.  It seems like what I want is to call bt_id_create() before starting bluetooth, using an address I read out of DEVICEADDR, but I'm not quite sure how to do that.  Does this happen automatically?

    All nRF devices come with a random static address generated during Nordic production test and programmed to FICR-->DEVICEADDR. By default, the address stored in DEVICEADDR will be used when advertising, I tested it with the nRF5340 by first reading the register:

    nrfjprog --memrd 0x01FF02A4 --coprocessor CP_NETWORK
    0x01FF02A4: E2F6BC64  

    Then I programmed the nrf/samples/bluetooth/peripheral_uart sample onto the nRF53 and saw that it was advertising with "DC:D8:E2:F6:BC:64", which corresponds to the value in DEVICEADDR. I'm not sure what nRF5x device you have, but I belive all of the devices will use the address stored in DEVICEADDR.

    wz2b said:
    Sorry, I forgot that "private" doesn't mean random, private means that it's just not a registered OUI..... so does that mean I can't use DEVICEADDR to form my address?

     There is not a problem using the address stored in DEVIECADDR. I'll copy in an answer from a colleague that you may find helpful:

    "There is no need to use public address type anywhere no, the random static address type is by far the most used (I don't think this address type was available in BT classic). We have seen very few questions on using public address type (only some companies use them for historic reasons coming from BT classic products, and likely have already purchased/registered public address types that can be used).

    So I suggest to stay with random static address type, simply avoid the "hazzle" of registering with IEEE and also the logistic problem of assigning them to products in production.

    All nRF devices come with a random static address generated during Nordic production test and programmed to FICR."

    Best regards,

    Simon

Children
No Data
Related