MQTT-based file delivery from the thing to AWS Core IOT

0

I'm developing a system based on AWS Core IOT FreeRTOS that is using MQTT and Shadow library to communicate both ways. Is there a way to send a file in the upstream direction, that is from the thing to AWS Core IOT? I see that there is an option to MQTT-based file delivery but I need the other way around.

EyalG
gefragt vor einem Jahr382 Aufrufe
2 Antworten
1
Akzeptierte Antwort

Hi EyalG. There's no equivalent or similar upstream mechanism for MQTT. To do it over MQTT, you would have to break your file into parts of not more than 128KB (current MQTT payload limit) for transport and re-constitute it in the cloud.

One alternative you may consider is to upload to S3 using HTTP: https://aws.amazon.com/blogs/iot/securely-ingesting-large-sized-payloads-from-iot-devices-to-the-aws-cloud/. You can find a similar demo implementation here: https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/main/demos/http/http_demo_s3_upload/http_demo_s3_upload.c

profile pictureAWS
EXPERTE
Greg_B
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor einem Monat
0

Thank you for the answer. In my case the requested file length is much less then 128K but the only way I know to communicate with the Core is by updating the shadow topic with publish call (MQTTAgent_Publish). How can I send a file with that MQTT interface if its size is less then 128K? Thanks

EyalG
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen