Simple question, i think


#1

using the new wip libraries, after establishing an ip connection (gprs), how does one display the given ip address of the modem (q24pl001)?


#2

Hi wavelet,

You can use the wip_bearergetOpts () API and retrieve the IP address.

For instance,

ascii IpAddr[16];
wip_in_addr_t appIpAddr;
wip_bearerGetOpts(Br_Id, WIP_BOPT_IP_ADDR, &appIpAddr, WIP_BOPT_END); //This API provides IP in network format (i.e u32 number)
wip_inet_ntoa(appIpAddr , IpAddr, 16); //This API converts the u32 IP address to a dotted notation IP address.

Where Br_Id is the wip_bearer_t structure associated with the bearer that you have opened.

The IP address in this case, would be present in the IpAddr [] array which can then be printed out.

Best Regards,
Open AT Fan.[/code]


#3

works great, thanks