Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
woody
Posts: 3
Joined: 16 Jul 2014, 21:58

ZTE MF691 switches, but does not get tty assigned

Post by woody » 16 Jul 2014, 23:10

I'm trying to install a ZTE MF691 USB modem on an Arch Linux Arm Pogoplug machine. I have successfully installed this modem on a Win7 machine and a Linux Mint machine. If I plug it in to the Pogoplug with usb_modeswitch turned off, lsusb shows the unswitched default device, as expected, but does mount the storage device as cdrom on /dev/sr0 as I would expect it to.

When I plug in with usb_modeswitch active, lsusb shows this:

Code: Select all

Bus 001 Device 016: ID 19d2:1203 ZTE WCDMA Technologies MSM MF691 [ T-Mobile webConnect Rocket 2.0]
This is the correct vendor id/product id for the modem. The problem is that the device should be activated on USB ports on /dev/ACM0 and /dev/ACM1 and it is not.

dmesg shows this:

Code: Select all

[  249.242276] usb 1-1.4: new high-speed USB device number 6 using orion-ehci
[  249.386254] usb-storage 1-1.4:1.7: USB Mass Storage device detected
[  249.406174] scsi3 : usb-storage 1-1.4:1.7
[  250.413718] scsi 3:0:0:0: CD-ROM            T-Mobile USB SCSI CD-ROM  0001 PQ: 0 ANSI: 0
[  250.429955] scsi 3:0:0:0: Attached scsi generic sg1 type 5
[  250.444233] scsi 3:0:0:1: Direct-Access     T-Mobile MMC Storage      0001 PQ: 0 ANSI: 0
[  250.462699] sd 3:0:0:1: [sdb] Attached SCSI removable disk
[  250.474217] sd 3:0:0:1: Attached scsi generic sg2 type 0
I tested this on a "virgin" Arch Linux Arm installation on an identical Pogoplug that does not have usb_modeswitch installed. On the 2nd Pogoplug, I first see the cdrom mounted on /dev/sr0 as I would expect, along with the default product ID. When I eject /dev/sr0, lsusb changes to the target product id and the device is active on USB ports on /dev/ACM0 and /dev/ACM1. All of this is what I would expect to see.

Other USB devices, e.g. SD cards, do get assigned to a /dev correctly.

So on the Pogoplug that I'm trying to get working, it seems that for some reason, neither the cdrom drives or the modem are mounting on the /dev devices that I would expect. Does anybody have an idea of what would cause this or how to diagnose it?

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: ZTE MF691 switches, but does not get tty assigned

Post by LOM » 17 Jul 2014, 04:09

woody wrote: dmesg shows this:

Code: Select all

[  249.242276] usb 1-1.4: new high-speed USB device number 6 using orion-ehci
[  249.386254] usb-storage 1-1.4:1.7: USB Mass Storage device detected
[  249.406174] scsi3 : usb-storage 1-1.4:1.7
[  250.413718] scsi 3:0:0:0: CD-ROM            T-Mobile USB SCSI CD-ROM  0001 PQ: 0 ANSI: 0
[  250.429955] scsi 3:0:0:0: Attached scsi generic sg1 type 5
[  250.444233] scsi 3:0:0:1: Direct-Access     T-Mobile MMC Storage      0001 PQ: 0 ANSI: 0
[  250.462699] sd 3:0:0:1: [sdb] Attached SCSI removable disk
[  250.474217] sd 3:0:0:1: Attached scsi generic sg2 type 0
I tested this on a "virgin" Arch Linux Arm installation on an identical Pogoplug that does not have usb_modeswitch installed. On the 2nd Pogoplug, I first see the cdrom mounted on /dev/sr0 as I would expect, along with the default product ID. When I eject /dev/sr0, lsusb changes to the target product id and the device is active on USB ports on /dev/ACM0 and /dev/ACM1. All of this is what I would expect to see.

Other USB devices, e.g. SD cards, do get assigned to a /dev correctly.
There is only one mass storage interface in 19d2:1203 and it is the dongles TTF-card reader which has been attached as /dev/sdb according to your dmesg.
The 2 log lines for the virtual cd-rom are only late arrivals in the log, the cd-rom disappears when the dongle switches mode either by a manual eject of the cd-rom or by usb_modeswitch ejecting it.

There must be something else differing between your two pogoplugs, the /dev/ttyACMx devices are created by the cdc-acm driver which should attach to the dongles interfaces either auto-magically if the driver is built into the kernel or after manually insmod/modprobe of the driver if it is built as a loadable module.
The manual eject cmd does not load any tty driver but later versions of usb_modeswitch will try to load the driver if it finds that no tty driver has attached.

lsmod and cat /proc/bus/usb/devices will show you driver loading status and driver binding status.

woody
Posts: 3
Joined: 16 Jul 2014, 21:58

Re: ZTE MF691 switches, but does not get tty assigned

Post by woody » 17 Jul 2014, 15:09

LOM wrote: There is only one mass storage interface in 19d2:1203 and it is the dongles TTF-card reader which has been attached as /dev/sdb according to your dmesg.
The 2 log lines for the virtual cd-rom are only late arrivals in the log, the cd-rom disappears when the dongle switches mode either by a manual eject of the cd-rom or by usb_modeswitch ejecting it.

There must be something else differing between your two pogoplugs, the /dev/ttyACMx devices are created by the cdc-acm driver which should attach to the dongles interfaces either auto-magically if the driver is built into the kernel or after manually insmod/modprobe of the driver if it is built as a loadable module.
The manual eject cmd does not load any tty driver but later versions of usb_modeswitch will try to load the driver if it finds that no tty driver has attached.

lsmod and cat /proc/bus/usb/devices will show you driver loading status and driver binding status.
So, lsmod shows no loaded modules. Also, /cat/proc/bus/usb does not exist (/cat/bus/input and cat/bus/pci are the only directories there). I also see that /cat/sys/dev/cdrom is missing, but I don't know how those things get set up. This looks to me like maybe some kernel processes are not getting loaded, but I don't know how to debug that.

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: ZTE MF691 switches, but does not get tty assigned

Post by LOM » 17 Jul 2014, 17:17

Well, I can only see it as you are having different kernel builds in the two pogoplugs when it works in one but not in the other.
You need the cdc-acm driver, either directly built into the kernel or provided as a loadable module (cdc-acm.ko) somewhere under /lib/modules/{kernel_version}/kernel/drivers/usb/..

It is the same for the storage drivers, you have loaded basic usb storage support (raw) but you will also need file system drivers on top of that. udf, isofs, fat32, vfat, ntfs, ext3, ext4 depending on which file system you want to access. Should reside under /lib/modules/{kernel_version}/kernel/fs/

There is usually a text file listing drivers built into the kernel, see
/lib/modules/{kernel_version}/modules.builtin

woody
Posts: 3
Joined: 16 Jul 2014, 21:58

Re: ZTE MF691 switches, but does not get tty assigned

Post by woody » 18 Jul 2014, 00:22

Ok, I think I've made some progress. My Arch Linux system uses systemd. I discovered that systemd-modules-load.service failed during bootup. Looks like the reason it failed might be because it was unable to load this module: /etc/modules-load.d/pl2303.conf.

If I try to run that module directly using: /usr/lib/systemd/systemd-modules-load I get:

Code: Select all

Failed to lookup alias 'pl2303': Function not implemented
I think that systemd choked while trying to load that module and then failed to load all of the other ones. So, I need to find out why pl2303.conf failed to load.

At this point, I'm actually debugging my system load and not usb_modeswitch, but I appreciate all your help. If you have any other ideas, please let me know!

Post Reply