Hi,
I'm experimenting with the lwm2m sample on the nRF9160-DK and I enabled the firmware update pull support through a COAP to HTTP proxy :
CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_SUPPORT=y CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_SUPPORT=y CONFIG_LWM2M_FIRMWARE_UPDATE_PULL_COAP_PROXY_ADDR="coap://MY_IPV4:5682" CONFIG_COAP_EXTENDED_OPTIONS_LEN=y CONFIG_COAP_EXTENDED_OPTIONS_LEN_VALUE=16then simply added :
if (last_block) {
LOG_INF("Firmware update done. Rebooting");
boot_request_upgrade(true);
sys_reboot(SYS_REBOOT_WARM);
}and the end of firmware_block_received_cb and used the COAP to HTTP proxy from linarotechnologies/cf-proxy-coap-http as provided by the docker container:version: '3'
services:
firmware-server:
image: opensourcefoundries/nginx:latest
container_name: firmware-server
volumes:
- ./workspace-code/MCU/build/zephyr:/usr/share/nginx/html
cf-proxy-coap-http:
image: linarotechnologies/cf-proxy-coap-http:latest
container_name: cf-proxy-coap-http
ports:
- "5682:5682/udp"
links:
- firmware-server:firmware-serverbut the process doesn't always go smoothly especially if I trigger the update (writing http://firmware-server/app_update.bin to resource 5/0/1) right after the registration. I have a feeling that that there's a deadlock with the COAP stack and everything gets stalled. Is the push method rather recommended here? Thanks