EC200T unable to receive data as a server

Hello
I have two EC200T modules, each soldered on a pcb. I have a server with static IP. Using each module, I can establish a connection to my server and send data to it.
Now, I want these two modules to be able to send data to each other.
What I planned to do, was to establish a connection using both modules to my server, and then create a TCP or UDP server on one of the modules. Then send its IP address to the server,
and then server would send the IP to the other module, so it can connect to the first module directly. but I was not able to send anything to any of the modules.

After making sure there is service using “AT+CGATT?\r\n”, then I use the following commands:
“AT+QICFG=“transwaittm”,2\r\n” // set wait time
“AT+QICSGP=2,1,“APN-name”,”“,”“,0\r\n” // setting APN, contextID=2, context_type=1 (IPV4)
“AT+QIACT=2\r\n” // activating context 2
“AT+CGPADDR=2\r\n” // get IP address returned with “+CGPADDR:…”

at this point, if try pinging my server (or sending data to it) it succeeds, but I will try to listen to incoming connections:
//contextID=2, connectID=3,remote_port=3030, local_port=3030, access_mode=0 (BufferAccessMode)
“AT+QIOPEN=2,3,“UDP SERVICE”,“127.0.0.1”,3030,3030,0\r\n”

This command does not return any “ERROR”, and returns a “+QIOPEN: 3,0” which indicates there was no error opening the connectID=3 connection.

After trying to send some UDP packets to the IP and port address, no URC is received from module.
Also, if I try to read the buffer using “AT+QIRD=3\r\n” anyway, I receive a “572,operation not allowed” error, which I assume to be due to the buffer being empty.

Even pinging the module’s IP with my pc or server fails. but the module can successfully ping the server with static IP. (I’m not sure if the EC200T should return the ping query by default or a some configuration is needed)

I have tried changing the connection “type”, and have tried the followings:
“UDP LISTENER”, “UDP SERVICE”, “TCP LISTENER”, “TCP SERVICE”.
I poll the state of connection in a loop, and receive something like this:

+QISTATE: 3,“UDP LISTENER”,“dynamic-IP-of-module”,0,3030,3,2,3,0,“uart1”
+QISTATE: 3,“UDP SERVICE”,“dynamic-IP-of-module”,0,3030,2,2,3,0,“uart1”
+QISTATE: 3,“TCP LISTENER”,“dynamic-IP-of-module”,0,3030,3,2,3,0,"uart

meaning that when I use “TCP LISTENER” or “UDP LISTENER”, the socket state is 3 (Listening). and it stays that way no matter how many packets I try to send, or how many times I try to establish a TCP connection.
And when I use “UDP SERVICE”, the socket state is 2 (Connected) from the beginning, and even in this state I have not been able to receive anything with the module (no URC from the module), or been able to ping it.

and when trying to open a “TCP SERVICE” using “AT+QIOPEN=2,3,“TCP SERVICE”,“127.0.0.1”,3030,3030,0\r\n”, it fails with error 552 (invalid parameters).

Can anyone explain what is the problem here? Or how can I send data directly from one module to another module?

Hi
Has somebody faced similar situation? How can I connect two modem modems directly?

Hi,
If you want to estabilsh a TCP client,you should open a “TCP SERVICE” using “AT+QIOPEN=2,3,“TCP”,“127.0.0.1”,3030,3030,0\r\n”,the “TCP SERVICE” is the invalid parameter.

Hi
Thank you for your response. But the main issue still remains, that I can’t connect from internet to the module, but am able to connect from module to another address in the internet. From what I’ve gathered, the problem seems to be that I’m behind carrier’s NAT. I’d like to hear other people’s experience regarding similar issues.