cannot get IP Address from MC7354

Hi there,

I am using QMI SDK API to talk with MC7354. After establishing the data session (there is a normal inet addr showed up under eth1 after typing “ifconfig”), I try to use the following api to get the IP from the device:

[b]ULONG PDPType;
CHAR bufIPAddress[128];
ULONG IPAddress;
ULONG primaryDNS;
ULONG secondaryDNS;
ULONG authentication;
CHAR profileName[17];
CHAR APNName[104];
CHAR Username[129];
WORD extendedErrorCode = 0;

ULONG resultCode = SLQSGetProfile( 0,
1,
&PDPType,
&IPAddress,
&primaryDNS,
&secondaryDNS,
&authentication,
17,
profileName,
104,
APNName,
129,
Username,
&extendedErrorCode );
fprintf(stderr, “get profile - Return Code: %lu\n”,resultCode);[/b]
IPUlongToDot(IPAddress, bufIPAddress);
fprintf(stderr, “IP Address: %s\n”,bufIPAddress);

I get this period of code from the Connection_Manager sample program under official SDK folder. The method works fine but it always returns me an IP like “0.0.0.0” in the last line. Does anyone know where the problem is? Did I use the wrong api to get the ip?

Thanks

Hi,

Can you try with SLQSWdsSwiPDPRunTimeSettings() API?