Im creating a system in which the server must send to an arduino device a certain request. Currently, i have an ethernet shield connected to arduino, and i'm using the HTTP request with the private IP address of the arduino board, and everything is fine.
However, i'm going to change the system and include a SIM card with internet connectivity enabled. How can I send an HTTP request to a device whose IP address is not known?
One alternative is to send an SMS asking the device to reply with an HTTP message containing the needed information.
But I'm trying to find a solution that doesn't involve sending SMS to Arduino
When you used the Ethernet module, you likely configured the Arduino as a server. The Arduino had to be listening through the Ethernet module for it to respond to incoming connections. Well, you need to do the same thing if you've switched to using a GSM module. You need to set it up as a server. Unfortunately, that isn't possible. Network service providers don't allow inbound connections because a single public IP address is shared by many subscribers.
Whatever happens, its clear that the device at the other end cannot initiate the connection; the GSM module must always go first. Depending on your intention, you should either have the Arduino + SIM900 regularly ping the server with status updates or make it connect to the server with a
keep-alive HTTP 1.1 header and await further commands.