Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 416505 - net-libs/libqmi: new a package request to handle QMI-based 3G/4G/5G USB modems
Summary: net-libs/libqmi: new a package request to handle QMI-based 3G/4G/5G USB modems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL: http://cgit.freedesktop.org/libqmi/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 14:12 UTC by Martin Mokrejš
Modified: 2012-09-23 21:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2012-05-18 14:12:24 UTC
Hi,
  since 3.4 kernels there is a new interface to talk to GSM modems. It should be made available through /etc/conf.d/net for configuration and needs some apps to do the job. Then, users should prefer the wwan interface over ppp, for speed. Support for networkmanager and other apps will probably appear soon as well. For some startup I am also including some emails form the linx-usb mailing list which I find very helpful.



From: Dan Williams
Cc: <linux-usb@vger.kernel.org>
Date: Thu, 17 May 2012 10:19:04 -0500

On Thu, 2012-05-17 at 01:11 +0200, Martin Mokrejs wrote:
> Hi Bjorn,
>
> Bjørn Mork wrote:
>> Martin Mokrejs writes:
>>
>>> Hi,
>>>   while here is the discussion about 3G modems and whether they
>>> should use one or another driver and that usbserial should be
>>> avoided, I just bought Huawei E372 but it is using on 3.4-rc7 I
>>> see it uses:
>>>
>>> cdc_wdm
>>> usbserial_generic
>>> option
>> It should not use usbserial_generic, but it should use the
>> qmi_wwan driver in addition to cdc_wdm and option. Did you build
>> that? It's new in 3.4 so you may need to enable it if you are
>> reusing an old config.
>> You'll find it under
>>
>> Device Drivers
>>   Network device support
>>     USB Network Adapters
>>       Multi-purpose USB Networking Framework
>>         QMI WWAN driver for Qualcomm MSM based 3G and LTE modems
> OK, thanks, I did not build the driver so far. So, now will have it
> on the next reboot. Great. ;) As I understood from other todays
> emails I should use the wwan interface and forget about pppd. Will
> adjust for that. This should also be made clear from the help texts
> that one should prefer the wwan interface over AT modem like-one.
>
>
>> in menuconfig.
>>
>>> I am attaching dmesg and lsusb info. Unfortunately, my Zyxel
>>> P-661HNU-F3 router is running 2.6.20 kernel and while it was
>>> working with Huawei E1823 it does not detect the E372. :(( What
>>> would you recommend me to do to get it working: 1) properly under
>>> current kernels, 2) under the old kernel in the router?
>>
>> 2.6.20 is very old, but you might get it working in serial mode if
>> you can get an existing driver to bind. I guess you'll need a
>> recent usb_modeswitch config on it in any case, to get the device
>> to switch to modem mode.
>
> There is not even udev on that router, no /usr/bin/eject so I am a
> bit clueless what to do to switch the modem ... and how come that the
> E1823 worked at all. ;)
>
>>> Bus 002 Device 009: ID 12d1:1506 Huawei Technologies Co., Ltd.
>>> E398 LTE/UMTS/GSM Modem/Networkcard
>> The problem is that Huawei in their wisdom didn't see any reason to
>> use an unique product ID for each device. So you will see a number
>> of different devices using the same ID. Hopefully they are
>> somewhat compatible, but we don't really know much about that...
>>
>> To make these things even more complicated, there are also
>> different modeswitch commands which will make the device change its
>> USB descriptor layout. Some of these will also change the product
>> ID. But it's still not unique.
> I understand, I know that when it acts as the CD-ROM device it has
> different PCI ID compared to the one when switched into modem mode.
>
>> So you need to look at the label on the device to find out what it is.
>> lsusb cannot tell you.
>
> Regarding the speeds, would I think more of the fact that pppd allows
> me at maximum 480000 baudrate speed (if not only 115200) I should
> have ignored the "faster" speed of this new USB stick as it is anyway
> internally in the computer handled at fairly low speed. And, not
> even talking about the router which has like every other router 2.4
> kernel (if not even 2.2 kernel) and has maybe always usbserial doing
> the real job. Unfortunately one cannot re-flash every device with
> OpenWRT or ddWRT, this Zyxel thing is one of the "unsupported"
> devices.
>
> I think I will return the Huawei E372 tomorrow. Can I ever use up the
> 42Mbps, or 21.6Mbps? Hardly 5.76Mbps as far as I saw with the E1823
> stick.

It's not about baudrate, since as Greg has pointed out here, baudrate is
completely meaningless with USB devices.  It's more about PPP vs.
network interface.  PPP just has too much overhead and that's what slows
things down when the device and tower have negotiated faster links like
HSDPA 14.4 and up.  Using PPP over these faster link rates is just a
waste and usually only devices that support a network interface can
provide full speed.  PPP isn't used over-the-air with GSM/UMTS devices:
it's only between the modem and the host.  Devices that support network
interfaces can completely skip the PPP framing and negotiation, saving
quite a bit of overhead.

Dan



From: Bjorn Mork
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Date: Fri, 18 May 2012 09:00:50 +0200

> Although I can assign wwan0 interface an IP address I somehow cannot
> connect to anywhere in the world. So, I have to assign an IP back to
> ppp0 interface to get on the network. I would hope I do have to
> provide the gprs username and password for the wwan0 interface as
> they are the defaults I think on the SIM card already. Googling
> around for some manual how to configure wwan connection did not help
> much yet. Everything leads to to wvdial and other and looks all is
> PPP-based stuff, actually.

You need QMI tools to use this.  The best alternative at the moment is
Aleksander Morgado's libqmi-glib:
http://gitorious.org/lanedo/libqmi-glib

The cli/qmicli utility there can start and stop the connection, or you
can use the utils/qmi-network frontend script to avoid typing all the
options.  After the connection is started, the wwan0 interface should be
configured using DHCP (chances are high that the modem will refuse to
forward anything until after it has seen a DHCP request).

Eventually all this will hopefully be nicely integrated in ModemManager
so that you don't have to think about any of it.  But we're not quite
there yet.  It's all pretty new, given that the prerequisite driver
first appears in 3.4 :-)

Bjørn




Finally, one more interesting thread to read on the linux-usb list:

Re: UMTS/LTE Device K5005 from Vodafone/Huawei with ID 12d1:14c8
http://www.spinics.net/lists/linux-usb/msg63964.html