Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1416 Posts: 7560
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 78 Posts: 343
I'm trying to update the firmware on the XDK using FOTA. I am using leshan LWM2M server to do the work and to host the bin file using the Californium CoAP server. Both servers are running on diffrent ports but on same machine. What I achieved is as follows:
1. Whenever I'm trying to write the file I get error Unable to write resource / 5/0/1
2. But if I check the SD card on XDK I see one file named FIRMAWAREUPDATE.BIN, whos size is not equal to the size of the file I am updating.
3. As I try to update the firmware XDK crashesh.
Please gide ,
A LwM2M Server MUST support block-wise transfer
The URI format is defined in RFC 3986. For example, coaps://example.org/firmware is a syntactically valid URI. The URI scheme determines the protocol to be used. For CoAP this endpoint MAY be a LwM2M Server but does not necessarily need to be. A CoAP server implementing block-wise transfer is sufficient as a server hosting a firmware repository and the expectation is that this server merely serves as a separate file server making firmware images available to LwM2M Clients.
Sorry for the late reply.
I am using the Californium CoAP server, I’ve some update on issue.
Now I am able to download full bin file on the sd card throiugh the same server., but now issue is I am unable to flash the file on the XDK. I think I am using the wrong bin file to flash. Can u please tell me which file(bin file) I should host in CoAP server and from where I will get that file?
INFO | Creating Firmware Over the Air (FOTA) Container
INFO | Binary File: /home/alexander/XDK-Workspace/MyProject/debug/MyProject.bin
INFO | Header Version: 0100
INFO | Product Class: 0010
INFO | Product Variant: 0000
INFO | Firmware Version: 00000000
I have bootloader version 1.1.0 and selected correctely for the project. As per your suggestion I’ve checked the after build result and it looks fine(attaching the screenshot).
It seems that previously also I was using the correct bin file, the path is as per follow.
INFO | Binary File: /root/XDKWorkspace/BoschXDKCloudConnectivity/debug/BoschXDKCloudConnectivity.bin
Another isssue I am facing now is, now whenever I am trying to write the file from leshan server on XDk, leshan server is unable to send the request to CoAP(Californium Server) which is hosting the bin file. Attaching the screenshot of leshan CoAP messages. I am new to CoAP so unable to understand the issue.
As you mentioned in your last comment about applying FOTA correctly, can you please elaborate on the same?