# mangOH project: how to create it?

**URL:** <https://forum.legato.io/t/mangoh-project-how-to-create-it/5697>\
**Category:** Uncategorized\
**Created:** [April 6, 2021, 5:31pm UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697 "2021-04-06T17:31:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 6, 2021, 5:31pm UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/1 "2021-04-06T17:31:54Z")

</div>

Hi all!  
I think I’m posting a stupid question, but I can’t find a guide about it.  
I have a **mangOH green** with a **wp7607 module** and a **Talon CAN bus transceiver**.  
My project consists in **acquiring CAN signals** and eventually **storing them on SD** and **sending them on the cloud** , implementing an **MQTT communication**.  
I installed the driver CAN and I finally can see the CAN signal detected in the ifconfig menu. I also installed a SIM and I also managed to connect my mangOH device to AirVantage.  
I followed this guide to understand how works a Legato project and I also worked on the mentioned tutorials (that worked well):

> **[Leaf Workspace Manager - Legato Docs](https://docs.legato.io/latest/confLeaf.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development

I’m compiling the **mangOH project** from gitHub:

> **[Project mangOH](https://github.com/mangOH)**
>
> Project mangOH has 40 repositories available. Follow their code on GitHub.

My question is: **which are the files I need to work on in this project?** I’ll explain. Following the example of hello\_world, the COMPONENT INIT is found in the .c file. In my case, to work on the CAN network on which file should I work? On can\_iot.c? Would he be my main? Or green.sdef?

Yet another question. If I wanted to implement MQTT communication, using for example **MOSQUITTO MQTT, which file should I work on?** In my project I see a mqttClientComp folder: do I have to work in mqttmain.c? And should the make be done in this folder? What and how do I send the file to the board? Is it enough to send all the .update file that I compile by doing the make in the main folder?

Really sorry for the inconvenience, I would like to clarify my ideas on these aspects, if by chance there is a guide well done about it, if you could link it to me, I would be very happy.  
Greetings

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 7, 2021, 4:19am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/2 "2021-04-07T04:19:05Z")

</div>

for mqtt , you can see here:

> [@How to use component 3rdParty paho.mqtt.c](https://forum.legato.io/t/how-to-use-component-3rdparty-paho-mqtt-c/5612/16):
>
> Seems you don’t really try the sample code!!! I don’t see problem with it. [mqtt.rar](https://forum.legato.io/uploads/short-url/nKZUcKJ1upQGZWFPvjFe3jQNL1D.rar) (5.0 KB)

---

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 7, 2021, 8:36am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/3 "2021-04-07T08:36:32Z")

</div>

Useful example. But my question is the following. In the mangOH project folder I have many other folders, for example in apps I see the mqttClient folder. I ran **make wp76xx** in this folder and it obviously generated an .update file. At this point what should I do? Load on the card the various .updates generated in all the folders, or just send me the general .update of the whole mango folder?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 7, 2021, 8:43am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/4 "2021-04-07T08:43:23Z")

</div>

for mangoh projevct, you are not building with “make wp76”.  
Should be something like “make green\_wp76xx”.  
Probably you need to see the Makefile.

---

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 7, 2021, 8:45am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/5 "2021-04-07T08:45:51Z")

</div>

![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/c/c0cdec51d7d29e78c269405e09710744e6cb3ceb.png)

…

 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/e/eb7840bd946f52f078b5951764118486f2090656.png)

isn’t it correct?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 7, 2021, 8:51am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/6 "2021-04-07T08:51:31Z")

</div>

then this is just compiling the mqttclient application as inside the Makefile, it is calling mkapp:

> <https://github.com/mangOH/MqttClient/blob/0f068cd3bd83b96a6a0847f6f3d5fa1df1f298ac/Makefile>

---

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 7, 2021, 9:01am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/7 "2021-04-07T09:01:35Z")

</div>

okay, but I have to use the command makeapp with .adef files right?  
**mkapp program.adef -t wp76xx**

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 7, 2021, 9:25am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/8 "2021-04-07T09:25:06Z")

</div>

yes, that is correct.

---

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 7, 2021, 10:05am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/9 "2021-04-07T10:05:34Z")

</div>

Thanks. So, in order to understand how to work in the next weeks, I wil try to summarize what I understand.

1. If I want to manage CAN communication:

- I follow this path: /home/mangoh/Downloads/mangOH\_2-7-2019\_mangoh\_green\_CAN\_OK/mangOH\_2-7-2019/linux\_kernel\_modules  
In this path I find:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/a/a79104920fddbb1f8ab61fe86806f9ff87b4e307.png)  
and I have to act on the can\_iot.c or equivalently on the script start\_can.sh. I don’t have to do other things because I have already done:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/2X/5/5d368e29db9ee7997ec4fadc7dacb41c8e01fdf8.png)

- So I have only to refresh the .update file doing **make green\_wp76xx** in mangOH folder.  
**Have I to use kill switch app? I read something about it…**

1. If I want to manage MQTT communication

- I follow the path /home/mangoh/Downloads/mangOH\_2-7-2019\_mangoh\_green\_CAN\_OK/mangOH\_2-7-2019/apps
- cd MqttClient
- any changes in .c files
- **mkapp -t wp76xx mqttClient.adef**
- **app install mqttClient wp76xx.uodate 192.168.2.2**
- I enter in the board and see if Mqtt app is started or not
- Alternatively: in MqttClient folder there is a script folder that contains the bt-init.sh file: I could work on it and flash it on the board.

Do you agree with my reasoning? I apologize for the inconvenience, but I am trying to fix my ideas and what I know, in view of what I have to do in the next few days.  
Greetings

---

<div class="post-metadata">

**Author:** ![ga.imparato](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@ga.imparato](https://forum.legato.io/u/ga.imparato)\
**Post date:** [April 8, 2021, 8:08am UTC](https://forum.legato.io/t/mangoh-project-how-to-create-it/5697/10 "2021-04-08T08:08:24Z")

</div>

Is not right my reasoning?
