A prototype application that demonstrates OTA Requestor capabilities.
Pull docker image:
$ docker pull connectedhomeip/chip-build-ameba:latest
Run docker container:
$ docker run -it -v ${CHIP_DIR}:/root/chip connectedhomeip/chip-build-ameba:latest
Setup build environment:
$ source ./scripts/bootstrap.sh
To build the demo application:
$ ./scripts/build/build_examples.py --target ameba-amebad-ota-requestor build
The output image files are stored in out/ameba-amebad-ota-requestor/asdk/image
folder.
The bootloader image files are stored in out/ameba-amebad-ota-requestor/asdk/bootloader
folder.
After building the application, Ameba Image Tool is used to flash it to Ameba board.
Launch the linux ota-provider-app and provide the SW_IMAGE_FILE
$ ./chip-ota-provider-app -f ${SW_IMAGE_FILE}
Commission the ota-provider-app using chip-tool
$ ./chip-tool pairing onnetwork 1 20202021
Input ATS$
command to start the CHIP ota-requestor task, then use chip-tool to commission it
$ ./chip-tool pairing ble-wifi 2 <SSID> <PASSWORD> 20202021 3840
After commissioning the ota-requestor, use the chip-tool to announce the ota-provider-app to start the OTA process
$ ./chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0
The OTA process should include downloading the image, verification of image header, erasing upgraded flash partition, writing to flash and checksum verification