Subject: [alpine-devel] [2.6rc2] USB 3G Modems Not Working, Anymore

From: Der Tiger <[email-masked]>
Date: Fri, 03 May 2013 16:10:02 +0200

Hi,

Looks like there is a problem with USB modems (in my case a Huawei
E372)  on 2.6rc1 and 2.6rc2. The modem is recognized and listed in
/var/log/messages, as well as with 'lsusb', but no /dev/ttyUSB* special
files are created. I had no such troubles on 2.5. Between the working
2.5 and the current, non-operating state there where only two 'sudo apk
-U upgrade' (to 2.6rc1 and later 2.6rc2, both with reboot afterwards)
and no other changes to the Alpine system.

At this stage, I cannot pinpoint the problem. Kernel module 'usbserial'
is loaded and a generic USB-to-serial adapter is recognized and the
corresponding special file created. My educated guess therefore is an
issue with 'usb_modeswitch' which can access the USB modem, but exits with:

8<------------------------------------------------------->8
alpine:~$ sudo usb_modeswitch -v 12d1 -p 1505 -H

Looking for default devices ...
   found matching product ID
   adding device
 Found device in default mode, class or configuration (1)
Accessing device 003 on bus 005 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 OK, driver found; name unknown, limitation of libusb1
 OK, driver "unkown" detached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: HUAWEI 
   Model String: Mass Storage   
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Sending Huawei control message ...
Error: sending Huawei control message failed (error -32). Aborting.
8<------------------------------------------------------->8

I can't tell, if this is caused by the kernel or the usb_modeswitch
tool. The modem itself is working flawlessly as proofed by connecting it
to my laptop. A different type of Huawei modem (namely E169) causes the
same problem on Alpine 2.6rc*.

I'll gladly provide any information required to solve the problem.

Any idea, what's causing this?

Kind Regards, Tiger

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: "V.Krishn" <[email-masked]>
Date: Fri, 3 May 2013 20:19:21 +0530

> issue with 'usb_modeswitch' which can access the USB modem, but exits with:

I am not sure if this would work (if usb_modeswitch does not work), 
if you still see the modem's flash storage as mounted then, do:
sudo eject /dev/${device} #Your would need to figure out the device, should be 
/dev/sr0 (usually)
sudo modprobe usbserial vendor=0x12d1 product=0x1505

-- 
Regards.
V.Krishn

---

---

From: Der Tiger <[email-masked]>
Date: Fri, 03 May 2013 19:01:46 +0200

ReHi,

Thank you for your input!

> sudo eject /dev/${device} #Your would need to figure out the device, should be 
'mount' tells me, there are no unintentional mounts. There is no
/dev/sr* special file available after connecting the modem (see below).

> sudo modprobe usbserial vendor=0x12d1 product=0x1505
alpine:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1505
alpine:~$ ls -l /dev/ttyUSB*
ls: /dev/ttyUSB*: No such file or directory
---{physically reconnecting the device}---
gringotts:~$ dmesg | tail -n 14
[11335.038569] usb 5-6: reset high-speed USB device number 6 using ehci-pci
[11389.477804] usb 5-6: USB disconnect, device number 6
[11407.840977] usb 5-5: new high-speed USB device number 7 using ehci-pci
[11407.967271] usb 5-5: New USB device found, idVendor=12d1, idProduct=1505
[11407.967280] usb 5-5: New USB device strings: Mfr=3, Product=2,
SerialNumber=0
[11407.967286] usb 5-5: Product: HUAWEI Mobile
[11407.967292] usb 5-5: Manufacturer: Huawei Technologies
[11407.970287] scsi9 : usb-storage 5-5:1.0
[11407.981628] scsi10 : usb-storage 5-5:1.1
[11408.982575] scsi 9:0:0:0: CD-ROM            HUAWEI   Mass Storage
 2.31 PQ: 0 ANSI: 2
[11408.987318] sr0: scsi-1 drive
[11408.988879] sr 9:0:0:0: Attached scsi CD-ROM sr0
[11408.989553] scsi 10:0:0:0: Direct-Access     HUAWEI   TF CARD Storage
 2.31 PQ: 0 ANSI: 2
[11409.030243] sd 10:0:0:0: [sdb] Attached SCSI removable disk
alpine:~$ ls -l /dev/ttyUSB*
ls: /dev/ttyUSB*: No such file or directory
alpine:~$ ls -l /dev/sr*
ls: /dev/sr*: No such file or directory

The strange thing is, neither the ttyUSB*, nor the sr0 special files are
created, while sdb can be mounted without a hitch, after inserting a
FLASH card in the device's internal drive.

None of these problems occurred on Alpine 2.5.

Regards, Tiger

---

---

From: "V.Krishn" <[email-masked]>
Date: Fri, 3 May 2013 23:07:56 +0530

On Friday, May 03, 2013 10:31:46 PM you wrote:
> > sudo eject /dev/${device} #Your would need to figure out the device,
> > should be /dev/sr0 (usually)
> 

mount /dev/sr0 should mount it. 
If not, looks more like a kernel/modules problem.

> None of these problems occurred on Alpine 2.5.

lsmod please ?

Could not tell more, except that something similar did happen when I was 
trying gsm or cdma modem 1 yrs back, but now is ok.

dmesg shows sr0 and modem.
so try again:

$ sudo rmmod usbserial
$ lsmod # if you still see usbserial, you need to figure out how to rmmod it
$ eject /dev/sr0 # do it anyways
$ sudo modprobe usbserial vendor=0x12d1 product=0x1505
$ dmesg | tail -n 24

you said you did 'sudo apk -U upgrade' , does this still happen with fresh rc2 
.iso install ? if yes, more likely a kernel/module issue.

-- 
Regards.
V.Krishn

---

---

From: Der Tiger <[email-masked]>
Date: Fri, 03 May 2013 21:41:08 +0200

ReHi,

Once more, thank you for your mail!

> mount /dev/sr0 should mount it. 
There is _NO_ special file /dev/sr0 to mount.

> If not, looks more like a kernel/modules problem.
Indeed, it does.

> lsmod please ?
alpine:~$ sudo lsmod
Module                  Size  Used by    Not tainted
usbserial              25587  0
nls_utf8                1269  0
nls_cp437               6207  0
vfat                    8429  0
fat                    47833  1 vfat
bridge                 77557  0
stp                     1964  1 bridge
llc                     5223  2 bridge,stp
xt_length               1176  1
ipt_REJECT              2029  4
xt_LOG                 10196  4
xt_limit                2032  9
xt_TCPMSS               2907  1
xt_physdev              1587  6
xt_conntrack            2856  7
iptable_filter          1538  1
xt_REDIRECT             1556  5
ipt_MASQUERADE          1719  1
xt_tcpudp               2219 17
xt_comment               920 49
iptable_nat             2538  1
nf_conntrack_ipv4      12793  8
nf_defrag_ipv4          1449  1 nf_conntrack_ipv4
nf_nat_ipv4             3355  1 iptable_nat
nf_nat                 15309  4
xt_REDIRECT,ipt_MASQUERADE,iptable_nat,nf_nat_ipv4
nf_conntrack           77334  6
xt_conntrack,ipt_MASQUERADE,iptable_nat,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat
iptable_mangle          1527  0
ip_tables              20191  3 iptable_filter,iptable_nat,iptable_mangle
ip6table_filter         1495  1
ip6_tables             20681  1 ip6table_filter
x_tables               22660 16
xt_length,ipt_REJECT,xt_LOG,xt_limit,xt_TCPMSS,xt_physdev,xt_conntrack,iptable_filter,xt_REDIRECT,ipt_MASQUERADE,xt_tcpudp,xt_comment,iptable_mangle,ip_tables,ip6table_filter,ip6_tables
xen_blkback            16749  0 [permanent]
xen_netback            20183  0 [permanent]
tun                    20436  2
pppoe                   9671  2
pppox                   2326  1 pppoe
ppp_generic            26161  6 pppoe,pppox
slhc                    4729  1 ppp_generic
ipv6                  290224 39 bridge
af_packet              26611  4
iTCO_wdt                5244  0
iTCO_vendor_support     2745  1 iTCO_wdt
coretemp                5919  0
hwmon                   1679  1 coretemp
serio_raw               4667  0
psmouse                58314  0
sr_mod                 12555  0
cdrom                  39650  1 sr_mod
pcspkr                  1862  0
snd_hda_codec_realtek    58676  1
snd_hda_codec_hdmi     25288  1
snd_hda_intel          28350  0
snd_hda_codec          92862  3
snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
snd_hwdep               6563  1 snd_hda_codec
snd_pcm                78875  3
snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer              22138  1 snd_pcm
snd                    72062  7
snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore               6399  1 snd
snd_page_alloc          8190  2 snd_hda_intel,snd_pcm
shpchp                 23745  0
pci_hotplug            23618  1 shpchp
lpc_ich                11525  0
mfd_core                3427  1 lpc_ich
e1000e                154017  0
r8169                  50268  0
firmware_class         10936  0 r8169
mii                     4630  1 r8169
evdev                  11357  8
freq_table              3698  0
mperf                   1379  0
processor              29483  0
i2c_i801               12976  0
ehci_pci                3473  0
ehci_hcd               33803  1 ehci_pci
uhci_hcd               19692  0
fbcon                  34012 70
font                    7907  1 fbcon
bitblit                 4448  1 fbcon
fbcon_rotate            1915  1 bitblit
fbcon_ccw               4797  1 fbcon_rotate
fbcon_ud                4881  1 fbcon_rotate
fbcon_cw                4730  1 fbcon_rotate
ahci                   21947  2
softcursor              1253  4 bitblit,fbcon_ccw,fbcon_ud,fbcon_cw
libahci                21970  1 ahci
tileblit                2063  1 fbcon
libata                180428  2 ahci,libahci
gma500_gfx            156484  1
drm_kms_helper         32486  1 gma500_gfx
drm                   261165  2 gma500_gfx,drm_kms_helper
agpgart                35142  1 drm
fb                     59535  9
fbcon,bitblit,fbcon_ccw,fbcon_ud,fbcon_cw,softcursor,tileblit,gma500_gfx,drm_kms_helper
fbdev                    945  2 fbcon,fb
cfbfillrect             3189  1 gma500_gfx
cfbimgblt               2210  1 gma500_gfx
cfbcopyarea             3049  1 gma500_gfx
i2c_algo_bit            5161  1 gma500_gfx
i2c_core               23552  5
i2c_i801,gma500_gfx,drm_kms_helper,drm,i2c_algo_bit
video                  12500  1 gma500_gfx
backlight               4552  1 video
button                  5396  0
loop                   17400  0
ext4                  290110  3
mbcache                 6434  1 ext4
jbd2                   58854  1 ext4
crc16                   1563  1 ext4
usb_storage            48261  1
usbcore               158745  5
usbserial,ehci_pci,ehci_hcd,uhci_hcd,usb_storage
usb_common              1037  1 usbcore
sd_mod                 26469  5
scsi_mod              107941  4 sr_mod,libata,usb_storage,sd_mod

> dmesg shows sr0 and modem.
While both are detected, the special file for /dev/sr0 is not created.

> $ sudo modprobe usbserial vendor=0x12d1 product=0x1505
alpine:~$ sudo rmmod usbserial
alpine:~$ sudo lsmod | grep usbserial
alpine:~$ sudo eject /dev/sr0
eject: /dev/sr0: not found mountpoint or device with the given name
alpine:~$ sudo modprobe usbserial vendor=0x12d1 product=0x1505
alpine:~$ dmesg | tail -n 24
[13209.503041] usb 5-5: USB disconnect, device number 8
[13209.521010] sd 12:0:0:0: [sdb] Synchronizing SCSI cache
[13209.521190] sd 12:0:0:0: [sdb]
[13209.521198] Result: hostbyte=0x01 driverbyte=0x00
[18426.541398] usbserial: USB Serial deregistering driver FTDI USB
Serial Device
[18426.541843] usbcore: deregistering interface driver ftdi_sio
[18429.406204] usbserial: USB Serial deregistering driver generic
[18429.408587] usbcore: deregistering interface driver usbserial_generic
[18429.409152] usbcore: deregistering interface driver usbserial
[18517.437981] usb 5-6: new high-speed USB device number 9 using ehci-pci
[18517.563912] usb 5-6: New USB device found, idVendor=12d1, idProduct=1505
[18517.563920] usb 5-6: New USB device strings: Mfr=3, Product=2,
SerialNumber=0
[18517.563926] usb 5-6: Product: HUAWEI Mobile
[18517.563932] usb 5-6: Manufacturer: Huawei Technologies
[18517.566418] scsi13 : usb-storage 5-6:1.0
[18517.578001] scsi14 : usb-storage 5-6:1.1
[18518.569340] scsi 13:0:0:0: CD-ROM            HUAWEI   Mass Storage
  2.31 PQ: 0 ANSI: 2
[18518.573987] sr0: scsi-1 drive
[18518.580633] sr 13:0:0:0: Attached scsi CD-ROM sr0
[18518.584799] scsi 14:0:0:0: Direct-Access     HUAWEI   TF CARD Storage
 2.31 PQ: 0 ANSI: 2
[18518.614981] sd 14:0:0:0: [sdb] Attached SCSI removable disk
[18598.261266] usbcore: registered new interface driver usbserial
[18598.261870] usbcore: registered new interface driver usbserial_generic
[18598.262749] usbserial: USB Serial support registered for generic
alpine:~$ ls -l /dev/ttyUSB*
ls: /dev/ttyUSB*: No such file or directory

> .iso install ? if yes, more likely a kernel/module issue.
Unfortunately, the system in question is a router needed for various
tasks and can't be shut down for maintenance, easily. Before I can try a
reinstall, I'd need a proper strategy to ensure success. At this point
in time, I don't see the problem being analysed enough to formulate a
winning strategy for the reinstall to be a solution.

If there are others successfully using their Huawei USB modems on Alpine
2.6rc*, I'd give the reinstall a try.

Regards, Tiger

---

---

From: qnx4ever <[email-masked]>
Date: Sat, 4 May 2013 09:45:44 +0400

When I had similar hw issues with network card drivers, I downgraded my
server to the prev release. Even though it might not be a recommended
upgrade path to downgrade, you can always do so. If there's not much
running on the server it could be the easiest way to make USB modem working
for now. In the mean time you can continue testing and resolution on your
laptop.

---

From: Der Tiger <[email-masked]>
Date: Sat, 04 May 2013 15:08:12 +0200

ReHi,

Thanks for your help!

> server to the prev release.
Well, I tried to avoid the downgrade option, because this can cause
irreparable damage to the configuration ('backup' is your friend), but
since there seems to be no other solution available, I had no choice.

Anyway, there is poor to no documentation regarding the version
downgrade of Alpine systems using 'apk' available on the WWW. Therefore,
here a short how-to for documentation purposes I extracted form apk's
sources:

1) Backup your system
2) 'sudo nano /etc/apk/repositories' and change URL to whatever version
you need
3) 'sudo apk -Ufa upgrade', where 'U' updates the local repository
cache, 'f' forces some actions and 'a' tells apk to use the latest
version _a_vailable from the given repository, regardless of the (newer)
version currently installed.
4) 'sudo apk -r fix linux-grsec' to trigger syslinux installation

Being back to 2.5 the USB modem is working, again. Thanks to all for
your support!

Regards, Tiger

---

---

From: Carlo Landmeter <[email-masked]>
Date: Sat, 4 May 2013 09:10:18 +0200

> issue with 'usb_modeswitch' which can access the USB modem, but exits with:

Do you try this with udev?

---

From: Der Tiger <[email-masked]>
Date: Sat, 04 May 2013 15:09:54 +0200

Hi Carlo,

Thank you for your mail!

> Do you try this with udev?
Nope. udevd is not running. Because udevd wasn't necessary on Alpine 2.5
to get the USB modem running, I wouldn't expect it to be required on
2.6. Then again, what do I know. I currently can't test this, due to the
fact, the physical system has just been downgraded back to Alpine 2.5,
while testing USB devices on virtual systems doesn't yield reliable results.

I'd guess this to be a problem with a kernel module (e.g. usbserial) or
with usb_modeswitch itself.

Regards, Tiger

---