# Sending file over mqtt using mqttClient-for-Legato

**URL:** <https://mangoh.discourse.group/t/sending-file-over-mqtt-using-mqttclient-for-legato/5773>\
**Category:** Uncategorized\
**Created:** [December 3, 2020, 6:16pm UTC](https://mangoh.discourse.group/t/sending-file-over-mqtt-using-mqttclient-for-legato/5773 "2020-12-03T18:16:21Z")\
**Posts on this page:** 1\
**Showing post:** 51

<div class="post-metadata">

**Author:** ![jyijyi](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/jyijyi/32/997_2.png) [@jyijyi](https://mangoh.discourse.group/u/jyijyi)\
**Post date:** [October 18, 2023, 7:56am UTC](https://mangoh.discourse.group/t/sending-file-over-mqtt-using-mqttclient-for-legato/5773/51 "2023-10-18T07:56:01Z")

</div>

the put the code in your application’s first function

Other user can make it work:

> [@mqttClient Service Connect error?](https://mangoh.discourse.group/t/mqttclient-service-connect-error/9093):
>
> Hi! I’m developing a SW to connect with mosquitto broker. I started from the source code in apps/platformservices of Legato environment. I can right build the project, create the session, but I have problem when I have to connect to the broker: [image] I’m trying to connect without user and password (I’m beginning!) and this is the result: Obviously I connected my mangOH green to internet thought both WiFi and Sim. Which could be the problem?

---

_[View the full topic](https://mangoh.discourse.group/t/sending-file-over-mqtt-using-mqttclient-for-legato/5773)._
