wget with https not working via qmimux0
Daniele Palmas
dnlplm at gmail.com
Sat May 18 17:23:20 UTC 2024
Hello Martin,
Il giorno mer 15 mag 2024 alle ore 11:35 Martin Maurer
<martin.maurer at mmeacs.de> ha scritto:
>
> Hello Daniele,
>
> Am 04.05.2024 um 21:54 schrieb Daniele Palmas:
> > Hello Martin,
> >
> > Il giorno ven 3 mag 2024 alle ore 15:54 Martin Maurer
> > <martin.maurer at mmeacs.de> ha scritto:
> >> Hello,
> >>
> >> I establish a connection via qmicli.
> >>
> >> I set raw IP to "Y". I am using qmimux0.
> >>
> >> I can sent pings (e.g. to 8.8.8.8 with various ping message sizes).
> >>
> >> When I use wget with --bin-address=x.x.x.x (x.x.x.x the assigned IPv4
> >> address), the http seems to work.
> >>
> >> I get a redirection to https, but https it not successful. It seems that
> >> https start phase (encryption) is not successful.
> >>
> >> Also downloading via http does not work. Perhaps something with big
> >> frames received as answer?
> >>
> >> Doing the same over attached ethernet works.
> >>
> >> I have set MTU to the value I got during connection establishment.
> >>
> >> Does someone have a clue, what could be wrong or have seen the same
> >> previously?
> >>
> > Without more details on how the connection has been made through
> > qmicli and how the netdevice has been configured it is hard to tell.
> >
> > I suggest directly using ModemManager so that everything is setup
> > properly, but if you still want to go with qmicli you can compare the
> > steps you are doing to the ones listed at
> > http://paldan.altervista.org/linux-qmap-qmi_wwan-multiple-pdn-setup/
> > that should be working fine.
> >
> > Regards,
> > Daniele
> >
> >> I have previously used a linux kernel 5.x, meanwhile using a linux
> >> kernel 6.6.21, but same behaviour.
> >>
> >> qmicli version 1.34.
> >>
> >> Many thanks!
> >>
> >> Best regards,
> >>
> >> Martin
>
>
> many thanks for your answer and sorry for the late reply.
>
> I want to go through the way of using qmicli (or better later python
> equivalent), even if it is the more difficult way.
>
> At the moment I am using 2 different scripts, one for a single
> connection mode (without qmimux) and one for dual connection mode (with
> qmimux):
>
> Currently limited testing to IPv4.
>
>
> ************************************* 1111
> *************************************
>
> This is the script for single connection mode:
>
> # cat testme_single.sh
> #!/bin/sh
>
> # WWAN_NAME=wwu1u1u1i4
> WWAN_NAME=wwu1u1i4
>
> uname -a
> qmicli --version
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
>
> ip link set dev $WWAN_NAME down
> cat /sys/class/net/$WWAN_NAME/qmi/raw_ip
> echo "Y" > /sys/class/net/$WWAN_NAME/qmi/raw_ip
> cat /sys/class/net/$WWAN_NAME/qmi/raw_ip
> ip link set dev $WWAN_NAME up
>
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
>
> # get 1x WDS client ids and don't release them.
> wds_cid=$(qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --client-no-release-cid --wds-noop|grep CID|cut -d\' -f2)
>
> # client ids shall henceforth be referred to as $wds_cid.
>
> echo "wds_cid=$wds_cid"
>
> # FIRST CONNECTION
>
> # start network using the same WDS client id:
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-start-network="apn=internet.telekom,ip-type=4"
> --client-cid=$wds_cid --client-no-release-cid
>
> # setup the qmimux0 interface using DHCP or by getting IP settings via
> wds-get-current-settings and applying them manually (I only tried the
> latter)
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-get-current-settings --client-cid=$wds_cid --client-no-release-cid
> > /tmp/wds_current_settings.txt
> cat /tmp/wds_current_settings.txt
>
> wds_ip=$(cat /tmp/wds_current_settings.txt|grep "IPv4 address"|awk '{
> print $3}')
> wds_netmask=$(cat /tmp/wds_current_settings.txt|grep "IPv4 subnet
> mask"|awk '{ print $4}')
> wds_gateway=$(cat /tmp/wds_current_settings.txt|grep "IPv4 gateway
> address"|awk '{ print $4}')
> wds_mtu=$(cat /tmp/wds_current_settings.txt|grep "MTU"|awk '{ print $2}')
>
> if [ "$wds_netmask" = "255.255.255.192" ]; then
> wds_suffix="26"
> elif [ "$wds_netmask" = "255.255.255.224" ]; then
> wds_suffix="27"
> elif [ "$wds_netmask" = "255.255.255.240" ]; then
> wds_suffix="28"
> elif [ "$wds_netmask" = "255.255.255.248" ]; then
> wds_suffix="29"
> elif [ "$wds_netmask" = "255.255.255.252" ]; then
> wds_suffix="30"
> else
> echo "Netmask not yet completely implemented"
> wds_suffix="not-implemented"
> fi
>
> echo "IPv4: $wds_ip"
> echo "IPv4 netmask: $wds_netmask"
> echo "IPv4 suffix: $wds_suffix"
> echo "IPv4 gateway: $wds_gateway"
> echo "IPv4 MTU: $wds_mtu"
>
> echo ifconfig $WWAN_NAME down
> ifconfig $WWAN_NAME down
> echo ifconfig $WWAN_NAME up
> ifconfig $WWAN_NAME up
>
> echo ip -4 addr flush dev $WWAN_NAME
> ip -4 addr flush dev $WWAN_NAME
>
> echo ip -4 addr add $wds_ip/$wds_suffix dev $WWAN_NAME
> ip -4 addr add $wds_ip/$wds_suffix dev $WWAN_NAME
> echo ip -4 link set $WWAN_NAME mtu $wds_mtu up
> ip -4 link set $WWAN_NAME mtu $wds_mtu up
> echo ip -4 route add default via $wds_gateway
> ip -4 route add default via $wds_gateway
>
> # TEST CONNECTION
>
> echo ping -4 -I $WWAN_NAME 8.8.8.8 -c 4
> ping -4 -I $WWAN_NAME 8.8.8.8 -c 4
>
> echo wget -4 --bind-address=$wds_ip https://www.showmyip.com/ -O myip.txt
> wget -4 --bind-address=$wds_ip https://www.showmyip.com/ -O myip.txt
> grep "Your IPv4" myip.txt
>
> echo wget -4 --bind-address=$wds_ip http://www.lrz.de/ -O /dev/null
> wget -4 --bind-address=$wds_ip http://www.lrz.de/ -O /dev/null
>
> echo wget -4 --bind-address=$wds_ip http://link.testfile.org/150MB -O
> /dev/null
> wget -4 --bind-address=$wds_ip http://link.testfile.org/150MB -O /dev/null
>
> #
>
>
> ************************************* 2222
> *************************************
>
> This is the script for dual connection mode (but at the moment, I am
> just setting up 2 possible connections but use only 1):
>
>
> # cat testme_dual.sh
> #!/bin/sh
>
> # WWAN_NAME=wwu1u1u1i4
> WWAN_NAME=wwu1u1i4
>
> uname -a
> qmicli --version
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
>
> ip link set $WWAN_NAME down
>
> # using fixed number of interfaces (4) and fixed mux ids [1-4]
> echo 1 > /sys/class/net/$WWAN_NAME/qmi/add_mux
> echo 2 > /sys/class/net/$WWAN_NAME/qmi/add_mux
>
> # Now we have 2 'qmimux[1-2]' interfaces ready to be used for
> simultaneous connections
>
> ls -la /sys/class/net/$WWAN_NAME /sys/class/net/qmimux*
>
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy --dms-get-revision
>
> # get WDA client id and don't release them.
> wda_cid=$(qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --client-no-release-cid --wda-noop|grep CID|cut -d\' -f2)
>
> # client id shall henceforth be referred to as $wda_cid.
>
> echo "wda_cid=$wda_cid"
>
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wda-set-data-format="link-layer-protocol=raw-ip,ul-protocol=qmap,dl-protocol=qmap,dl-max-datagrams=32,dl-datagram-max-size=32768"
> --client-cid=$wda_cid --client-no-release-cid
>
> ip link set $WWAN_NAME mtu 1500
>
The important element is the rx urb size. Since changing the mtu means
also changing the rx urb size (which can't be directly controlled in
userspace), the mtu should be set to the dl-datagram-max-size value of
the reply.
> # enable raw ip encapsulation
> cat /sys/class/net/$WWAN_NAME/qmi/raw_ip
> echo 1 > /sys/class/net/$WWAN_NAME/qmi/raw_ip
> cat /sys/class/net/$WWAN_NAME/qmi/raw_ip
>
> # bring up the link layer. For some reason it seems important to do this
> before starting with QMI traffic.
> ip link set $WWAN_NAME up
>
> # get 2x WDS and WDA client ids and don't release them.
> wds_cid=$(qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --client-no-release-cid --wds-noop|grep CID|cut -d\' -f2)
> wds2_cid=$(qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --client-no-release-cid --wds-noop|grep CID|cut -d\' -f2)
>
> echo "wds_cid=$wds_cid"
> echo "wds2_cid=$wds2_cid"
>
> # FIRST CONNECTION
>
> # note that the 'ep-iface-number' is modem-specific
> # 8 for the Sierra Wireless EM7565
> # 4 for Quectel RM520N-GL
> # set mux ID to '1', which is the ID that has been chosen for the
> qmimux0 interface above
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-bind-mux-data-port="mux-id=1,ep-iface-number=4"
> --client-cid=$wds_cid --client-no-release-cid
>
> # start network using the same WDS client id:
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-start-network="apn=internet.telekom,ip-type=4"
> --client-cid=$wds_cid --client-no-release-cid
>
> # setup the qmimux0 interface using DHCP or by getting IP settings via
> wds-get-current-settings and applying them manually (I only tried the
> latter)
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-get-current-settings --client-cid=$wds_cid --client-no-release-cid
> > /tmp/wds_current_settings.txt
> cat /tmp/wds_current_settings.txt
>
> wds_ip=$(cat /tmp/wds_current_settings.txt|grep "IPv4 address"|awk '{
> print $3}')
> wds_netmask=$(cat /tmp/wds_current_settings.txt|grep "IPv4 subnet
> mask"|awk '{ print $4}')
> wds_gateway=$(cat /tmp/wds_current_settings.txt|grep "IPv4 gateway
> address"|awk '{ print $4}')
> wds_mtu=$(cat /tmp/wds_current_settings.txt|grep "MTU"|awk '{ print $2}')
>
> if [ "$wds_netmask" = "255.255.255.192" ]; then
> wds_suffix="26"
> elif [ "$wds_netmask" = "255.255.255.224" ]; then
> wds_suffix="27"
> elif [ "$wds_netmask" = "255.255.255.240" ]; then
> wds_suffix="28"
> elif [ "$wds_netmask" = "255.255.255.248" ]; then
> wds_suffix="29"
> elif [ "$wds_netmask" = "255.255.255.252" ]; then
> wds_suffix="30"
> else
> echo "Netmask not yet completely implemented"
> wds_suffix="not-implemented"
> fi
>
> echo "IPv4: $wds_ip"
> echo "IPv4 netmask: $wds_netmask"
> echo "IPv4 suffix: $wds_suffix"
> echo "IPv4 gateway: $wds_gateway"
> echo "IPv4 MTU: $wds_mtu"
>
> echo ifconfig qmimux0 down
> ifconfig qmimux0 down
> echo ifconfig qmimux0 up
> ifconfig qmimux0 up
>
> echo ip -4 addr flush dev qmimux0
> ip -4 addr flush dev qmimux0
>
> echo ip -4 addr add $wds_ip/$wds_suffix dev qmimux0
> ip -4 addr add $wds_ip/$wds_suffix dev qmimux0
> echo ip -4 link set qmimux0 mtu $wds_mtu up
> ip -4 link set qmimux0 mtu $wds_mtu up
> echo ip -4 route add default via $wds_gateway
> ip -4 route add default via $wds_gateway
>
> # SECOND CONNECTION
>
> # set mux ID to '2', which is the ID that has been chosen for the
> qmimux1 interface above
> # qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-bind-mux-data-port="mux-id=2,ep-iface-number=4"
> --client-cid=$wds2_cid --client-no-release-cid
>
> # start network using the same WDS client id:
> # qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-start-network="apn=internet.v6.telekom,ip-type=6"
> --client-cid=$wds2_cid --client-no-release-cid
>
> # setup the qmimux1 interface using DHCP or by getting IP settings via
> wds-get-current-settings and applying them manually (I only tried the
> latter)
> # qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-get-current-settings --client-cid=$wds2_cid
> --client-no-release-cid > /tmp/wds2_current_settings.txt
> # cat /tmp/wds2_current_settings.txt
>
> # echo ip -6 addr add 2a01:599:420:1b1d:39d0:1ea4:122b:2138/64 dev qmimux1
> # echo ip -6 link set qmimux1 mtu 1500 up
> # echo ip -6 route add default via 2a01:599:420:e62b:652c:b8d8:45ff:3d4e
>
> # TEST CONNECTIONS
>
> echo ping -4 -I qmimux0 8.8.8.8 -c 4
> ping -4 -I qmimux0 8.8.8.8 -c 4
> # echo ping -6 -I qmimux1 2001:4860:4860::8888 -c 4
>
> echo wget -4 --bind-address=$wds_ip https://www.showmyip.com/ -O myip.txt
> wget -4 --bind-address=$wds_ip https://www.showmyip.com/ -O myip.txt
> grep "Your IPv4" myip.txt
>
> # echo wget -6 --bind-address=2a01:599:403:b12a:95d5:8e3a:217b:df7b
> https://www.showmyip.com/ -O myip.txt
> # wget -6 --bind-address=2a01:599:403:b12a:95d5:8e3a:217b:df7b
> https://www.showmyip.com/ -O myip.txt
>
> echo wget -4 --bind-address=$wds_ip http://www.lrz.de/ -O /dev/null
> wget -4 --bind-address=$wds_ip http://www.lrz.de/ -O /dev/null
>
> echo wget -4 --bind-address=$wds_ip http://link.testfile.org/150MB -O
> /dev/null
> wget -4 --bind-address=$wds_ip http://link.testfile.org/150MB -O /dev/null
>
> #
>
> ************************************* 3333
> *************************************
>
> When I let run the single connection script:
>
> ./testme_single.sh
> Linux test-phyboard-pollux-imx8mp-3 6.6.21 #1 SMP PREEMPT Thu Mar 14
> 08:20:28 UTC 2024 aarch64 GNU/Linux
> qmicli 1.34.0
> Copyright (C) 2012-2023 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.
>
>
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> N
> Y
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> wds_cid=14
> [/dev/cdc-wdm0] Network started
> Packet data handle: '3798823120'
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wds'
> CID: '14'
> [/dev/cdc-wdm0] Current settings retrieved:
> IP Family: IPv4
> IPv4 address: 10.39.12.210
> IPv4 subnet mask: 255.255.255.252
> IPv4 gateway address: 10.39.12.209
> IPv4 primary DNS: 10.74.210.210
> IPv4 secondary DNS: 10.74.210.211
> MTU: 1500
> Domains: none
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wds'
> CID: '14'
> IPv4: 10.39.12.210
> IPv4 netmask: 255.255.255.252
> IPv4 suffix: 30
> IPv4 gateway: 10.39.12.209
> IPv4 MTU: 1500
> ifconfig wwu1u1i4 down
> ifconfig wwu1u1i4 up
> ip -4 addr flush dev wwu1u1i4
> ip -4 addr add 10.39.12.210/30 dev wwu1u1i4
> ip -4 link set wwu1u1i4 mtu 1500 up
> ip -4 route add default via 10.39.12.209
> ping -4 -I wwu1u1i4 8.8.8.8 -c 4
> PING 8.8.8.8 (8.8.8.8) from 10.39.12.210 wwu1u1i4: 56(84) bytes of data.
> 64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=36.3 ms
> 64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=43.9 ms
> 64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=51.9 ms
> 64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=40.9 ms
>
> --- 8.8.8.8 ping statistics ---
> 4 packets transmitted, 4 received, 0% packet loss, time 3004ms
> rtt min/avg/max/mdev = 36.323/43.261/51.945/5.689 ms
> wget -4 --bind-address=10.39.12.210 https://www.showmyip.com/ -O myip.txt
> --2024-05-15 08:36:00-- https://www.showmyip.com/
> Resolving www.showmyip.com... 104.21.49.135, 172.67.163.127
> Connecting to www.showmyip.com|104.21.49.135|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: 'myip.txt'
>
> myip.txt [ <=> ] 18.72K
> --.-KB/s in 0.004s
>
> 2024-05-15 08:36:01 (4.67 MB/s) - 'myip.txt' saved [19171]
>
> <td>Your IPv4</td><td><b>80.187.84.210</b></td>
> wget -4 --bind-address=10.39.12.210 http://www.lrz.de/ -O /dev/null
> --2024-05-15 08:36:01-- http://www.lrz.de/
> Resolving www.lrz.de... 129.187.254.9
> Connecting to www.lrz.de|129.187.254.9|:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: https://www.lrz.de/ [following]
> --2024-05-15 08:36:01-- https://www.lrz.de/
> Connecting to www.lrz.de|129.187.254.9|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 27181 (27K) [text/html]
> Saving to: '/dev/null'
>
> /dev/null
> 100%[===============================================================================>]
> 26.54K --.-KB/s in 0.004s
>
> 2024-05-15 08:36:01 (6.65 MB/s) - '/dev/null' saved [27181/27181]
>
> wget -4 --bind-address=10.39.12.210 http://link.testfile.org/150MB -O
> /dev/null
> --2024-05-15 08:36:01-- http://link.testfile.org/150MB
> Resolving link.testfile.org... 188.114.97.3, 188.114.96.3
> Connecting to link.testfile.org|188.114.97.3|:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: https://link.testfile.org/150MB [following]
> --2024-05-15 08:36:02-- https://link.testfile.org/150MB
> Connecting to link.testfile.org|188.114.97.3|:443... connected.
> HTTP request sent, awaiting response... 302 Found
> Location: https://files.testfile.org/ZIPC/150MB-Corrupt-Testfile.Org.zip
> [following]
> --2024-05-15 08:36:02--
> https://files.testfile.org/ZIPC/150MB-Corrupt-Testfile.Org.zip
> Resolving files.testfile.org... 188.114.97.3, 188.114.96.3
> Connecting to files.testfile.org|188.114.97.3|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 157286400 (150M) [application/x-zip-compressed]
> Saving to: '/dev/null'
>
> /dev/null
> 100%[===============================================================================>]
> 150.00M 20.9MB/s in 7.7s
>
> 2024-05-15 08:36:11 (19.6 MB/s) - '/dev/null' saved [157286400/157286400]
>
> #
>
>
> ************************************* 4444
> *************************************
>
> When I run the dual connection script:
>
>
> ./testme_dual.sh
> Linux test-phyboard-pollux-imx8mp-3 6.6.21 #1 SMP PREEMPT Thu Mar 14
> 08:20:28 UTC 2024 aarch64 GNU/Linux
> qmicli 1.34.0
> Copyright (C) 2012-2023 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.
>
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> lrwxrwxrwx 1 root root 0 May 15 08:36 /sys/class/net/qmimux0 ->
> ../../devices/virtual/net/qmimux0
> lrwxrwxrwx 1 root root 0 May 15 08:36 /sys/class/net/qmimux1 ->
> ../../devices/virtual/net/qmimux1
> lrwxrwxrwx 1 root root 0 May 15 08:36 /sys/class/net/wwu1u1i4 ->
> ../../devices/platform/soc at 0/32f10108.usb/38200000.usb/xhci-hcd.1.auto/usb3/3-1/3-1.1/3-1.1:1.4/net/wwu1u1i4
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> [/dev/cdc-wdm0] Device revision retrieved:
> Revision: 'RM520NGLAAR03A01M4G'
> wda_cid=1
> [/dev/cdc-wdm0] Successfully set data format
> QoS flow header: no
> Link layer protocol: 'raw-ip'
> Uplink data aggregation protocol: 'qmap'
> Downlink data aggregation protocol: 'qmap'
> NDP signature: '0'
> Downlink data aggregation max datagrams: '32'
> Downlink data aggregation max size: '31744'
> Uplink data aggregation max datagrams: '1'
> Uplink data aggregation max size: '64512'
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wda'
> CID: '1'
> N
> Y
> wds_cid=14
> wds2_cid=15
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wds'
> CID: '14'
> [/dev/cdc-wdm0] Network started
> Packet data handle: '3783438752'
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wds'
> CID: '14'
> [/dev/cdc-wdm0] Current settings retrieved:
> IP Family: IPv4
> IPv4 address: 10.142.39.230
> IPv4 subnet mask: 255.255.255.252
> IPv4 gateway address: 10.142.39.229
> IPv4 primary DNS: 10.74.210.210
> IPv4 secondary DNS: 10.74.210.211
> MTU: 1500
> Domains: none
> [/dev/cdc-wdm0] Client ID not released:
> Service: 'wds'
> CID: '14'
> IPv4: 10.142.39.230
> IPv4 netmask: 255.255.255.252
> IPv4 suffix: 30
> IPv4 gateway: 10.142.39.229
> IPv4 MTU: 1500
> ifconfig qmimux0 down
> ifconfig qmimux0 up
> ip -4 addr flush dev qmimux0
> ip -4 addr add 10.142.39.230/30 dev qmimux0
> ip -4 link set qmimux0 mtu 1500 up
> ip -4 route add default via 10.142.39.229
> ping -4 -I qmimux0 8.8.8.8 -c 4
> PING 8.8.8.8 (8.8.8.8) from 10.142.39.230 qmimux0: 56(84) bytes of data.
> 64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=52.1 ms
> 64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=27.1 ms
> 64 bytes from 8.8.8.8: icmp_seq=3 ttl=114 time=34.1 ms
> 64 bytes from 8.8.8.8: icmp_seq=4 ttl=114 time=35.9 ms
>
> --- 8.8.8.8 ping statistics ---
> 4 packets transmitted, 4 received, 0% packet loss, time 3003ms
> rtt min/avg/max/mdev = 27.129/37.305/52.144/9.168 ms
> wget -4 --bind-address=10.142.39.230 https://www.showmyip.com/ -O myip.txt
> --2024-05-15 08:36:49-- https://www.showmyip.com/
> Resolving www.showmyip.com... 104.21.49.135, 172.67.163.127
> Connecting to www.showmyip.com|104.21.49.135|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: 'myip.txt'
>
> myip.txt [ <=> ] 18.74K
> 6.25KB/s in 3.0s
>
> 2024-05-15 08:37:04 (6.25 KB/s) - 'myip.txt' saved [19192]
>
> <td>Your IPv4</td><td><b>80.187.115.230</b></td>
> wget -4 --bind-address=10.142.39.230 http://www.lrz.de/ -O /dev/null
> --2024-05-15 08:37:04-- http://www.lrz.de/
> Resolving www.lrz.de... 129.187.254.9
> Connecting to www.lrz.de|129.187.254.9|:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: https://www.lrz.de/ [following]
> --2024-05-15 08:37:04-- https://www.lrz.de/
> Connecting to www.lrz.de|129.187.254.9|:443... connected.
> GnuTLS: Error in the pull function.
> Unable to establish SSL connection.
> wget -4 --bind-address=10.142.39.230 http://link.testfile.org/150MB -O
> /dev/null
> --2024-05-15 08:38:05-- http://link.testfile.org/150MB
> Resolving link.testfile.org... 188.114.97.3, 188.114.96.3
> Connecting to link.testfile.org|188.114.97.3|:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: https://link.testfile.org/150MB [following]
> --2024-05-15 08:38:05-- https://link.testfile.org/150MB
> Connecting to link.testfile.org|188.114.97.3|:443... connected.
> HTTP request sent, awaiting response... 302 Found
> Location: https://files.testfile.org/ZIPC/150MB-Corrupt-Testfile.Org.zip
> [following]
> --2024-05-15 08:38:17--
> https://files.testfile.org/ZIPC/150MB-Corrupt-Testfile.Org.zip
> Resolving files.testfile.org... 188.114.97.3, 188.114.96.3
> Connecting to files.testfile.org|188.114.97.3|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 157286400 (150M) [application/x-zip-compressed]
> Saving to: '/dev/null'
>
> /dev/null 1%[> ] 2.00M 105KB/s eta 29m 29s^C
> #
>
>
> ************************************* 5555
> *************************************
>
> When using the single connection script, connection can be built up, I
> get an IPv4 address, ping work, and wget throughput is around 20 MBytes/s.
>
> Reaction times on wget actions are good.
>
> When using the dual connection script, first connection can be built up
> as well, I get an IPv4 address, ping seems to work and same ping time,
>
> but wget is having big reaction times showing error, throughput almost
> nothing.
>
>
> Perhaps some setting is too low? In your page dl-datagram-max-size is
> mentioned. One time in wda-set-data-format.
>
> One time in "ip link set ... mtu ...". In the second one I assume
> maximum is 1500. When building up a connection I also get a MTU of 1500.
>
> Or are the three places independant? What values could work?
>
> In wda-set-data-format a value of 1500 or 48000 (= 32*1500)?
>
> In examples I googled, dl-datagram-max-size was set to 32768 (=32*1024)
> and 31744 (=32*992).
> Perhaps I have to use/shall use 48000 (=32*1500)?
>
> Does this correspond to some value I get from module (qmi command) or
> from USB descriptor? Or just from experience?
>
> What if the value is too big?
The value depends on the chipset, anyway whatever value you ask for,
the modem will let you know which value supports through the
wda-set-data-format response, that is what you should use for setting
the master netdevice mtu.
>
> There is "ep-type=hsusb,ep-iface-number=x" in wda-set-data-format". In
> you example it is not used. In another example it was used.
>
> I tried with and without, but does not seem to make a difference.
>
Those settings seem mandatory for recent chipsets, while for the old
ones they are not, but they should not be involved in this issue.
> There is mentioned "For better throughput" on your page: If not done
> correctly, could it produce such an error, like I am having?
>
Yes, it can, since there could be issues during the deaggregation mechanism.
> Can I perhaps see the current value somehow? dmsg/system logs? Or
> perhaps a way of reading it back?
>
There's currently no way to read the rx urb size, but as written
above, it is linked to the master netdevice mtu.
Regards,
Daniele
> Best regards and many thanks,
>
> Martin
>
More information about the libqmi-devel
mailing list