EM7565 LTE Modem

Hello,
I'm upgrading a router from a MC7455 to the EM7565.
The MC7455 works just fine but when I'm trying to setup an EM7565 I can't get it work properly.
The driver is installed, cdc and ttyUSBx exposed rightfully.
I'm using uqmi to verify everything before configuring a new wwan interface.
The first uqmi command get stuck, so I abort

root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-capabilities
^C"Failed to connect to service"
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-capabilities
{
        "max_tx_channel_rate": 50000000,
        "max_rx_channel_rate": 100000000,
        "data_service": "non_simultaneous_cs_ps",
        "sim": "supported",
        "networks": [
                "umts",
                "lte"
        ]
}
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-imei
"359260080100727"
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0  --get-signal-info
"Information unavailable"
root@OpenWrt:/# uqmi -d /dev/cdc-wdm0 --get-pin-status
"Not supported"

By the way, when I ask about the sim card through the AT commands (echo -e "AT+cpin?\r" > /dev/ttyUSB2), I get the answer it's ok (+CPIN: READY).

With AT commands too, I activate the modem ( echo -e "AT+cfun=1\r" > /dev/ttyUSB2), then it attach instantly.
uqmi can see it

root@OpenWrt:/# uqmi -d /dev/cdc-wdm0  --get-signal-info
{
        "type": "lte",
        "rssi": -69,
        "rsrq": -9,
        "rsrp": -100,
        "snr": 218
}

Does anyone can point me to what is wrong or not done?

1 Like

I've been poking at my EM7565 for a while now trying to read both IPv4 and IPv6 addressing from it (though on Debian right now).

Have you confirmed that OpenWrt is dealing with it as a "raw IP" device?

See this may help ?
https://patchwork.ozlabs.org/patch/841804/

This patch is already applied, so yes OpenWRT see it as a "raw-ip" device. But before creating the interface through Luci, I check manually the commands and the first one always get stuck.

root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --wda-get-data-format
^C"Failed to connect to service"
root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --wda-get-data-format
"raw-ip"

The driver is informed of the raw-ip mode

cat /sys/class/net/wwan0/qmi/raw_ip
Y

uqmi report the SIM as not supported, so when I create the interface,the script can't go further

root@OpenWrt:/# uqmi -s -d /dev/cdc-wdm0 --get-pin-status
"Not supported"

Extract of the logread:

Thu Nov 22 12:23:26 2018 daemon.notice netifd: Interface 'nkt' is setting up now
Thu Nov 22 12:23:26 2018 daemon.notice netifd: nkt (6171): Waiting for SIM initialization
Thu Nov 22 12:23:27 2018 daemon.notice netifd: nkt (6171): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Thu Nov 22 12:23:27 2018 daemon.notice netifd: nkt (6171): Waiting for network registration
Thu Nov 22 12:23:28 2018 daemon.notice netifd: nkt (6171): Starting network nkt
Thu Nov 22 12:23:28 2018 daemon.notice netifd: nkt (6171): Unable to connect IPv4
Thu Nov 22 12:23:28 2018 daemon.notice netifd: nkt (6231): Stopping network nkt
Thu Nov 22 12:23:28 2018 daemon.notice netifd: nkt (6231): Command failed: Permission denied
Thu Nov 22 12:23:28 2018 daemon.notice netifd: Interface 'nkt' is now down
Thu Nov 22 12:23:28 2018 daemon.notice netifd: Interface 'nkt' is setting up now
Thu Nov 22 12:23:28 2018 daemon.notice netifd: nkt (6239): Waiting for SIM initialization
Thu Nov 22 12:23:29 2018 daemon.notice netifd: nkt (6239): Device does not support 802.3 mode. Informing driver of raw-ip only for wwan0 ..
Thu Nov 22 12:23:29 2018 daemon.notice netifd: nkt (6239): Waiting for network registration
Thu Nov 22 12:23:29 2018 daemon.notice netifd: nkt (6239): Starting network nkt
Thu Nov 22 12:23:29 2018 daemon.notice netifd: nkt (6239): Unable to connect IPv4
Thu Nov 22 12:23:30 2018 daemon.notice netifd: nkt (6305): Stopping network nkt
Thu Nov 22 12:23:30 2018 daemon.notice netifd: nkt (6305): Command failed: Permission denied
Thu Nov 22 12:23:30 2018 daemon.notice netifd: Interface 'nkt' is now down

It's ok. This type of modems doesn't support this command. SIM status is available through the uim service, that not included to uqmi.
Please give output of:
:/# ps | grep qmi

Here is the result

root@OpenWrt:/# ps | grep qmi
22460 root      1244 S    /bin/sh ./qmi.sh qmi setup nkt {"proto":"qmi","devic
22516 root      1024 S    uqmi -s -d /dev/cdc-wdm0 --set-client-id wds 18 --re
22518 root      1072 S    grep qmi

These UIM commands work fine with previous generation (MC74xx), should I go back to AT for UIM management?

I successfully make it work, with AT commands, it need to be activated as by default it is in LowPowerMode

echo -e "AT+cfun=1\r">/dev/ttyUSB2

to make it permanent, I activated the persistent state with special commands:

echo -e "AT!entercnd=\"A710\"\r">/dev/ttyUSB2
echo -e "AT!custom=\"CFUNPERSISTEN\",1\r">/dev/ttyUSB2
echo -e "AT+cfun=1\r">/dev/ttyUSB2

I'm still interested by a way to set/check the UIM through QMI

I've been poking at my EM7565 for a while now trying to read both IPv4 and IPv6 addressing from it (though on Debian right now).

We just got support for this in the latest ModemManager.

Anyway, posting here because I am getting resets or crashes of the modem whenever I saturate the connection. Running OpenWrt master. Does anyone have any best practices or advice for running this module in OpenWrt?