How Do I Get Public Address Info

Hello All,

I am able to get the Local IP for my Subnet mask of I can also get the gateway address, but I am unsure of how I can acquire the Public IP address for my GPRS connection, any help will be appreciated



Hi Samuel,
When you activate your GPRS connection (using ed_DialupConnectionStart () API or using AT+CGACT=1,1), you get an IP address for your module.
This IP address is private to your service provider (normally). Hence, you cannot contact your module from outside world (in case your module is hosting some web server kind of application).

So, to be able to get a public IP address for your module, you need to contact your service provider (i.e. the service provider from which you have purchased the SIM card) and ask to enable the public IP address facility.

In this way, the local IP address that you receive, when you activate the GPRS will become public and will be visible to the world (which is outside the network of your service provider).

Best Regards,
Open AT Fan.

Hi, this is my first reply, actually in VOIP world has the same problem for wireless networks, the solution is use a simple protocol named STUN, please take a look at

There is some GNU source code out there, not sure how hard to port…