1414# first we reset the device
1515python ${IDF_PATH} /components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset erase_flash
1616
17- # then we flash the noblob variant
18- python ${IDF_PATH} /components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xE000 build_noblobs /ota_data_initial.bin 0x1000 build_noblobs /bootloader/bootloader.bin 0x10000 build_noblobs /jade.bin 0x9000 build_noblobs /partition_table/partition-table.bin
17+ # then we flash the ble-enabled variant
18+ python ${IDF_PATH} /components/esptool_py/esptool/esptool.py --chip esp32 --port ${JADESERIALPORT} --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0xE000 build /ota_data_initial.bin 0x1000 build /bootloader/bootloader.bin 0x10000 build /jade.bin 0x9000 build /partition_table/partition-table.bin
1919
2020# Setup the python environment
2121source ~ /venv3/bin/activate
@@ -37,25 +37,26 @@ mkdir -p ${PATCHDIR}
3737./tools/mkpatch.py ${FW_NORADIO} ${FW_BLE} ${PATCHDIR} # makes both directions
3838sleep 2
3939
40- # first we test the same exact firmware noblobs via serial without the hash file being present
40+ # first we ota to noblob via ble
41+ # NOTE: the filename is of the pattern: 'final-from-base' - hence noradio*ble*patch.bin
42+ FW_PATCH=$( ls ${PATCHDIR} /* _noradio_* _ble* _patch.bin)
43+ cp " ${FW_NORADIO} .hash" " ${FW_PATCH} .hash"
44+ python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
45+
46+ # then we test the same exact firmware via serial
4147FW_PATCH=$( ls ${PATCHDIR} /* _noradio_* _noradio* _patch.bin)
4248python jade_ota.py --log=INFO --skipble --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
4349sleep 2
4450
45- # now we test from noblob to ble via serial with the hash file in place
51+ # then we test from noblob to ble via serial
4652# NOTE: the filename is of the pattern: 'final-from-base' - hence ble*noradio*patch.bin
4753FW_PATCH=$( ls ${PATCHDIR} /* _ble_* _noradio* _patch.bin)
4854cp " ${FW_BLE} .hash" " ${FW_PATCH} .hash"
4955python jade_ota.py --log=INFO --skipble --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
5056sleep 2
5157
52- # now we test the same exact firmware ble via ble without the hash file being present
58+ # finally we test the same exact firmware via ble
5359FW_PATCH=$( ls ${PATCHDIR} /* _ble_* _ble* _patch.bin)
5460python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
5561sleep 2
5662
57- # now we go back to noblob via ble with the hash file in place
58- # NOTE: the filename is of the pattern: 'final-from-base' - hence noradio*ble*patch.bin
59- FW_PATCH=$( ls ${PATCHDIR} /* _noradio_* _ble* _patch.bin)
60- cp " ${FW_NORADIO} .hash" " ${FW_PATCH} .hash"
61- python jade_ota.py --log=INFO --skipserial --bleidfromserial --serialport=${JADESERIALPORT} --fwfile=${FW_PATCH}
0 commit comments