Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 439740 - kernel on Raspberry Pi endlessly toggles a USB UMTS adapter between mass storage and usbserial mode
Summary: kernel on Raspberry Pi endlessly toggles a USB UMTS adapter between mass stor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-26 09:47 UTC by Jiri Pittner
Modified: 2012-10-27 12:53 UTC (History)
1 user (show)

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 Jiri Pittner 2012-10-26 09:47:29 UTC
I have connected the USB UMTS WAN adapter Archos G9 3G STICK to Raspberry Pi
running Gentoo, planned for telemetric purposes. However, the kernel endlessly
toggles the USB device between mass storage mode and usbserial mode.
I have tried both 3.2.27+ and 3.6.1+ kernels from git://github.com/raspberrypi/linux.git, rest of Gentoo system installed according to instructions on Raspberry Pi Gentoo wiki.

I used modprobe usbserial vendor=0x1bbb product=0x00b7 to recognize the device
as usb serial. I tried 
usb_modeswitch -s 3 -v 0x1bbb -p 0xf000 -V 0x1bbb -P 0x00b7 -M 5553424308a05984c00000
to fix the serial mode - did not help.
The /dev/ttyUSB? devices show up for a few seconds, then disappear again.
While there exist, pppd can communicate to them, but they disappear after 
a few seconds again, as the kernel toggles the device to mass storage mode:

Excerpt from the endless loop in dmesg:
...
Oct 25 20:47:13 rpi1 kernel: [16229.853734] usb 1-1.2: USB disconnect, device number 100
Oct 25 20:47:13 rpi1 kernel: [16230.089013] usb 1-1.2: new high-speed USB device number 101 using dwc_otg
Oct 25 20:47:13 rpi1 kernel: [16230.192477] usb 1-1.2: New USB device found, idVendor=1bbb, idProduct=00b7
Oct 25 20:47:13 rpi1 kernel: [16230.192545] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
Oct 25 20:47:13 rpi1 kernel: [16230.192568] usb 1-1.2: Product: HSPA Data Card
Oct 25 20:47:13 rpi1 kernel: [16230.192585] usb 1-1.2: Manufacturer: USBModem
Oct 25 20:47:13 rpi1 kernel: [16230.201818] usbserial_generic 1-1.2:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.
Oct 25 20:47:13 rpi1 kernel: [16230.201856] usbserial_generic 1-1.2:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Oct 25 20:47:13 rpi1 kernel: [16230.201875] usbserial_generic 1-1.2:1.0: generic converter detected
Oct 25 20:47:13 rpi1 kernel: [16230.202391] usb 1-1.2: generic converter now attached to ttyUSB0
Oct 25 20:47:13 rpi1 kernel: [16230.203012] usbserial_generic 1-1.2:1.1: The "generic" usb-serial driver is only for testing and one-off prototypes.
Oct 25 20:47:13 rpi1 kernel: [16230.203043] usbserial_generic 1-1.2:1.1: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Oct 25 20:47:13 rpi1 kernel: [16230.203061] usbserial_generic 1-1.2:1.1: generic converter detected
Oct 25 20:47:13 rpi1 kernel: [16230.203555] usb 1-1.2: generic converter now attached to ttyUSB1
Oct 25 20:47:13 rpi1 kernel: [16230.208971] usbserial_generic 1-1.2:1.2: The "generic" usb-serial driver is only for testing and one-off prototypes.
Oct 25 20:47:13 rpi1 kernel: [16230.209012] usbserial_generic 1-1.2:1.2: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Oct 25 20:47:13 rpi1 kernel: [16230.209029] usbserial_generic 1-1.2:1.2: generic converter detected
Oct 25 20:47:13 rpi1 kernel: [16230.211334] usb 1-1.2: generic converter now attached to ttyUSB2
Oct 25 20:47:13 rpi1 kernel: [16230.212008] usbserial_generic 1-1.2:1.3: The "generic" usb-serial driver is only for testing and one-off prototypes.
Oct 25 20:47:13 rpi1 kernel: [16230.212040] usbserial_generic 1-1.2:1.3: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Oct 25 20:47:13 rpi1 kernel: [16230.212058] usbserial_generic 1-1.2:1.3: generic converter detected
Oct 25 20:47:13 rpi1 kernel: [16230.212594] usb 1-1.2: generic converter now attached to ttyUSB3
Oct 25 20:47:13 rpi1 kernel: [16230.214281] usbserial_generic 1-1.2:1.4: The "generic" usb-serial driver is only for testing and one-off prototypes.
Oct 25 20:47:13 rpi1 kernel: [16230.214320] usbserial_generic 1-1.2:1.4: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
Oct 25 20:47:13 rpi1 kernel: [16230.214339] usbserial_generic 1-1.2:1.4: generic converter detected
Oct 25 20:47:13 rpi1 kernel: [16230.215459] usb 1-1.2: generic converter now attached to ttyUSB4
Oct 25 20:47:22 rpi1 kernel: [16238.814955] usb 1-1.2: USB disconnect, device number 101
Oct 25 20:47:22 rpi1 kernel: [16238.815660] generic ttyUSB0: generic converter now disconnected from ttyUSB0
Oct 25 20:47:22 rpi1 kernel: [16238.815768] usbserial_generic 1-1.2:1.0: device disconnected
Oct 25 20:47:22 rpi1 kernel: [16238.816414] generic ttyUSB1: generic converter now disconnected from ttyUSB1
Oct 25 20:47:22 rpi1 kernel: [16238.816515] usbserial_generic 1-1.2:1.1: device disconnected
Oct 25 20:47:22 rpi1 kernel: [16238.817149] generic ttyUSB2: generic converter now disconnected from ttyUSB2
Oct 25 20:47:22 rpi1 kernel: [16238.817251] usbserial_generic 1-1.2:1.2: device disconnected
Oct 25 20:47:22 rpi1 kernel: [16238.818025] generic ttyUSB3: generic converter now disconnected from ttyUSB3
Oct 25 20:47:22 rpi1 kernel: [16238.818129] usbserial_generic 1-1.2:1.3: device disconnected
Oct 25 20:47:22 rpi1 kernel: [16238.825255] generic ttyUSB4: generic converter now disconnected from ttyUSB4
Oct 25 20:47:22 rpi1 kernel: [16238.825372] usbserial_generic 1-1.2:1.4: device disconnected
Oct 25 20:47:27 rpi1 kernel: [16243.919266] usb 1-1.2: new high-speed USB device number 102 using dwc_otg
Oct 25 20:47:27 rpi1 kernel: [16244.023454] usb 1-1.2: New USB device found, idVendor=1bbb, idProduct=f000
Oct 25 20:47:27 rpi1 kernel: [16244.023493] usb 1-1.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Oct 25 20:47:27 rpi1 kernel: [16244.023513] usb 1-1.2: Product: HSPA Data Card
Oct 25 20:47:27 rpi1 kernel: [16244.023530] usb 1-1.2: Manufacturer: USBModem
Oct 25 20:47:27 rpi1 kernel: [16244.023546] usb 1-1.2: SerialNumber: 1234567890ABCDEF
Oct 25 20:47:27 rpi1 kernel: [16244.039450] scsi51 : usb-storage 1-1.2:1.0
Oct 25 20:47:28 rpi1 kernel: [16244.959773] usb 1-1.2: USB disconnect, device number 102
Oct 25 20:47:28 rpi1 kernel: [16245.239348] usb 1-1.2: new high-speed USB device number 103 using dwc_otg

Interestingly, on my x86_64 laptop, also running gentoo, kernel 3.3.5, the device works flawlessly, in spite of the warning that useserial is not a "proper driver".

So I suspect it might be ARM-specific bug, or some misconfiguration in the
gentoo on the Raspberry Pi.
I would be very grateful for at least some workaround, since this bug completely 
blocks my intended use of Rpi.

Emerge --info at the raspberry:
rpi1 etc # emerge --info
Portage 2.1.10.49 (default/linux/arm/10.0, gcc-4.5.3, glibc-2.14.1-r3, 3.6.1+ armv6l)
=================================================================
System uname: Linux-3.6.1+-armv6l-ARMv6-compatible_processor_rev_7_-v6l-with-gentoo-2.1
Timestamp of tree: Mon, 13 Aug 2012 00:45:01 +0000
app-shells/bash:          4.2_p20
dev-lang/python:          2.7.3-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv6j-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
CHOST="armv6j-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl arm berkdb bzip2 cli cracklib crypt cups cxx fortran gdbm gpm iconv ipv6 modules mudflap ncurses nls nptl openmp pam pcre pppd readline session ssl static-libs tcpd unicode zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-10-26 10:39:25 UTC
I think this is more likely a hardware issue. Have you tried using a self-powered USB hub between the RPi and the 3G/UMTS dongle?
Comment 2 Jiri Pittner 2012-10-26 11:25:39 UTC
Good idea, it perhaps could be that RPi is not able to provide enough power
while the laptop was, and that causes repeated resets of the UMTS stick.
I will try with the hub and report the result.
Comment 3 Jiri Pittner 2012-10-27 11:13:40 UTC
It was a hardware issue indeed, with an active USB2.0 hub between RPi and the UMTS stick it works flawlessly.
Comment 4 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-10-27 12:53:09 UTC
Instead of a powered USB hub, you could also try a different power supply. Some drop below 4.9V under load which is fine according to the USB standard, but the Raspberry Pi doesn't like it.