Sensor Advertise current values in manufacturer data field little endian 5 byte
0x0 (8bit) | 0x01 - 0x02 (16bit) | 0x03 - 0x04 (16bit) | 0x04 - 0x05 (16bit) | |
---|---|---|---|---|
Name | "Battery capacity" | "Temperature x 100" | 2x byte "PH x 100" | 2x byte "PH probe RAW" |
example | 92 | 3220 | 721 | 141 |
Real | 92% | 32.20 | 7.21 | 141 mv |
or connect and read ble characteristics
- NTC or MCU temp sensor: f3641402-00b0-4042-ba50-05ca45bf8abc
- PH probe: f3641407-00b0-4042-ba50-05ca45bf8abc
- PH probe RAW: f3641408-00b0-4042-ba50-05ca45bf8abc
long press > 2s -> start calibrating in low PH (4.01) mode short press change mode (4.01 | 6.86 | 11)
- Put probe in 4.01 buffer
- Wait 1-2 min
- Connect to service f3641400-00b0-4042-ba50-05ca45bf8abc
- Write to characteristic 0x1401 0x01 value
- Wait until rgb led start blink green
- Put probe in clean water, for clean from previous buffer solution
- Put probe in 6.86 buffer
- Wait 1-2 min
- Connect to service f3641400-00b0-4042-ba50-05ca45bf8abc
- Write to characteristic 0x1401 0x02 value
- Wait until rgb led start blink green
- Repeat step 6
- Put probe in 9.18 buffer
- Wait 1-2 min
- Connect to service f364adc9-b000-4042-ba50-05ca45bf8abc
- Write to characteristic 0x1401 0x03 value
- Wait until rgb led start blink green
If use another buffer edit in ph_sensor.c line 233, 238
- Download NRF52 SDK 16
- Download ARM GCC
- Clone repo
git clone https://github.com/9zigen/NRF52_PhSensor
- Fix path to sdk and gcc in Makefile:
SDK_ROOT := $PATH_TO_SDK
- Flash Softdevice
make flash_softdevice
- Flash App
make flash
ormake pkg
for generating DFU package (generate keys first and flash bootloader with these keys)
- Install nrfutil
pip install nrfutil
- Generate keys
nrfutil keys display --key pk --format code DFU/private.key --out_file DFU/public_key.c
- Flash bootloader
cd DFU/bootloader && make flash
- Generate dfu package
nrfutil pkg generate --hw-version 52 --sd-req 0 --application-version 0x0 --application _build/nrf52832_xxaa.hex --key-file DFU/private.key DFU/dfu.zip
- Use the Nordic nRF Connect app to upgrade firmware