AVSystem / Anjay

C implementation of the client-side OMA LwM2M protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to send/transfer files from Client to server ?

koolkarni opened this issue · comments

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

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.