<div dir="auto">What carrier are you using?<div dir="auto">Does carrier support your modem, imei?</div><div dir="auto">Does carrier require provisioning before imei can be on network?</div><div dir="auto">What drivers are used? # lsusb -t</div><div dir="auto">Can you run get home network? </div><div dir="auto">Paste results from --dms-list-stored-images</div><div dir="auto">What is result from --dms-get-power-state</div><div dir="auto">When manual, issue --wds-set-ip-family=,4</div><div dir="auto">After manual run, issue cmd --wds-get-current-settings </div><div dir="auto">Remember to run all with -v while troubleshoot.</div><div dir="auto"><br></div><div dir="auto">I ran into similar issue, with internal error, it was carrier not liking my modem.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 15, 2020, 1:57 AM Tor Rune Skoglund <<a href="mailto:trs@fourc.eu">trs@fourc.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dan,<br>
<br>
thank you very much for your input.<br>
<br>
Den 14.04.2020 21:17, skrev Dan Williams:<br>
<br>
>If you really need to switch to 802-3 mode, OK. But that needs ot<br>
> happen on both ends: QMI (eg what the firmware expects) and the kernel<br>
> . This command only changes one (firmware).<br>
><br>
> You also need to change the kernel side with --set-expected-data-<br>
> format=<same>. Both need to agree.<br>
><br>
> qmicli will try to do this for you, but as you see below it fails.<br>
><br>
> In any case, try both the --wda-set-data-format and --set-expected-<br>
> data-format.<br>
><br>
> If that works, then we can move on to the pdn-ipv6-call-disallowed<br>
> issue. For that, please add the "-v" flag (for verbose mode) when<br>
> calling --wds-start-network so we can see the actual QMI commands<br>
> passed to the device.<br>
><br>
> Maybe it was asked before, but what qmicli version are you using?<br>
<br>
It is version 1.22.2.<br>
<br>
There is no change when adding --set-expected-data-format. Below is the <br>
log:<br>
<br>
Btw, the Linux kernel is compiled without IPv6 on this system. That is <br>
why we have specfied ip-type=4. But maybe it is still related to the <br>
kernel not supporting v6 here?<br>
<br>
# Checking that we are not connected and that autoconnect is not enabled<br>
$ qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status<br>
[/dev/cdc-wdm0] Connection status: 'disconnected'<br>
$ qmicli -d /dev/cdc-wdm0 --wds-get-autoconnect-settings<br>
Autoconnect settings retrieved:<br>
Status: 'disabled'<br>
Roaming: 'allowed'<br>
# Seems OK<br>
<br>
# Settings expected data format<br>
$ qmicli -d /dev/cdc-wdm0 --set-expected-data-format=802-3<br>
[/dev/cdc-wdm0] expected data format set to: 802-3<br>
<br>
# Check which data format we have<br>
$ qmicli -d /dev/cdc-wdm0 --wda-get-data-format<br>
[/dev/cdc-wdm0] Successfully got data format<br>
QoS flow header: no<br>
Link layer protocol: 'raw-ip'<br>
Uplink data aggregation protocol: 'disabled'<br>
Downlink data aggregation protocol: 'disabled'<br>
NDP signature: '0'<br>
Uplink data aggregation max size: '0'<br>
Downlink data aggregation max size: '0'<br>
<br>
# Change to 802-3<br>
$ qmicli -d /dev/cdc-wdm0 --wda-set-data-format=802-3<br>
[/dev/cdc-wdm0] Successfully set data format<br>
QoS flow header: no<br>
Link layer protocol: '802-3'<br>
Uplink data aggregation protocol: 'disabled'<br>
Downlink data aggregation protocol: 'disabled'<br>
NDP signature: '0'<br>
Downlink data aggregation max datagrams: '0'<br>
Downlink data aggregation max size: '0'<br>
<br>
# Seemed to work.<br>
# Just check again to be sure<br>
$ qmicli -d /dev/cdc-wdm0 --wda-get-data-format<br>
[/dev/cdc-wdm0] Successfully got data format<br>
QoS flow header: no<br>
Link layer protocol: '802-3'<br>
Uplink data aggregation protocol: 'disabled'<br>
Downlink data aggregation protocol: 'disabled'<br>
NDP signature: '0'<br>
Uplink data aggregation max size: '0'<br>
Downlink data aggregation max size: '0'<br>
<br>
# Start the network manually<br>
$ qmicli -v -d /dev/cdc-wdm0 --wds-start-network=apn=internet,ip-type=4 <br>
--client-no-release-cid<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] Opening device with <br>
flags 'auto'...<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] loaded driver of cdc-wdm <br>
port: qmi_wwan<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] automatically selecting <br>
QMI mode<br>
[15 Apr 2020, 08:40:59] [Debug] QMI Device at '/dev/cdc-wdm0' ready<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] Assuming service 'wds' <br>
is supported...<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] Allocating new client ID...<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] sent message...<br>
<<<<<< RAW:<br>
<<<<<< length = 16<br>
<<<<<< data = 01:0F:00:00:00:00:00:01:22:00:04:00:01:01:00:01<br>
<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] sent generic request <br>
(translated)...<br>
<<<<<< QMUX:<br>
<<<<<< length = 15<br>
<<<<<< flags = 0x00<br>
<<<<<< service = "ctl"<br>
<<<<<< client = 0<br>
<<<<<< QMI:<br>
<<<<<< flags = "none"<br>
<<<<<< transaction = 1<br>
<<<<<< tlv_length = 4<br>
<<<<<< message = "Allocate CID" (0x0022)<br>
<<<<<< TLV:<br>
<<<<<< type = "Service" (0x01)<br>
<<<<<< length = 1<br>
<<<<<< value = 01<br>
<<<<<< translated = wds<br>
<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] received message...<br>
<<<<<< RAW:<br>
<<<<<< length = 24<br>
<<<<<< data = <br>
01:17:00:80:00:00:01:01:22:00:0C:00:02:04:00:00:00:00:00:01:02:00:01:09<br>
<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] received generic <br>
response (translated)...<br>
<<<<<< QMUX:<br>
<<<<<< length = 23<br>
<<<<<< flags = 0x80<br>
<<<<<< service = "ctl"<br>
<<<<<< client = 0<br>
<<<<<< QMI:<br>
<<<<<< flags = "response"<br>
<<<<<< transaction = 1<br>
<<<<<< tlv_length = 12<br>
<<<<<< message = "Allocate CID" (0x0022)<br>
<<<<<< TLV:<br>
<<<<<< type = "Result" (0x02)<br>
<<<<<< length = 4<br>
<<<<<< value = 00:00:00:00<br>
<<<<<< translated = SUCCESS<br>
<<<<<< TLV:<br>
<<<<<< type = "Allocation Info" (0x01)<br>
<<<<<< length = 2<br>
<<<<<< value = 01:09<br>
<<<<<< translated = [ service = 'wds' cid = '9' ]<br>
<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] Registered 'wds' <br>
(version unknown) client with ID '9'<br>
[15 Apr 2020, 08:40:59] [Debug] Network start parameters set (apn: <br>
'internet', 3gpp_profile: '0', 3gpp2_profile: '0', auth: 'unspecified', <br>
ip-type: '4', username: 'unspecified', password: 'unspecified', <br>
autoconnect: 'unspecified')<br>
[15 Apr 2020, 08:40:59] [Debug] Asynchronously starting network...<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] sent message...<br>
<<<<<< RAW:<br>
<<<<<< length = 28<br>
<<<<<< data = <br>
01:1B:00:00:01:09:00:01:00:20:00:0F:00:19:01:00:04:14:08:00:69:6E:74:65:72:6E:65:74<br>
<br>
[15 Apr 2020, 08:40:59] [Debug] [/dev/cdc-wdm0] sent generic request <br>
(translated)...<br>
<<<<<< QMUX:<br>
<<<<<< length = 27<br>
<<<<<< flags = 0x00<br>
<<<<<< service = "wds"<br>
<<<<<< client = 9<br>
<<<<<< QMI:<br>
<<<<<< flags = "none"<br>
<<<<<< transaction = 1<br>
<<<<<< tlv_length = 15<br>
<<<<<< message = "Start Network" (0x0020)<br>
<<<<<< TLV:<br>
<<<<<< type = "IP Family Preference" (0x19)<br>
<<<<<< length = 1<br>
<<<<<< value = 04<br>
<<<<<< translated = ipv4<br>
<<<<<< TLV:<br>
<<<<<< type = "APN" (0x14)<br>
<<<<<< length = 8<br>
<<<<<< value = 69:6E:74:65:72:6E:65:74<br>
<<<<<< translated = internet<br>
<br>
[15 Apr 2020, 08:41:01] [Debug] [/dev/cdc-wdm0] received message...<br>
<<<<<< RAW:<br>
<<<<<< length = 32<br>
<<<<<< data = <br>
01:1F:00:80:01:09:02:01:00:20:00:13:00:02:04:00:01:00:0E:00:10:02:00:03:00:11:04:00:02:00:D2:00<br>
<br>
[15 Apr 2020, 08:41:01] [Debug] [/dev/cdc-wdm0] received generic <br>
response (translated)...<br>
<<<<<< QMUX:<br>
<<<<<< length = 31<br>
<<<<<< flags = 0x80<br>
<<<<<< service = "wds"<br>
<<<<<< client = 9<br>
<<<<<< QMI:<br>
<<<<<< flags = "response"<br>
<<<<<< transaction = 1<br>
<<<<<< tlv_length = 19<br>
<<<<<< message = "Start Network" (0x0020)<br>
<<<<<< TLV:<br>
<<<<<< type = "Result" (0x02)<br>
<<<<<< length = 4<br>
<<<<<< value = 01:00:0E:00<br>
<<<<<< translated = FAILURE: CallFailed<br>
<<<<<< TLV:<br>
<<<<<< type = "Call End Reason" (0x10)<br>
<<<<<< length = 2<br>
<<<<<< value = 03:00<br>
<<<<<< translated = generic-no-service<br>
<<<<<< TLV:<br>
<<<<<< type = "Verbose Call End Reason" (0x11)<br>
<<<<<< length = 4<br>
<<<<<< value = 02:00:D2:00<br>
<<<<<< translated = [ type = 'internal' reason = '210' ]<br>
<br>
error: couldn't start network: QMI protocol error (14): 'CallFailed'<br>
call end reason (3): generic-no-service<br>
verbose call end reason (2,210): [internal] pdn-ipv6-call-disallowed<br>
[/dev/cdc-wdm0] Client ID not released:<br>
Service: 'wds'<br>
CID: '9'<br>
[15 Apr 2020, 08:41:01] [Debug] [/dev/cdc-wdm0] Releasing 'wds' client <br>
with flags 'none'...<br>
[15 Apr 2020, 08:41:01] [Debug] [/dev/cdc-wdm0] Unregistered 'wds' <br>
client with ID '9'<br>
[15 Apr 2020, 08:41:01] [Debug] Client released<br>
[15 Apr 2020, 08:41:01] [Debug] Closed<br>
# Failed with exit code 1 and no handle returned<br>
<br>
<br>
>> Btw, we also tried the qmi-network script, which fails similarly:<br>
>><br>
>> $ qmi-network /dev/cdc-wdm0 start<br>
>> Loading profile at /etc/qmi-network.conf...<br>
>> APN: internet<br>
>> APN user: unset<br>
>> APN password: unset<br>
>> qmi-proxy: yes<br>
>> Checking data format with 'qmicli -d /dev/cdc-wdm0 --wda-get-data-<br>
>> format<br>
>> --device-open-proxy'...<br>
>> Device link layer protocol retrieved: raw-ip<br>
>> Getting expected data format with 'qmicli -d /dev/cdc-wdm0<br>
>> --get-expected-data-format'...<br>
>> Expected link layer protocol retrieved: 802-3<br>
>> Updating kernel link layer protocol with 'qmicli -d /dev/cdc-wdm0<br>
>> --set-expected-data-format=raw-ip'...<br>
>> error: cannot set expected data format: Expected data format not<br>
>> updated<br>
>> properly to 'raw-ip': got '802-3' instead<br>
>> Error updating kernel link layer protocol<br>
>> Starting network with 'qmicli -d /dev/cdc-wdm0<br>
>> --wds-start-network=apn='internet' --client-no-release-cid<br>
>> --device-open-proxy'...<br>
>> error: couldn't start network: QMI protocol error (14): 'CallFailed'<br>
>> call end reason (3): generic-no-service<br>
>> verbose call end reason (2,210): [internal] pdn-ipv6-call-disallowed<br>
>> Saving state at /tmp/qmi-network-state-cdc-wdm0... (CID: 9)<br>
>> error: network start failed, no packet data handle<br>
>> Clearing state at /tmp/qmi-network-state-cdc-wdm0...<br>
>><br>
>> Best regards,<br>
>><br>
>> *Tor Rune Skoglund*<br>
>><br>
>><br>
>> Den 08.04.2020 17:45, skrev Aleksander Morgado:<br>
>>> Hey,<br>
>>><br>
>>>> tir. 7. apr. 2020 kl. 17:17 skrev Aleksander Morgado <<br>
>>>> <a href="mailto:aleksander@aleksander.es" target="_blank" rel="noreferrer">aleksander@aleksander.es</a>>:<br>
>>>>>> I have some further updates here. I read another thread about<br>
>>>>>> the '-p' option,<br>
>>>>>> which, when added to all instances of qmicli invocation in<br>
>>>>>> the init.d file makes<br>
>>>>>> the problem go away in at least more than 9 out of 10 cases.<br>
>>>>>> So it is<br>
>>>>>> apparently a timing issue. Still have to test this on more<br>
>>>>>> than one<br>
>>>>>> system, but I am optimistic. :)<br>
>>>>> The "-p" option, if used, must be used in ALL qmicli commands,<br>
>>>>> so that<br>
>>>>> all use the intermediate qmi-proxy.<br>
>>>>> I wonder what init.d file you're talking about, though?<br>
>>>> We initialise the modem with this routine (somewhat simplified to<br>
>>>> illustrate the points):<br>
>>>><br>
>>>> START_NETWORK_ARGS=apn="internet",ip-type=4,autoconnect=yes<br>
>>>><br>
>>>> #QMICMD='qmicli -p '<br>
>>>> QMICMD='qmicli '<br>
>>>><br>
>>>> for DEV in $(find /dev -maxdepth 1 -name "cdc-wdm*" | sort)<br>
>>>> do<br>
>>>> WANIF=$($QMICMD -d "$DEV" -w)<br>
>>>> if $QMICMD -d "$DEV" --wds-get-packet-service-status | grep<br>
>>>> -q status:..connected ; then<br>
>>>> echo "Stopping as it was already connected $DEV $WANIF"<br>
>>>> $QMICMD -d "$DEV" --wds-stop-network=disable-autoconnect<br>
>>> That above is not a good way to disconnect if you're manually<br>
>>> running<br>
>>> Start Network, see other comments below.<br>
>>><br>
>>>> ip link set "$WANIF" down 2>&1<br>
>>>> ip addr flush dev "$WANIF" 2>&1<br>
>>>> echo "Stopped broadband on $DEV $WANIF to restart<br>
>>>> connection"<br>
>>>> fi<br>
>>>><br>
>>>> # Does it work at all....?<br>
>>>> if ! $QMICMD -d "$DEV" --wda-get-data-format ; then<br>
>>>> echo "Modem does not respond as expected - trying to<br>
>>>> reset it"<br>
>>>> # Here we had some code to try various things to get it<br>
>>>> working, like resetting the usb port it is connected to.<br>
>>>> # However, following commands could still fail<br>
>>>> fi<br>
>>>><br>
>>>> # Change to 802-3<br>
>>>> if $QMICMD -d "$DEV" --wda-get-data-format | grep -q 'raw-<br>
>>>> ip'; then<br>
>>>> echo "Identified $DEV $WANIF as raw-ip, changing to 802-<br>
>>>> 3"<br>
>>>> if ! $QMICMD -d "$DEV" --wda-set-data-format=802-3 ;<br>
>>>> then<br>
>>>> echo "wda-set-data-format=802-3 failed"<br>
>>> You cannot change data format after having started the connection.<br>
>>> In<br>
>>> the logic below you're connecting in 2 different ways (start<br>
>>> network<br>
>>> with apn, and autoconnect), but you're only stopping in one way<br>
>>> (autoconnect). It may happen that the set data format fails because<br>
>>> the modem is already connected?<br>
>>><br>
>>>> exit 1<br>
>>>> fi<br>
>>>> else<br>
>>>> echo "Failed to set $DEV $WANIF data format to 802-3"<br>
>>>> fi<br>
>>>><br>
>>>> # Set up if correct mode<br>
>>>> if ! $QMICMD -d "$DEV" --wda-get-data-format | grep -q '802-<br>
>>>> 3'; then<br>
>>>> echo "Modem is not is correct data format mode"<br>
>>> Don't rely on devices supporting all 802.3. All new QMI devices<br>
>>> don't<br>
>>> support 802.3, they only support raw-ip. If you're stuck with an<br>
>>> older<br>
>>> model, this may be enough though, so just a heads up.<br>
>>><br>
>>>> exit 1<br>
>>>> fi<br>
>>>> echo "Starting broadband on $DEV $WANIF with args<br>
>>>> '$START_NETWORK_ARGS'"<br>
>>>> $QMICMD -d "$DEV" --wds-start-network=${START_NETWORK_ARGS:-<br>
>>>> apn=\"internet\"} --client-no-release-cid<br>
>>>> $QMICMD -d "$DEV" --wds-set-autoconnect-<br>
>>>> settings=enabled,roaming-allowed<br>
>>> You're attempting to manually connect with start network and then<br>
>>> enabling autoconnect, and that doesn't make sense, these are 2<br>
>>> different things. Autoconnect will use the "default 3GPP" profile<br>
>>> settings, and the manual start network will try to use whatever<br>
>>> settings you're passing. You should either use one approach or the<br>
>>> other, using both won't work properly I believe.<br>
>>><br>
>>> Also, if you run start network manually, you need to keep track of<br>
>>> the<br>
>>> CID you used to connect, and also track of the "connection id"<br>
>>> returned by the command, so that you can then perform the<br>
>>> associated<br>
>>> stop network passing the correct cid and the correct connection id.<br>
>>><br>
>>>> echo "Started broadband on $DEV $WANIF"<br>
>>>> killall -HUP dhcpcd<br>
>>>> exit 0 # Done<br>
>>>> done<br>
>>>><br>
>>>> einfo "Failed to set up broadband adapter"<br>
>>>> exit 1 # Failed<br>
>>>><br>
>>>> If I use -p it seems to work close to 100% (maybe 100% of the<br>
>>>> times). Without the script fails too often on the first wda-get-<br>
>>>> data-format.<br>
>>>><br>
>>>> (Btw, --wds-start-network also gives an error, but it does not<br>
>>>> seem to affect anything:<br>
>>>> qmicli -p -d /dev/cdc-wdm0 --wds-start-network=apn=internet,ip-<br>
>>>> type=4,autoconnect=yes --client-no-release-cid<br>
>>>> error: couldn't start network: QMI protocol error (14):<br>
>>>> 'CallFailed'<br>
>>>> call end reason (3): generic-no-service<br>
>>>> verbose call end reason (2,210): [internal] pdn-ipv6-call-<br>
>>>> disallowed<br>
>>>> [/dev/cdc-wdm0] Client ID not released:<br>
>>>> Service: 'wds'<br>
>>>> CID: '9')<br>
>>> If start network fails, but anyway you're connected it means the<br>
>>> modem<br>
>>> may be setup to autoconnect using the default 3GPP profile (see<br>
>>> qmicli<br>
>>> --wds-get-profile-list=3gpp and qmicli<br>
>>> --wds-get-default-profile-num=3gpp). So it is not that it doesn't<br>
>>> affect anything, it's that you may be trying to connect with<br>
>>> different<br>
>>> settings to the default ones, and the settings you used explicitly<br>
>>> are<br>
>>> failing.<br>
>>><br>
>>>> Actually, while writing this mail, I made a new discovery: It<br>
>>>> looks like if -wda-get-data-format fails once, for example when<br>
>>>> running it first without -p, it will keep on failing, even if run<br>
>>>> with -p later. However, a usb port reset (unbind/bind) will make<br>
>>>> it work again if I then run with -p directly afterwards.<br>
>>>><br>
>>>> I have very few clues on what is going on. It could very well be<br>
>>>> that we are doing something wrong....(?)<br>
>>>><br>
>>> The use of "-p" just makes all your qmicli requests be forwarded to<br>
>>> the device through an intermediate qmi-proxy process. This is done<br>
>>> so<br>
>>> that multiple applications can use the port at the same time for<br>
>>> different commands; either multiple qmicli calls or even different<br>
>>> programs doing different QMI interactions. E.g. you can use the<br>
>>> "Mobile Radio Monitor" program<br>
>>> (<a href="https://sigquit.wordpress.com/2013/09/17/mobile-radio-monitor/" rel="noreferrer noreferrer" target="_blank">https://sigquit.wordpress.com/2013/09/17/mobile-radio-monitor/</a>) at<br>
>>> the same time as ModemManager is managing the device because both<br>
>>> programs use the intermediate proxy. If there is one program using<br>
>>> the<br>
>>> proxy, all programs must use it.<br>
>>><br>
>>> If some programs use it and some others don't, the ones not using<br>
>>> it<br>
>>> will all fight each other with the qmi-proxy for the access to the<br>
>>> QMI<br>
>>> control port.<br>
>>><br>
>>> If you're on doubt on what to do, just use the proxy always always,<br>
>>> and never attempt a qmicli command without using the proxy, as that<br>
>>> will break the comm between the device and the proxy. So, the tests<br>
>>> sometimes trying with "-p" and sometimes without "-p" don't really<br>
>>> make sense because the testing itself is breaking the flow.<br>
>>><br>
>>> Also, a lot of this logic is already handled in the qmi-network<br>
>>> script, I'd suggest you take a look at its source code, it's quite<br>
>>> simple.<br>
>>><br>
>>> Cheers!<br>
>>><br>
>> _______________________________________________<br>
>> libqmi-devel mailing list<br>
>> <a href="mailto:libqmi-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">libqmi-devel@lists.freedesktop.org</a><br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/libqmi-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/libqmi-devel</a><br>
_______________________________________________<br>
libqmi-devel mailing list<br>
<a href="mailto:libqmi-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">libqmi-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/libqmi-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/libqmi-devel</a><br>
</blockquote></div>