How to use MQTT to send binary files for OTA ?

262 views
Skip to first unread message

Davinder Singh

unread,
Aug 5, 2017, 4:25:53 AM8/5/17
to MQTT
We have a project which is running in the field . Controller is connected to GSM module. We want to send firmware file. Is it possible to do over the air updates using MQTT ? 
Can you give some pointers on sending binary files via MQTT ? 

Nick O'Leary

unread,
Aug 5, 2017, 6:17:58 PM8/5/17
to mq...@googlegroups.com
Hi,

MQTT is a transport protocol. It can be used to send bytes over the network. What those bytes contain and how your application chooses to interpret them is up to you.

How you send a file will depend on the specific client libraries you are using. You may consider chunking a particularly large file into smaller pieces and send them separately, reassembling them on the client side. Again, how you do that is up to your application.

Nick

On 5 August 2017 at 09:25, Davinder Singh <davinders...@gmail.com> wrote:
We have a project which is running in the field . Controller is connected to GSM module. We want to send firmware file. Is it possible to do over the air updates using MQTT ? 
Can you give some pointers on sending binary files via MQTT ? 

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+unsubscribe@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

Nicholas Humfrey

unread,
Aug 6, 2017, 10:18:21 AM8/6/17
to mq...@googlegroups.com
As Nick says, it is difficult to say the best approach without knowing
about the details of your application.

But I would possibly consider sending a message to clients that a new
firmware is available over MQTT.
And then distribute the firmware over HTTP and using a CDN.

There was a question about sending binary files using Mosquito on Stack
Overflow:
https://stackoverflow.com/questions/37149336/binary-data-using-mosquito-mqtt


nick.



On 2017-08-05 23:17, Nick O'Leary wrote:
> Hi,
>
> MQTT is a transport protocol. It can be used to send bytes over the
> network. What those bytes contain and how your application chooses to
> interpret them is up to you.
>
> How you send a file will depend on the specific client libraries you
> are using. You may consider chunking a particularly large file into
> smaller pieces and send them separately, reassembling them on the
> client side. Again, how you do that is up to your application.
>
> Nick
>
> On 5 August 2017 at 09:25, Davinder Singh
> <davinders...@gmail.com> wrote:
>
>> We have a project which is running in the field . Controller is
>> connected to GSM module. We want to send firmware file. Is it
>> possible to do over the air updates using MQTT ?
>> Can you give some pointers on sending binary files via MQTT ?
>>
>> --
>> To learn more about MQTT please visit http://mqtt.org
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "MQTT" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to mqtt+uns...@googlegroups.com.
>> To post to this group, send email to mq...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/mqtt [1].
>> For more options, visit https://groups.google.com/d/optout [2].
>
> --
> To learn more about MQTT please visit http://mqtt.org
> ---
> You received this message because you are subscribed to the Google
> Groups "MQTT" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mqtt+uns...@googlegroups.com.
> To post to this group, send email to mq...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mqtt.
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1] https://groups.google.com/group/mqtt
> [2] https://groups.google.com/d/optout
Reply all
Reply to author
Forward
0 new messages