Questions about Nordic Distance Measurement library sample

1. The code uses a value 0xFF55AA5A to identify the adv packet as the one that supports distance measurement. Is this value checked by  lower layers?

If not - why not just use 1 bit ?

2. The advertising interval in the sample is set to BT_GAP_ADV_FAST_INT_MIN_1 ( 30 ms )

Have slower intervals been tested ? My concern is the device battery life

3. My application uses mesh and its scanner ( registers a scanner callback )

Have the app been tested with mesh? 

Thanks

Parents
  • Update
    I was able to incorporate the DM library into my app that uses mesh.

    Details

    1. It does not work out of the box because mesh uses a passive scan and DM library requires an active scan. And starting another scanner after mesh is initialized  returns -EALREADY
    Had to change the scan type to BT_HCI_LE_SCAN_ACTIVE in adv.c: bt_mesh_scan_enable() 

    This is obviously a hack just to prove it can work.

    With this change dm library coexists with mesh just fine. I was able to provision my devices, send data over mesh network while measuring distance between them.
    There is a need for an API to update the mesh scan parameters. Or provide them in the bt_mesh_init() function
    2. the "supports_dms" field uses the value 0xFF55AA5A  - it does not appear to be a magic value. I replaced it with 1 and it still works 
    I need those extra bits in the packet for application data. Just adding 8 bytes for "suppports_dms" and  "access_address" fields required by the DM library, result in an error "packet too big"
Reply
  • Update
    I was able to incorporate the DM library into my app that uses mesh.

    Details

    1. It does not work out of the box because mesh uses a passive scan and DM library requires an active scan. And starting another scanner after mesh is initialized  returns -EALREADY
    Had to change the scan type to BT_HCI_LE_SCAN_ACTIVE in adv.c: bt_mesh_scan_enable() 

    This is obviously a hack just to prove it can work.

    With this change dm library coexists with mesh just fine. I was able to provision my devices, send data over mesh network while measuring distance between them.
    There is a need for an API to update the mesh scan parameters. Or provide them in the bt_mesh_init() function
    2. the "supports_dms" field uses the value 0xFF55AA5A  - it does not appear to be a magic value. I replaced it with 1 and it still works 
    I need those extra bits in the packet for application data. Just adding 8 bytes for "suppports_dms" and  "access_address" fields required by the DM library, result in an error "packet too big"
Children
Related