Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
tpfkanep@fastmail.fm
Posts: 3
Joined: 11 Mar 2016, 14:32

kernel panics on Pi2 with usb_modeswitch 2.3.0-1 on arch

Post by tpfkanep@fastmail.fm » 11 Mar 2016, 14:59

Hi,

Thanks for this useful software!

As per topic, when I use usb_modeswitch (2.3.0-1) on my Pi with arch linux, I get frequent kernel oops. This does not happen on my PC (also arch).

When I downgrade to version 2.2.6-1 on the Pi, I get no oops.

Your assistance with this issue will be appreciated.

Here are some log files. Hopefully this will also assist.
USB_ModeSwitch log from Fri Mar 11 14:38:45 SAST 2016

Use global config file: /etc/usb_modeswitch.conf
Raw args from udev: /1-1.2

Use top device dir /sys/bus/usb/devices/1-1.2
Check class of first interface ...
Interface 0 class is 08.

----------------
USB values from sysfs:
manufacturer USBModem
product Mobile Broad Band
serial
----------------
bNumConfigurations is 1 - don't check for active configuration
ConfigList: /usr/share/usb_modeswitch/1bbb:f000
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/1bbb:f000
! matched. Read config data
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Unbinding driver
Command to be run:
usb_modeswitch -W -D -u -1 -b 1 -g 10 -v 1bbb -p f000 -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.5 (C) Josua Dietze 2015
* Based on libusb1/libusbx

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x1bbb
DefaultProduct= 0xf000
TargetVendor= 0x1bbb
TargetProductList="0000,0017,00b7,011e,0191,0195"
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"
NeedResponse=0
System integration mode enabled

Use given bus/device number: 001/010 ...
Look for default devices ...
bus/device number matched
found USB ID 1bbb:f000
vendor ID matched
product ID matched
Found devices in default mode (1)
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: USBModem
Product: Mobile Broad Band
Serial No.: not provided
-------------------------
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Wait for device file system (1 sec.) ...
Wait for device file system (2 sec.) ...
Wait for device file system (3 sec.) ...
Read attributes ...
All attributes matched
Mode switching was successful, found 1bbb:011e (USBModem: Mobile Broad Band)
Logger is /usr/bin/logger
Now check for bound driver ...
driver has bound, device is known
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated

All done, exit

USB_ModeSwitch log from Fri Mar 11 14:38:54 SAST 2016

Use global config file: /etc/usb_modeswitch.conf
usb_modeswitch called with --symlink-name
parameter: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0/tty/ttyUSB0

My name is ttyUSB0

Check my endpoints ...
in /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0
check ep_01 ...
check ep_81 ...

--> I am not an interrupt port

Return empty name and exit
USB_ModeSwitch log from Fri Mar 11 14:38:53 SAST 2016

Use global config file: /etc/usb_modeswitch.conf
usb_modeswitch called with --symlink-name
parameter: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1/ttyUSB1/tty/ttyUSB1

My name is ttyUSB1

Check my endpoints ...
in /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1
check ep_02 ...
check ep_82 ...

--> I am not an interrupt port

Return empty name and exit
USB_ModeSwitch log from Fri Mar 11 14:38:53 SAST 2016

Use global config file: /etc/usb_modeswitch.conf
usb_modeswitch called with --symlink-name
parameter: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.3/ttyUSB2/tty/ttyUSB2

My name is ttyUSB2

Check my endpoints ...
in /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.3
check ep_04 ...
check ep_84 ...
ep_84 has interrupt transfer type

--> I am an interrupt port

Look for lower ports with interrupt endpoints
in ifDir /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0 ...
check ep_01 ...
check ep_81 ...
in ifDir /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.1 ...
check ep_02 ...
check ep_82 ...
in ifDir /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.2 ...
no ttyUSB interface - skip endpoint check

--> No interrupt interface below me

Return symlink name "gsmmodem" and exit

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: kernel panics on Pi2 with usb_modeswitch 2.3.0-1 on arch

Post by Josh » 11 Mar 2016, 19:43

tpfkanep@fastmail.fm wrote:when I use usb_modeswitch (2.3.0-1) on my Pi with arch linux, I get frequent kernel oops. This does not happen on my PC (also arch).
That is indication enough to state this is not a problem with the usb_modeswitch code.
Also, there is no hint about any problems in the logs.

You might want to check the output of "dmesg" instead of the usb_modeswitch logs.

Here is someone else who had a crash on ARM:
http://www.draisberghof.de/usb_modeswit ... f=3&t=2488

tpfkanep@fastmail.fm
Posts: 3
Joined: 11 Mar 2016, 14:32

Re: kernel panics on Pi2 with usb_modeswitch 2.3.0-1 on arch

Post by tpfkanep@fastmail.fm » 11 Mar 2016, 22:25

Hey!

Thanks for taking the time to reply!

I am playing around with dmesg... I just dunno how to get the messages saved. I have tried dmesg -w > log.txt, but I do not get the oops information after a crash... Seems like I will have to take a screenshot...

The thing I do not understand is that when I downgrade the app, I have no issues on the Pi.

Edit:

The output I get is similar to what is described here: USB disconnects and reconnects cause kernel panics

gizo
Posts: 1
Joined: 20 Jun 2016, 01:59

Re: kernel panics on Pi2 with usb_modeswitch 2.3.0-1 on arch

Post by gizo » 20 Jun 2016, 02:16

I have the same problem with modem 1bbb:f000 - on the PC and laptop it works, on Raspberry PI it switch the modem, but kernel panic.

I solved it - use the following config:

TargetVendor=0x1bbb
TargetProductList="0000,0017,00b7,011e,0191,0195"
StandardEject=1

instead of:

TargetVendor=0x1bbb
TargetProductList="0000,0017,00b7,011e,0191,0195"
MessageContent="55534243123456788000000080000606f50402527000000000000000000000"

It works for me on PC and also on PI without the kernel panic.

tpfkanep@fastmail.fm
Posts: 3
Joined: 11 Mar 2016, 14:32

Re: kernel panics on Pi2 with usb_modeswitch 2.3.0-1 on arch

Post by tpfkanep@fastmail.fm » 03 Jul 2016, 17:00

gizo, your solution seems to have done the trick - have been running my Pi flawlessly over the last couple of days with the latest version of usb_modeswitch.

Many thanks.

Post Reply