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
질문됨 일 년 전382회 조회
2개 답변
1
수락된 답변

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
전문가
Greg_B
답변함 일 년 전
profile picture
전문가
검토됨 한 달 전
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인