mangOH project: how to create it?

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):
https://docs.legato.io/latest/confLeaf.html

I’m compiling the mangOH project from 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

for mqtt , you can see here:

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?

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


isn’t it correct?

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

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

yes, that is correct.

1 Like

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
    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

  • 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

Is not right my reasoning?