# cannot get IP Address from MC7354

**URL:** <https://forum.sierrawireless.com/t/cannot-get-ip-address-from-mc7354/7481>\
**Category:** MC/EM Series\
**Created:** [October 3, 2014, 11:03pm UTC](https://forum.sierrawireless.com/t/cannot-get-ip-address-from-mc7354/7481 "2014-10-03T23:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hchen0121](https://avatars.discourse-cdn.com/v4/letter/h/8c91f0/32.png) [@hchen0121](https://forum.sierrawireless.com/u/hchen0121)\
**Post date:** [October 3, 2014, 11:03pm UTC](https://forum.sierrawireless.com/t/cannot-get-ip-address-from-mc7354/7481/1 "2014-10-03T23:03:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rex\_alex](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@Rex\_alex](https://forum.sierrawireless.com/u/Rex_alex)\
**Post date:** [October 8, 2014, 11:22am UTC](https://forum.sierrawireless.com/t/cannot-get-ip-address-from-mc7354/7481/2 "2014-10-08T11:22:30Z")

</div>

Hi,

Can you try with SLQSWdsSwiPDPRunTimeSettings() API?
