RaspberryPi 2 with Huawei E398

poma pomidorabelisima at gmail.com
Mon May 18 09:22:30 PDT 2015


On 18.05.2015 17:33, John Whitmore wrote:
> On Fri, May 15, 2015 at 03:54:36PM +0100, John Whitmore wrote:
>> On Fri, May 15, 2015 at 09:29:11AM -0500, Dan Williams wrote:
>>> On Fri, 2015-05-15 at 16:11 +0200, Aleksander Morgado wrote:
>>>> On Fri, May 15, 2015 at 10:28 AM, John Whitmore <arigead at gmail.com> wrote:
>>>>> I'm trying to put together a system which uses 2 Huawei E398 USB Dongles with
>>>>> two different operator SIM's so that if one modem has no coverage the other
>>>>> takes over.
>>>>>
>>>>> I've followed the debugging information on [1] to try and get my hands on the
>>>>> logs but not sure where the NetworkManger is sending its logging info. I do
>>>>> have the output from ModemManager, which I'll attach to this email.
>>>>>
>>>>> I'm not sure that the logging from ModemManager will be of any help at all as
>>>>> it might not be the issue. What is happening is that I can establish a
>>>>> connection but as soon as I start to do a ping test from the command line the
>>>>> whole system freezes.
>>>>>
>>>>> This is with one 4G Dongle in place, I was hoping to be able to manage both
>>>>> connections.
>>>>>
>>>>> I'm using raspbian 2015-05-05 with kernel 3.18.13
>>>>>
>>>>> If I can send on anything else please let me know. I'd really like to get this
>>>>> system working. Unfortunately I've only got two E398 Dongles so I can't try
>>>>> with a different modem at present. I'll try and get my hands on another.
>>>>>
>>>>>
>>>>> [1] : http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/
>>>>
>>>>
>>>> Ouch; ModemManager 0.5.2 is way too old... Could you setup
>>>> ModemManager 1.4.8 with libqmi to try?
>>>>
>>>> Also, just to make sure, you are using an external *powered* usb hub
>>>> to connect the modems to the RPi, right? The RPi cannot handle the
>>>> power consumption of 1 single modem in connected state.
>>>
>>> Good point; even some laptops cannot power modems adequately, hence they
>>> ship Y cables with modems that pull power from 2 USB ports :)  Always
>>> good to check this out when the modem crashes while connected.
>>>
>>> Dan
>>>
>>>
>>
>> Oh dear!!! I never thought of software versions at all. I believe that there
>> is a version of Ubuntu for the RPi so I'll give that a go and get back to
>> you. If I can get Ubuntu it usually has more recent packages.
>>
>> Thanks for your help with that I'll let you know.
>>
>> John
> 
> It's a funny old Linux world. Raspbian had an old unsupported version of
> ModemManager in place so I tried out the RPi Ubuntu Mate distro for a later
> version of the tools. 
> 
> My first problem on Ubuntu is however that usb_modeswitch is refusing to eject
> the device. That's funny as Raspbian 2015-05-05 was ejecting it
> automatically. A quick look at the udev rules showed that Raspbian has a line
> for each modem, so for the modem I'm using the line is:
> 
> # Huawei EC156, Huawei E372u-8
> ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1505", RUN+="usb_modeswitch '%b/%k'"
> 
> The Ubuntu Mate version of the udev rules has a more generic Huawei rule for
> all devices:
> 
> # Generic entry for all Huawei devices
> ATTRS{idVendor}=="12d1", ATTR{bInterfaceNumber}=="00", ATTR{bInterfaceClass}=="08", RUN+="usb_modeswitch '%b/%k'"
> 
> So maybe that generic udev line ain't working for me so I copy and paste the
> more specific line into Ubuntu's udev rules, and remove the generic line. So
> now when I insert the modem, again nothing. 
> 
> A quick look at dmesg and it appears that usb_modeswitch was trying but scsi
> was telling it to get lost!  "rejecting I/O to offline device"
> 
> [  468.804298] usb 1-1.4.5.5: new high-speed USB device number 12 using dwc_otg
> [  468.906295] usb 1-1.4.5.5: New USB device found, idVendor=12d1, idProduct=1505
> [  468.906357] usb 1-1.4.5.5: New USB device strings: Mfr=3, Product=2, SerialNumber=0
> [  468.906376] usb 1-1.4.5.5: Product: HUAWEI Mobile
> [  468.906393] usb 1-1.4.5.5: Manufacturer: Huawei Technologies
> [  468.908509] usb-storage 1-1.4.5.5:1.0: USB Mass Storage device detected
> [  468.909352] scsi host2: usb-storage 1-1.4.5.5:1.0
> [  469.905485] scsi 2:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 0
> [  470.025146] sr 2:0:0:0: [sr0] scsi3-mmc drive: 0x/0x caddy
> [  470.026182] sr 2:0:0:0: Attached scsi CD-ROM sr0
> [  470.027015] sr 2:0:0:0: Attached scsi generic sg0 type 5
> [  470.135151] scsi 2:0:0:0: rejecting I/O to offline device
> [  470.135191] scsi 2:0:0:0: killing request
>  
> 
> It's hard to know which route is easier. Raspbian can eject the devices but
> has an old version of NetworkManager and ModemManager, where as Ubuntu has
> later versions of the tools but can't eject a CD device. Maybe I need another distro.
> 

These are different operation modes, as far as I understand.

http://www.draisberghof.de/usb_modeswitch


> Man USB modems are aything but Universal Serial Devices!
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
> 



More information about the ModemManager-devel mailing list