4G application projects

You can also use simple tcp communication

The mangoh has the nc program which you can use to test tcp connectivity without writing any code.

One think to keep in mind is that to make a tcp connection between two mangohs over cellular the target mangoh has to have an IP address which is visible to the originator.

Great thanks for the advice. Are there any existing examples or projects?

i think you can search how to use “nc” easily in google.

If you want to implement in C program:

If I use tcp/ip should I add modem data control commands to transfer files other than SMS, as it is explained? In other words, is modem data control necessary to establish communication between 2 mangoh and send GPS coordinates or messages, if using tcp/ip?

You can use the cm command to establish data connection

Inside my code !? Or just from the terminal? I would like to edit ou code. I know cm command but just used that from terminal

Found it! Thanks. Forget my previous question

After reading the documentation, I araised 2 questions:

  • are SMS commands only to communicate with a telephone (not adapted for communication between 2 mangoh)
  • if I want to store data , should I use le_cfg_CreateWriteTxn or snprintf? I don’t really understand when it is adviced to use config tree?

Sms can be applied to mangoh boards

Normally config tree is for application setting

Ok get it!
As I want to connect over LTE network, what is the IP address of my mangoh to use if I want to send messages using TCP/IP protocol. is only for USB connection right?

Also, I cannot connect using this

Did you set the correct apn for your sim card?

it is defaultly set to iot.swir. Do I need to change for internet.sierrawireless.com as explained in pdf guide?

You can see here for more information

Hi, i try to implement this c code on the mangoh to establish a tcp communication between my working environnment (laptop) and my mangoh. I did a tcp server app for the mangoh, and i tried to launch the tcpClient on my laptop where i specify “” for the server ip adress. The server is listening on the mangoh, but i can’t connect to the openned socket from the laptop with the tcpClient (ofc i can ping and there is no firewall). So i tried to implement a tcpClient app on the mangoh to communicate with the tcpServer app which already exist to test it, and it is still not working. I can’t see a reason wich explain this failure, do you have an idea ?

EDIT : finally, for the app tcpClient on the mangoh, it works when i specify “” for the ip server adress on the client, but it doesn’t with “”. I don’t understand because the socked is supposed to be binded with all the interfaces : i wrote “servaddr.sin_addr.s_addr = htonl(INADDR_ANY);” on the server side like the exemple. I still can’t establish the connection between my laptop and my mangoh.

I am not concerned by this issue but thanks.
Just need to understand : the mangoh yellow has an SIM integrated but if I want to connect to the LTE network I need to buy another SIM card from an operator or it is not necessary?

You can shut down firewall by the following

iptables -I INPUT -j ACCEPT

You can try that sim first, if it does not work, buy another sim card

I had already shutdown the firewall on my working environnement. I’m working on a virtual machine which runs on windows 10, i also tried to shutdown windows 10 firewall, it is still not working. A little precision, the errno number that i obtain is 110, which correspond to “connection timed out”, which i think means that the mangoh receive the demand but doesn’t respond. I verify with the logreads that my tcpServer works, i indeed have the LE_INFO that said that the server is listening.

Suggest you trying on ubuntu instead of win10

Or you can capture wireshark log to see what happens in win10