I am trying to set up multiple parallel APN connections with a RM500Q-GL. I am using a sequence of qmicli commands taken from the Internet. I can set up the first connection, but whenever I try to start the second one I receive the following error:
error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (1): generic-unspecified
verbose call end reason (2,236): [internal] call-already-present
> [/dev/cdc-wdm0] Client ID not released:
Service: 'wds'
CID: '16'
I suspect there is some step missing in what I am doing.
This is the sequence of commands I am using:
systemctl stop NetworkManager
systemctl stop ModemManager
cat /sys/class/net/wwan0/qmi/raw_ip
echo "N" > /sys/class/net/wwan0/qmi/raw_ip
cat /sys/class/net/wwan0/qmi/raw_ip
ip link set wwan0 down
ip link set wwan0 mtu 8192
echo 1 > /sys/class/net/wwan0/qmi/add_mux
echo 2 > /sys/class/net/wwan0/qmi/add_mux
cat /sys/class/net/wwan0/qmi/add_mux
ip link set wwan0 up
ip link set qmimux0 up
ip link set qmimux1 up
qmicli -d /dev/cdc-wdm0 --wda-set-data-format=link-layer-protocol=raw-ip,ul-protocol=qmap,dl-protocol=qmap,dl-max-datagrams=32,dl-datagram-max-size=8192
#Get CID
qmicli -d /dev/cdc-wdm0 --wds-noop --client-no-release-cid
# example, assuming CID 15 was returned
qmicli -d /dev/cdc-wdm0 --wds-bind-mux-data-port=mux-id=1,ep-iface-number=4 --client-no-release-cid --client-cid=15
qmicli -d /dev/cdc-wdm0 --wds-start-network=apn=<first apn>,ip-type=4 --client-no-release-cid --client-cid=15
# Setting interface to returned IP
qmicli -d /dev/cdc-wdm0 --wds-get-current-settings --client-no-release-cid --client-cid=15
ip addr add 172.17.26.170/30 dev qmimux0
ping -I qmimux0 8.8.8.8
# ^^^^ Works for first APN
# repeat for 2nd APN
qmicli -d /dev/cdc-wdm0 --wds-noop --client-no-release-cid -v
# assuming 16 was returned
qmicli -d /dev/cdc-wdm0 --wds-bind-mux-data-port=mux-id=2,ep-iface-number=4 --client-no-release-cid --client-cid=16
qmicli -d /dev/cdc-wdm0 --wds-start-network=apn=<second APN>,ip-type=4 --client-no-release-cid --client-cid=17
# ^^^ Fails with
error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (1): generic-unspecified
verbose call end reason (2,236): [internal] call-already-present
> [/dev/cdc-wdm0] Client ID not released:
Service: 'wds'
CID: '16'
Modem:
ati
Quectel
RM500Q-GL
Revision: RM500QGLABR11A04M4G
OK
qmicli version
qmicli --version
qmicli 1.32.0
Copyright (C) 2012-2022 Aleksander Morgado
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Linux version:
uname -a
Linux hummingboardpulse-imx8q-ip144 5.16.5-imx8 #trunk SMP PREEMPT Wed Feb 2 08:03:23 CET 2022 aarch64 GNU/Linux
Driver version:
modinfo qmi_wwan | grep "vermagic"
vermagic: 5.16.5-imx8 SMP preempt mod_unload aarch64
Hardware:
SolidRun i.MX8MQ HummingBoard Pulse SBC