I have to connect two cellular modems(MTC-H5-B03) which have SIM cards that give them acces to data connection configuring the APN and that stuff. I have to do all the data exchange using AT commands.
My problem is that I assume that when it lost the internet connection for whatever reason, you get a new IP address, so I do not know how to configure the connection, the point is that it has to be automatic, without human interaction. I can configure the connection as TCP or UDP. I have heard something about seting a dynamic DNS?
Can I redirect the dynamic IPaddress to a fixed name or something like that and make the connection to that name? I make the connection through this command:
AT#SD=1,1,####,"###.##.###.##" where #### is the server port and
###.##.###.## is the IP number.
Thanks a lot!
First, the host behind your GSM-modems should use some dynamic DNS provider in order to register its current IPv4 address in some DNS zone. This makes exactly what you are asking for - glueing the fixed name to dynamic IPv4 address.
Second, you must configure your software to connect to other host using it fixed DNS-name. The name resolving to it current IP address will be done "automatically" as usual name resolving does.
This is the main feature and the commont usage of various Dynamic DNS providers.
IMHO, the desired behaviour can't be achieved using AT commands ;-(