libqmi / Quectel EC21/EC25
Bjørn Mork
bjorn at mork.no
Sat Oct 8 21:06:00 UTC 2016
Sebastian Sjoholm <sebastian.sjoholm at gmail.com> writes:
>>
>>> Hi,
>>>
>>> So regarding my issue with Quectel EC21/EC25, I guess most of the times the problem is between the keyboard and the chair, and I guess it was now as well.
>>>
>>> When I followed the Quectel documentation on Linux integration I left the raw-ip implementation because linux kernel already have raw-ip support in the kernel, however at the end of that chapter was some crucial changes that I of course did not include. So, after included the changes in “qmi_wwan_bind”, it started to work.
>>>
>>> I have included the diff from my changes and the Linux Kernel 4.7.7.
>>>
>>> I have only verified EC25, but will soon run EC21 as well.
>>>
>>> /drivers/net/usb/qmi_wwan.c
>>> 436,451d435
>>> <
>>> < /* Quectel */
>>> < if (dev->udev->descriptor.idVendor == cpu_to_le16(0x2C7C)) {
>>> < dev_info(&intf->dev, "Quectel EC21&EC25&EC20 R2.0 work on RawIP mode\n");
>>> < dev->net->flags |= IFF_NOARP;
>>> <
>>> < usb_control_msg(
>>> < interface_to_usbdev(intf),
>>> < usb_sndctrlpipe(interface_to_usbdev(intf), 0),
>>> < 0x22, //USB_CDC_REQ_SET_CONTROL_LINE_STATE
>>> < 0x21, //USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE
>>> < 1, //active CDC DTR
>>> < intf->cur_altsetting->desc.bInterfaceNumber,
>>> < NULL, 0, 100);
>>> < }
>>
>>
>> I don't understand. Except for the redundant IFF_NOARP (set in
>> qmi_wwan_netdev_setup), this should be exactly the same as the
>>
>> qmi_wwan_change_dtr(dev, true);
>>
>> I asked you to try to enable unconditionally. And that didn't work?
>>
>
> I did try that, yes, but I got the same timeout error with qmicli, but I will check again, and let you know.
>
> Just to make sure I get it right;
>
> instead of
>
> if (le16_to_cpu(dev->udev->descriptor.bcdUSB) >= 0x0201) {
> qmi_wwan_manage_power(dev, 1);
> qmi_wwan_change_dtr(dev, true);
> }
>
> I will just have
>
> qmi_wwan_manage_power(dev, 1);
> qmi_wwan_change_dtr(dev, true);
>
> And of course comment out the changes in “qmi_wwan_bind”.
Yes. That should have the same effect. If it doesn't, then there must
be something magic going on. Could be related to timing/ordering of
course. Could you generate a context diff (diff -u) of the changes you
have made, so that we can see where that control message is sent?
Bjørn
More information about the libqmi-devel
mailing list