Point to Point interface over qmi_wwan device
Tang Nguyen
tang_nguyen at yahoo.com
Wed Oct 5 21:04:12 UTC 2016
--------------------------------------------
On Wed, 10/5/16, Dan Williams <dcbw at redhat.com> wrote:
Subject: Re: Point to Point interface over qmi_wwan device
To: "Tang Nguyen" <tang_nguyen at yahoo.com>, "Bjørn Mork" <bjorn at mork.no>
Cc: "libqmi (development)" <libqmi-devel at lists.freedesktop.org>, "Reinhard Speyerer" <rspmn at arcor.de>
Date: Wednesday, October 5, 2016, 4:36 PM
On Wed, 2016-10-05 at
19:23 +0000, Tang Nguyen wrote:
>
--------------------------------------------
> On Wed, 10/5/16, Bjørn Mork <bjorn at mork.no>
wrote:
>
> Subject:
Re: Point to Point interface over qmi_wwan device
> To: "Tang Nguyen" <tang_nguyen at yahoo.com>
> Cc: "Dan Williams" <dcbw at redhat.com>,
"Reinhard Speyerer" <rspmn at arc
> or.de>, "libqmi
(development)" <libqmi-devel at lists.freedesktop.org>
> Date: Wednesday, October 5, 2016, 9:26
AM
>
> Tang
Nguyen <tang_nguyen at yahoo.com>
> writes:
>
> > I try to use
>
--set-expected-data-format=raw-ip command, but I got
error
> message of non-existence
>
"'/sys/class/net/wwan-6-1.ip/qmi/raw_ip'
> file.
> > I
found Bjon's patch : https://patchwork.ozlabs.org/patch/552408/
> from patchwork regarding about raw-ip
support in
> qmi_wwan driver.
> > Is this patch
>
already available in upstream kernel , or it will
happen
> soon ?
>
> >It's in Linux
> >v4.5 and later.
>
>
>
>Bjørn
>
>
Applying cleanly Bjon's patch to kernel 3.14.68, I can
set raw-ip
> data format, but not able to
make a connection. Do i need to apply
>
another patch to get it work.
> These logs say that the device refused to set
>raw-ip through the CTL
>service request.
> Can you try the WDA method instead? IIRC newer
>devices don't do this through CTL
>anymore.
>qmicli -d
>/dev/cdc-wdm0 --wda-set-data-format=raw-ip
>qmicli -d
>/dev/cdc-wdm0 --set-expected-data-format=raw-ip
>then try to connect.
> Dan
Hi Dan,
The last logs are output with wda method to set data-format. I am not able to make connection if using WDA.
If I don't use WDA method, I just eecute 2 commands:
#qmicli -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip
#qmicli -d /dev/cdc-wdm0 --wds-start-network=SP.TELUS.COM --device-open-net="net-raw-ip|net-no-qos-header" --device-open-sync --client-no-release-cid
then I can make connection, wwan0 comes up with Point-to-Point flag, but it drops all incoming packet due to invalid IP header ( I saw it via wireshark)
I think the expected data format and modem's data format does *not* match, leading to dropping packets.
root at rx1500-2:~# qmicli -d /dev/cdc-wdm0 --get-expected-data-format
raw-ip
root at rx1500-2:~# qmicli -d /dev/cdc-wdm0 --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
IP Family: IPv4
IPv4 address: 10.233.181.66
IPv4 subnet mask: 255.255.255.252 <--- Is it normal if mask is /27 when we set expected-data-format=raw-ip ?
IPv4 gateway address: 10.233.181.65
IPv4 primary DNS: 207.219.69.11
IPv4 secondary DNS: 216.218.29.11
MTU: 1430
Domains: none
wwan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.233.181.66 P-t-P:10.233.181.66 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:7 errors:0 dropped:7 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:490 (490.0 B) TX bytes:588 (588.0 B)
Tang
> [05 Oct 2016, 14:06:07]
[Debug] [/dev/cdc-wdm0] Opening device with
> flags 'sync, net-raw-ip,
net-no-qos-header'...
> [05 Oct 2016,
14:06:07] [Debug] [/dev/cdc-wdm0] Running sync...
> [05 Oct 2016, 14:06:07] [Debug]
[/dev/cdc-wdm0] Sent message...
>
<<<<<< RAW:
>
<<<<<< length = 12
> <<<<<< data =
01:0B:00:00:00:00:00:01:27:00:00:00
>
> [05 Oct 2016, 14:06:07] [Debug]
[/dev/cdc-wdm0] Sent message
>
(translated)...
>
<<<<<< QMUX:
>
<<<<<< length = 11
> <<<<<< flags =
0x00
>
<<<<<< service = "ctl"
> <<<<<< client =
0
> <<<<<< QMI:
>
<<<<<< flags =
"none"
>
<<<<<< transaction = 1
>
<<<<<< tlv_length = 0
>
<<<<<< message =
"Sync" (0x0027)
>
> [05 Oct 2016, 14:06:07] [Debug]
[/dev/cdc-wdm0] Received message...
>
>
> > >
>
> > >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > RAW:
> > > > > > > length =
19
> > > > > > >
data =
> > > > > >
>
01:12:00:80:00:00:01:01:27:00:07:00:02:04:00:00:00:00:00
>
> [05 Oct 2016,
14:06:07] [Debug] [/dev/cdc-wdm0] Received message
> (translated)...
> >
> > >
> >
> >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > QMUX:
> > > > > > >
length = 18
> > > > > >
> flags = 0x80
> > >
> > > > service = "ctl"
> > > > > > >
client = 0
> > > > > >
> QMI:
> > > > > > >
flags = "response"
> > > > > > >
transaction = 1
> > > > >
> > tlv_length = 7
> >
> > > > > message =
"Sync" (0x0027)
> > >
> > > > TLV:
> > > >
> > > type = "Result"
(0x02)
> > > > > > >
length = 4
> > > > >
> > value = 00:00:00:00
> > > > > > >
translated = SUCCESS
>
> [05 Oct 2016, 14:06:07] [Debug]
[/dev/cdc-wdm0] Sync operation
>
finished
> [05 Oct 2016, 14:06:07]
[Debug] [/dev/cdc-wdm0] Setting network port
> data format...
> [05
Oct 2016, 14:06:07] [Debug] [/dev/cdc-wdm0] Sent
message...
> <<<<<<
RAW:
>
<<<<<< length = 21
>
<<<<<< data =
>
01:14:00:00:00:00:00:02:26:00:09:00:10:02:00:02:00:01:01:00:00
>
> [05 Oct 2016,
14:06:07] [Debug] [/dev/cdc-wdm0] Sent message
> (translated)...
>
<<<<<< QMUX:
>
<<<<<< length = 20
> <<<<<< flags =
0x00
>
<<<<<< service = "ctl"
> <<<<<< client =
0
> <<<<<< QMI:
>
<<<<<< flags =
"none"
>
<<<<<< transaction = 2
>
<<<<<< tlv_length = 9
>
<<<<<< message = "Set
Data Format" (0x0026)
>
<<<<<< TLV:
>
<<<<<< type =
"Protocol" (0x10)
>
<<<<<< length = 2
>
<<<<<< value = 02:00
> <<<<<< translated =
raw-ip
> <<<<<< TLV:
>
<<<<<< type =
"Format" (0x01)
>
<<<<<< length = 1
>
<<<<<< value = 00
> <<<<<< translated =
absent
>
> [05 Oct
2016, 14:06:07] [Debug] [/dev/cdc-wdm0] Received
message...
> >
>
> >
> > > >
> > > > >
>
> > > > >
> > >
> > > >
> > > >
> > > RAW:
> > > > >
> > length = 19
> > > >
> > > data =
> > >
> > > >
01:12:00:80:00:00:01:02:26:00:07:00:02:04:00:01:00:46:00
>
> [05 Oct 2016,
14:06:07] [Debug] [/dev/cdc-wdm0] Received message
> (translated)...
> >
> > >
> >
> >
> > > > >
> > > > > >
> > > > > > >
> > > > > > > QMUX:
> > > > > > >
length = 18
> > > > > >
> flags = 0x80
> > >
> > > > service = "ctl"
> > > > > > >
client = 0
> > > > > >
> QMI:
> > > > > > >
flags = "response"
> > > > > > >
transaction = 2
> > > > >
> > tlv_length = 7
> >
> > > > > message = "Set
Data Format" (0x0026)
> > >
> > > > TLV:
> > > >
> > > type = "Result"
(0x02)
> > > > > > >
length = 4
> > > > >
> > value = 01:00:46:00
> > > > > > >
translated = FAILURE: InvalidOperation
>
_______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
_______________________________________________
libqmi-devel mailing list
libqmi-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
More information about the libqmi-devel
mailing list