Hello everyone, is it possible to communicate two arduino or esp32 with gsm internet? What I can think of is this: I will have an esp32 in my home module and this esp will be able to connect to the internet via wifi via the modem. The module I have will also be an esp or arduino, but will connect to the internet with a quactel m95. How can I communicate these two modules with each other? I think TCP/IP is used and things like that, but I don't have much experience with TCP/IP and the internet.
(I translated the text from Google, sorry for mistakes)
Yes, it's possible.
You need to specify the demands on the communication link. Then find out what protocol would be needed.
It seems that it can communicate with the MQTT protocol. TCP/IP must be connected to the same network. They put in an RPI in MQTT but I'm still investigating
trying to follow the above
- does the ESP32 connect to the internet using a local WiFi network
- or does the ESP32 use a M95 modem to connect to the internet?
either way two ESP32 micros can certainly use TCP/IP to connect - there are many TCP and UDP client/server examples available
think we require a more detailed specification
noted that the M95 supports 2G - 2G is being switched off in many countries - we are currently using a EC21 which supports 4G
The first esp can access the internet connected to my modem via wifi in my home. The second esp is connected to the quectel m95 module. I am trying to communicate these two esps with each other. I consulted chatGPT regarding TCP/IP and it told me it should be connected to the same network. It offered me an MQTT connection since the two esps are not connected to the same network. Could you please give me an example code or video tutorial for this? When I look at the m95 AT commands, there is an AT+QIOPEN command, but I don't know how it works (the operator I use will provide 2G service in our country until 2029)
Clearly, they're not!
Your ESP is on your home network, and the Quectel* is on the mobile network.
You won't be able to connect direct from your ESP to the Quectel* unless you pay for a special SIM which gives it a static IP address.
To connect direct from the Quectel* to your ESP, you would have to set up your home network connection to allow incoming connections - probably using Port Forwarding.
A common alternative, instead of a direct connection, is to have both of your units connect to a server in "The Cloud" - and communicate via that as an intermediary.
Arduino has a service for that:
and many, many others are available.
* Note that this is not specific to Quectel (or ESP) - the same would apply to any mobile device, and any device on your home network.
Indeed; also 3G:
what information do you wish to transfer between the devices? how much? how often? etc
for a simple example of transferring data between a pair of ESP32 have a look at problem-transmiting-data-between-two-esp8266mod - try something simple initally
you could run a server on the ESP32 at your home, connect it using WiFi to the local network and setup the routert to "port forward" packets arriving from the internet to the ESP32 server
if your have a look at the Quectel M95 "AT commands Manual" and application notes you should find examples of using the AT commands to connect over TCP to a remote server
Edit: are you using a M95 development board or building your own PCB?
The operator I use will provide 2g service until 2029, which is enough time for me.
I explain exactly what I want to do so that different solutions can be found. A phone I want to build, yes it has esp32. You can remove applications that do not run on esp32 eg whatsapp, office google etc. I will connect to my home computer with my phone (ie with esp32 and quectel m95) in order to use it remotely. I thought that I could not connect to my computer directly to connect to my computer, so I found it appropriate to put another esp32 in between. I will write the program to control my computer with Python. This is my main concern.
Simple strings and numbers. The Quectel m95 module I use is normally a vehicle tracking system, but I use it for my own purposes.
can you use the ESP32 to send AT commands to the M95 and see the response?
Yes, I even made a phone using the same quectel m95 module and an arduino pro mini and used the phone for about 4 months. If you want, I can upload a video on youtube for you to see.Now I'm trying to make a more advanced phone that can specifically send and receive whatsapp messages.
Why?
If you can connect to the ESP, then you can connect to a computer on the same network!
Can I remotely connect to my computer with m95 without using ESP32 once in a while?
See previous replies!
M95 could connect to your PC using port forwarding as indicated in previous posts
just carried out a test using a SIM900 GSM modem - commumicated OK with an ESP32 using a simple TCP client(on SIM900)/server(on ESP32) protocol transferring a data structure in binary
// test structure
struct __attribute__((packed)) Data {
int16_t seq; // sequence number
int32_t distance;
float voltage;
char text[50];
} data;
you could run a TCP server on your PC for the M95 to connect too
you could use an existing server or implement one in C++, C#, Java, Python, etc
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.