Re: I: Sierra.c USB Serial Driver FAQ/Feature Request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Hyman <pete@xxxxxxxxxxxxxx> writes:

> On 08/14/2013 01:02 PM, Bjørn Mork wrote:
>> Peter Hyman <pete@xxxxxxxxxxxxxx> writes:
>>
>>> Linux Kernel: 3.9.10
>>> Device Driver: usb/serial/sierra.c
>>> Device Driver version: not known
>>>
>>> Apparently Sierra has sold the AirCard 250U product to Netgear, so I am
>>> sure driver development on drivers/usb/serial/sierra.c will be in limbo
>>> for a period. While I am copying linux@xxxxxxxxxxxxxxxxxx, they will not
>>> do anything since they don't own the product anymore.
>>>
>>> Nonetheless, I uncovered a problem when using the AC250U Aircard device
>>> Vendor 0x1199, Product 0x0301. If the device is used in Windows and set
>>> to 4G mode, using the device in Linux will fail to create the ppp0
>>> network interface. I could find no workaround. Even though the device
>>> can be reached and modem commands sent, ppp0 won't be created.
>> What exactly do you mean by "ppp0 won't be created"?  The ppp interface
>> is a virtual network device running on top of a serial port.  Does this
>> mean that there is one serial port missing?  Or are all of them missing
>> in this mode?  Does this device support DirectIP, using the sierra_net
>> driver?  If so, does that still work in 4G mode?
>>
>> Exactly what action does the Windows driver/application do to trigger
>> this?
>
> When the device is set in 3G mode, and is plugged in to a Linux box, a
> network interface ppp0 (in my case) is created and permits interface to
> the web. When using kppp or similar, you get a Connect ack from the
> modem and everything performs as normal.
>
> When the device is set in 4G mode, and is plugged in to a Linux box, no
> network interface is created and no access to web is permitted. When
> using kppp or similar, you get a NO CARRIER ack from the modem and there
> is no way to advance.

That pretty much answers my questions.  You get the same serial ports,
and you can configure the device using AT commands, but it cannot
emulate PPP in 4G mode.  That's most likely a firmware limitation, and
we should focus on 
1) getting it to work in 4G mode using the network device like Windows
   does (bcm-wimax driver?)
2) switch the device to 3G mode from Linux so that we don't depend on
   Windows for this


>>> I
>>> regression tested this all the way back to kernel 3.2.29, and I also
>>> tried the unpublished sierra driver 1.7.40 which works up to kernel
>>> 3.4.x iirc. The issue is the same.
>>>
>>> The workaround is to set the device to 3G mode and then use in Linux. I
>>> wrote this FAQ in case it is of interest.
>> Nice.  Thanks.  Documenting the problem is important.
>>
>> But I believe we can do better.  Making this device work regardless of
>> mode and Windows settings should not be too difficult.  We just need to
>> research a bit what's going on, and then try to do the same as Windows
>> to make it work.
> I BELIEVE it may be related to the inherent limitation of the driver
> module, sierra.c, and it's documented inability to work with 4G. It may
> have something to do with Wimax as well since a Wimax device shows up as
> well.
>>
>> Could you start with sending the output of "lsusb -vd 1199:0301" for
>> both the working (3G mode) and non-working (4G mode) cases?  This will
>> help understanding how the device appearance changes between these
>> modes, if it does?
> Here is the 3G output. I will need to log off and come back for the 4G.
> I will save for a diff run when I do the 4G version. I DO know the
> driver output is different  for 3G and 4G. There is a stanza for WiMax
> and a Beceem device with a different Vendor and Product ID than below.
> Recall, one can access the device with AT commands regardless of 3G or
> 4G mode.
> usb 4-1.2.1: new high-speed USB device number 18 using ehci-pci
> usb 4-1.2.1: New USB device found, idVendor=198f, idProduct=0220
> usb 4-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 4-1.2.1: Product: Mobile WiMax SS
> usb 4-1.2.1: Manufacturer: Beceem Communications Inc.
> usb 4-1.2.1: SerialNumber: MSB220

Oh..  Right.  I was probably too optimistic here.  Didn't know this
device was based on a Beceem chip.  That's going to be difficult to
support...

Did you try the driver in staging?

bjorn@nemi:/usr/local/src/git/linux$ less drivers/staging/bcm/Kconfig 
config BCM_WIMAX
       tristate "Beceem BCS200/BCS220-3 and BCSM250 wimax support"
       depends on USB && NET
       default N
       help
         This is an experimental driver for the Beceem WIMAX chipset used
         by Sprint 4G.


I don't know how to use that driver, but I believe it ought to be
possible to get the device running in 4G mode using it.


> bash-4.2$ lsusb -vd 1199:0301
>
> Bus 004 Device 005: ID 1199:0301 Sierra Wireless, Inc.
> Couldn't open device, some information will be missing
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               1.10
>   bDeviceClass            0 (Defined at Interface level)
>   bDeviceSubClass         0
>   bDeviceProtocol         0
>   bMaxPacketSize0        64
>   idVendor           0x1199 Sierra Wireless, Inc.
>   idProduct          0x0301
>   bcdDevice            0.03
>   iManufacturer           1
>   iProduct                2
>   iSerial                 4
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength           81
>     bNumInterfaces          1
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes        
> 0xa0                                                                             
>
>       (Bus
> Powered)                                                                                       
>
>       Remote Wakeup
>     MaxPower              500mA
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           9

So only one USB serial interface on this device, with enough endpoints
for 4 serial ports.  OK, no sierra_net possibilities (as expected given
the chip it is based on).



>> If the device appears identical, then we have to know more details about
>> how the ppp connection fails. Maybe the firmware just doesn't support
>> PPP at all when it is in 4G mode?  The lsusb output should still tell us
>> whether to expect DirectIP, as Sierra use fixed interface numbers to
>> indicate these things.
>
> I am not sure what is expected by the device. But I think perhaps WiMax
> may be a clue. Thanks for the feedback. Will report on the 4G output later.

Great!  And if you can snoop on Windows trying to figure out how to
switch the modes, then that would also help.  I believe Wireshark with
usbpcap is the current state-of-the-art USB sniffer for Windows:
http://desowin.org/usbpcap/


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux