AVSystem / Anjay

C implementation of the client-side OMA LwM2M protocol
Other
188 stars 68 forks source link

How to send/transfer files from Client to server ? #24

Closed koolkarni closed 4 years ago

koolkarni commented 5 years ago

What is the way to transfer large chunks of data like files from client to server ?

dextero commented 5 years ago

Right now, the only way of sending large payloads from LwM2M client to LwM2M server is to do it with a LwM2M Read. The file would need to be exposed in the data model, and the server would need to request the operation.

Unfortunately there is no API for uploading arbitrary data in current version of Anjay. You may try using the low-level CoAP API (https://github.com/AVSystem/avs_commons/tree/master/coap/include_public/avsystem/commons/coap), but that requires some manual handling of the CoAP BLOCK-wise transfer.