Configuring presence detection¶
If your measurement device should support presence detection, for each device, after deploying the firmware to the device, you should perform additional steps:
- edit the nsv.csv file;
- generate the nvs.bin partition file
- deploy the nvs.bin partition to a specific measurement device
1. Edit the nvs.csv file¶
The MAC-addresses used for presence detection should be defined in the file nvs.csv;
- In a line that starts with mac_addresses,data,string,, one or more Bluetooth MAC-addresses can be defined.
- A MAC-address can be written like AB:CD:EF:01:23:45orAB-CD-EF-01-23-45and may be upper- or lower-case.
- When multiple MAC-addresses are defined, separate them with ;without spaces.
- Make sure that the csv-file does not contain any unnecessary spaces.
WARNING: Bluetooth MAC Addresses constitute personal data. NEVER push an nvs.csv file that contains true Bluetooth MAC addresses from (devices of) real persons to a (Public) GitHub respository.
2. Generate the nvs.bin partition file¶
- Open a comand prompt in the directory of the nvs.csv file you just edited.
- Use the command below to generate the partition:
    > Should you encounter issues you may try to replacepython3 $IDF_PATH/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate nvs.csv nvs.bin 16384py <command>in the above commands with: > > -py <command>> -python <command>
3. Deploy the nvs.bin partition to a specific measurement device¶
- Open a comand prompt in the directory of the nvs.bin file you just generated.
- Use the command below to generate the partition:
    
    > Should you encounter issues you may try to replace py -m <command>in the above commands with: > > -py -m <command>> -python -m <command>