Home/Support/Support Forum/ConnectPort X4- how to get cellular WAN IP (via RCI?)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

ConnectPort X4- how to get cellular WAN IP (via RCI?)

0 votes
ConnectPort X4- how to get cellular WAN IP via RCI?

Looking at the XML responses from mobile related RCI calls, I've not been able to find where the WAN IP in use is reported.

Here's the need: Tests indicate that the mobile_stats RCI response reports call status of "connected.." before IP packets can be sent. It may be that "connected" is a link layer concept, but the modem has to get an IP address from the cellular system, be it dynamic or public/static (the latter is my case). If Python and RCI cannot do it, I'd resort to doing a digicli command and screen-scraping the response (kludge).

The HTML web page displays the WAN IP for cellular.. From where does the web server get that?

The alternative might be to send pings until a response is received (under timeout).. but I've not found a python 2.4 library supporting ICMP ping.
(edit: I found a Python ping utility- changed getprotocolbyname. Ping works. Still hoping for answer to above). Also.... discovered that digicli has a ping command.

Thanks in advance.
asked Jan 15, 2013 in Python by stevech New to the Community (17 points)

Please log in or register to answer this question.

2 Answers

0 votes

Check out <stats_index> under the mobile_stats group. This should point to an RCI group called <ppp_stats index="x"> where x is the value shown under the stats_index element.

For example, in one X4 I looked at, the stats_index was 5, and the related ppp_stats group looked like:
<ppp_stats index="5"> <state>active</state> <ip_address></ip_address> <peer_address></peer_address> <dns_address_primary></dns_address_primary> <dns_address_secondary></dns_address_secondary> ... </ppp_stats>
I think the ip_address field corresponds to the Cellular IP.

answered Jan 18, 2013 by cpopp Seasoned Professional (151 points)
0 votes
Thanks very much.
I'll look for that element.
I had pored over that RCI response looking but didn't find it for the Verizon Sierra Wireless modem. Also have some Huawei modems too.
answered Jan 18, 2013 by stevech New to the Community (17 points)