- Le plus récent
- Le plus de votes
- La plupart des commentaires
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
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
Contenus pertinents
- demandé il y a un an
- demandé il y a 2 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Assuming your device has enough memory, a single MQTT message can have a payload of up 128KB: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits. That is for publishing to a custom topic, not the reserved shadow topics. So you need to define your own topic. This example publishes to
/some/topic/name
: https://aws.github.io/amazon-freertos/202107.00/embedded-csdk/libraries/standard/coreMQTT-Agent/docs/doxygen/output/html/mqtt_agent_publish_function.html. Shadows are appropriate for status information that changes infrequently, but probably not for this use case.