There is a GSM modem (SIM800) (client) and Windows PC (server).
On the router connected to the PC configured the forwarding port (TCP 60100 - 60100 TCP) which knocks the GSM modem.
Is, which works on two UDP ports on a Windows PC (60102 UDP for transmission and 60103 UDP receive).
The question is how to link the port 60100 TCP dual port 60102 60103 UDP and UDP?
Partially solved the issue by using socat for Windows
The team (TCP -> UDP1)
socat tcp4-listen:60100,reuseaddr,fork UDP:127.0.0.1:60103
on a Windows PC works fine - the data from GSM modem accepted. But I can't get to work the transmission in the opposite direction to the GSM modem.
I tried this: (TCP -> UDP1 and UDP2 -> TCP)
socat tcp4-listen:60100,reuseaddr,fork UDP:127.0.0.1:60103 | socat udp4-listen:60102,reuseaddr,fork tcp:localhost:60100
it turns out that data from the modem will be accepted, but I myself am passing the data to be sent to the modem.
socat tcp4-listen:60100,reuseaddr,fork UDP:127.0.0.1:60103 | socat udp4-listen:60102,reuseaddr,fork tcp:192.168.115:60100
does not open a connection (192.168.115 - PC IP address)
Also, I tried to use netcat
but the result is not achieved.
To receive and send data on the same UDP port is not able.