QMI SDK on EM7565: Can't get IP address


#1

Hi There all,

I’m running

SWI0 SDK Process: SU:Process Started, version: SLQS04.00.11

on an EM7565 module in a custom linux environment.

Everything seems to run OK, I can start and stop data sessions using the Connection_Manger sample app or my own code based off the SDK developers guide.

But I can’t get an IP address from either the function SLQSGetRuntimeSettings or SLQSWdsSwiPDPRuntimeSettings ( I don’t know if the latter should work anyway; the api just comes back with an error unknown api function, and I don’t know where to get the context ID from other than by inspecting the logs).

But SLQSGetRuntimeSettings should work: I can see the QMI getting the settings (well, calling the function psrwds_getsettings):

Feb  1 13:30:55 user.info controlconnmgrarm: StartUMTSDataSession: umts data session 1059157984 started
Feb  1 13:31:01 user.info controlconnmgrarm: getIPFromNetwork getting settings for 1059157984
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:qmqmireq/1523: Request: QMI Instance 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:SDK->Mdm: request received : ipcch/svctype/xactionlen/clientnum: 0/0001/11/0
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:SDK->Mdm: request validated : ipcch/svctype/xactionlen/clientnum: 0/0001/11/0
Feb  1 13:31:01 user.debug SWI0 SDK Process: ~~~~qm_wds_get_instance_id~~~
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 0, SIDv4: 1059157984, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 1, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 2, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 3, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01  user.debug SWI0 SDK Process: PID: 4, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 5, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 6, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: PID: 7, SIDv4: 0, SIDv6: 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM-DCS:SDK<-DCS Resp: ch/Msgid/Msglen/Svctype: 0/0001/0/1
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:qmqmireq/1523: Request: QMI Instance 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:SDK->Mdm: request received : ipcch/svctype/xactionlen/clientnum: 0/0001/11/0
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:SDK->Mdm: request validated : ipcch/svctype/xactionlen/clientnum: 0/0001/11/0
Feb  1 13:31:01  user.debug SWI0 SDK Process: psrwds_getsettings:
Feb  1 13:31:01  user.debug SWI0 SDK Process: QM:qmqmireq/1637: WDS Request: Active Client 0, WDS Client 0
Feb  1 13:31:01 user.debug SWI0 SDK Process: USB read: bytes2read = 118, read 118 bytes
Feb  1 13:31:01 user.debug SWI0 SDK Process: QM:SDK<-Mdm Resp: ch/Msgid/Msglen/client: 0/002d/115/0
Feb  1 13:31:01  getIPFromNetwork pProfileName info is null
Feb  1 13:31:01 : getIPFromNetwork pUsername info is null
Feb  1 13:31:01 : getIPFromNetwork pIPFamilyPreference info is null
Feb  1 13:31:01  getIPFromNetwork pTechnology info is null
Feb  1 13:31:01  getIPFromNetwork ip, dns, gateway null

The thing is, I can happily get the IP address using AT commands all day long, but I’m trying to do it through the API.

I’ve tried with different profiles, setting the default profile, and other variations but all without success. I have also tried using an MC7304 module, but with the same results. So this is something to do with the SDK itself or my Linux environment, or something I’ve missed, but I can’t think what it is.

Any help would be appreciated ! Thanks


#2

Hi,

Getting the IP address from the unit with out an active session running through the API’s is difficult as it does not automatically populate the fields without one (I get you can see it with at+cgpaddr=1). What is the use case?

If you start a session then use the getruntimesettings API it will come back fully populated.

Regards

Matt


#3

Hi @mlw,

Thanks for the reply.

There is an active session, demonstrated by the fact that I get a session ID - for example, the v4 session id in the logs I posted is 1059157984, that’s the v4 session id returned by the SLQSStartStopDataSession api, and it’s that value that’s passed in the call to SLQSGetRuntimeSettings. I assumed, from the documentation, that it’s this session ID that’s required to get those fields populated ? Here’s another example, where the session id is 1587151552:

Feb  1 14:34:56 imx6sxsabresd user.debug controlconnmgrarm: iSLQSStartStopDataSession/2797: WDS start interface verbose error: 0
Feb  1 14:34:56 user.debug SWI0 SDK Process: QM:qmqmireq/1523: Request: QMI Instance 0
Feb  1 14:34:56 user.debug SWI0 SDK Process: QM:SDK->Mdm: request received : ipcch/svctype/xactionlen/clientnum: 0/0001/15/0
Feb  1 14:34:56 user.debug SWI0 SDK Process: QM:SDK->Mdm: request validated : ipcch/svctype/xactionlen/clientnum: 0/0001/15/0
Feb  1 14:34:56 user.debug SWI0 SDK Process: ~~~~qm_wds_set_session_id~~~
Feb  1 14:34:56 user.debug SWI0 SDK Process: PID: 0, SIDv4: 1587151552, SIDv6: 0
Feb  1 14:34:56 user.debug SWI0 SDK Process: PID: 1, SIDv4: 0, SIDv6: 0
...
Feb  1 14:34:56 user.debug SWI0 SDK Process: PID: 7, SIDv4: 0, SIDv6: 0
Feb  1 14:34:56 user.debug SWI0 SDK Process: QM-DCS:SDK<-DCS Resp: ch/Msgid/Msglen/Svctype: 0/0000/0/1
Feb  1 14:34:56 user.debug controlconnmgrarm: wdsSessionDataLog/147: PDP0: v4SH: 1587151552, v6SH: 0
Feb  1 14:34:56 user.debug controlconnmgrarm: wdsSessionDataLog/157: Error Code: 0 (0x0)
Feb  1 14:34:56 user.debug controlconnmgrarm: wdsSMprint/182: action: START, sid: 1587151552, v4sid: 1587151552, v6sid: 0

Does the SDK expect something else to have been done before a session can be said to be active, i.e. just getting a session ID on SLQSStartStopDataSession isn’t enough ? I do know that SLQSStartStopDataSession does indeed start a data session because I can confirm from the other end of the connection that a data session is active.

The use case is this: there is a single qcqmi0 in/dev; the Gobi drivers create an eth2 interface, but this is not brought up automatically when a data connection is established, so I’m trying to get an interface and route added programatically; there will only ever be a default profile; the sim I’m using has a private ipV4 apn and it works, I can transmit/ receive if I configure the interface and route through the values returned by AT commands. But I need it working with the SDK api’s because it will be a part of some larger code.

GobiSerial 1-1:1.0: GobiSerial converter detected
usb 1-1: GobiSerial converter now attached to ttyUSB0
GobiSerial 1-1:1.2: GobiSerial converter detected
usb 1-1: GobiSerial converter now attached to ttyUSB1
GobiSerial 1-1:1.3: GobiSerial converter detected
usb 1-1: GobiSerial converter now attached to ttyUSB2
GobiNet 1-1:1.8 eth2: register 'GobiNet' at usb-ci_hdrc.1-1, GobiNet Ethernet Device, 16:59:ee:5a:98:22
USB Speed : USB 2.0
creating qcqmi0
RawIP mode

#4

Hi,

I do not expect the API’s to require anything other than a session to be up and running, the host system might need a little more such as a dhclient command forcing the connection through on the host interface of network manager is off (as I suspect it is).

Regards

Matt


#5

Hi Matt,

I just can’t figure it out, it’s weird. With the interface - eth2 in my case - set to dhcp, it picks up the IP and gateway no problem, with the same values that the AT commands return. The interface then behaves as any connected interface would. And data tx/ rx is fine. But trying to get the IP settings via the api just doesn’t work. Neither of the methods do.


#6

Just to close this off, it was resolved by using the absolute latest greatest drivers.