SOLVED: Re: [opensuse-factory] Re: [opensuse-kernel] ZTE MF626 on openSUSE 11.3 Milestone 6
On 5/10/10, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
can't you just "eject sr0" to switch the device? Definitely worth trying.
Wonderful, it works! =) It automatically 'switches' to be as GSM-Modem: May 10 18:40:20 linux-6ajn hald: unmounted /dev/sr0 from '/media/ZTEMODEM' on behalf of uid 1000 May 10 18:40:25 linux-6ajn kernel: [ 247.803499] usb 1-1: USB disconnect, address 2 May 10 18:40:30 linux-6ajn kernel: [ 253.411100] usb 1-1: new high speed USB device using ehci_hcd and address 3 May 10 18:40:30 linux-6ajn kernel: [ 253.538102] usb 1-1: New USB device found, idVendor=19d2, idProduct=0031 May 10 18:40:30 linux-6ajn kernel: [ 253.538113] usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0 May 10 18:40:30 linux-6ajn kernel: [ 253.538122] usb 1-1: Product: ZTE CDMA Technologies MSM May 10 18:40:30 linux-6ajn kernel: [ 253.538128] usb 1-1: Manufacturer: ZTE,Incorporated May 10 18:40:30 linux-6ajn kernel: [ 253.541826] option 1-1:1.0: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.542856] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 May 10 18:40:30 linux-6ajn kernel: [ 253.543431] option 1-1:1.1: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.543720] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 May 10 18:40:30 linux-6ajn kernel: [ 253.546466] scsi7 : usb-storage 1-1:1.2 May 10 18:40:30 linux-6ajn kernel: [ 253.547236] option 1-1:1.3: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.547559] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2 May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB0) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB0): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB2) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB2): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB1) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB1): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn kernel: [ 254.563354] scsi 7:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2 May 10 18:40:31 linux-6ajn kernel: [ 254.563825] sd 7:0:0:0: Attached scsi generic sg1 type 0 May 10 18:40:31 linux-6ajn kernel: [ 254.599549] sd 7:0:0:0: [sdb] Attached SCSI removable disk May 10 18:40:35 linux-6ajn modem-manager: (ttyUSB1) closing serial device... May 10 18:40:35 linux-6ajn modem-manager: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 claimed port ttyUSB1 May 10 18:40:35 linux-6ajn modem-manager: Added modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 May 10 18:40:37 linux-6ajn su: (to root) andi on /dev/pts/3 May 10 18:40:39 linux-6ajn modem-manager: (ttyUSB2) closing serial device... May 10 18:40:39 linux-6ajn modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 as /org/freedesktop/ModemManager/Modems/0 May 10 18:40:39 linux-6ajn modem-manager: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 claimed port ttyUSB2 May 10 18:40:48 linux-6ajn modem-manager: (ttyUSB0) closing serial device... I am just curious on how it happened (worked without usb_modeswitch)? =) Best regards, -- Andi Sugandi, openSUSE-Id Team, openSUSE Ambassador Bandung, Indonesia -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
2010/5/10 Andi Sugandi <andisugandi@gmail.com>:
On 5/10/10, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
can't you just "eject sr0" to switch the device? Definitely worth trying.
Wonderful, it works! =)
It automatically 'switches' to be as GSM-Modem:
May 10 18:40:20 linux-6ajn hald: unmounted /dev/sr0 from '/media/ZTEMODEM' on behalf of uid 1000 May 10 18:40:25 linux-6ajn kernel: [ 247.803499] usb 1-1: USB disconnect, address 2 May 10 18:40:30 linux-6ajn kernel: [ 253.411100] usb 1-1: new high speed USB device using ehci_hcd and address 3 May 10 18:40:30 linux-6ajn kernel: [ 253.538102] usb 1-1: New USB device found, idVendor=19d2, idProduct=0031 May 10 18:40:30 linux-6ajn kernel: [ 253.538113] usb 1-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0 May 10 18:40:30 linux-6ajn kernel: [ 253.538122] usb 1-1: Product: ZTE CDMA Technologies MSM May 10 18:40:30 linux-6ajn kernel: [ 253.538128] usb 1-1: Manufacturer: ZTE,Incorporated May 10 18:40:30 linux-6ajn kernel: [ 253.541826] option 1-1:1.0: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.542856] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0 May 10 18:40:30 linux-6ajn kernel: [ 253.543431] option 1-1:1.1: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.543720] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1 May 10 18:40:30 linux-6ajn kernel: [ 253.546466] scsi7 : usb-storage 1-1:1.2 May 10 18:40:30 linux-6ajn kernel: [ 253.547236] option 1-1:1.3: GSM modem (1-port) converter detected May 10 18:40:30 linux-6ajn kernel: [ 253.547559] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2 May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB0) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB0): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB2) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB2): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB1) opening serial device... May 10 18:40:31 linux-6ajn modem-manager: (ttyUSB1): probe requested by plugin 'ZTE' May 10 18:40:31 linux-6ajn kernel: [ 254.563354] scsi 7:0:0:0: Direct-Access ZTE MMC Storage 2.31 PQ: 0 ANSI: 2 May 10 18:40:31 linux-6ajn kernel: [ 254.563825] sd 7:0:0:0: Attached scsi generic sg1 type 0 May 10 18:40:31 linux-6ajn kernel: [ 254.599549] sd 7:0:0:0: [sdb] Attached SCSI removable disk May 10 18:40:35 linux-6ajn modem-manager: (ttyUSB1) closing serial device... May 10 18:40:35 linux-6ajn modem-manager: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 claimed port ttyUSB1 May 10 18:40:35 linux-6ajn modem-manager: Added modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 May 10 18:40:37 linux-6ajn su: (to root) andi on /dev/pts/3 May 10 18:40:39 linux-6ajn modem-manager: (ttyUSB2) closing serial device... May 10 18:40:39 linux-6ajn modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 as /org/freedesktop/ModemManager/Modems/0 May 10 18:40:39 linux-6ajn modem-manager: (ZTE): GSM modem /sys/devices/pci0000:00/0000:00:12.2/usb1/1-1 claimed port ttyUSB2 May 10 18:40:48 linux-6ajn modem-manager: (ttyUSB0) closing serial device...
I am just curious on how it happened (worked without usb_modeswitch)? =)
I guess it's kernel's module that switches device to modem mode. That's why userspace tool usb_modeswitch should not be needed anymore. However I think it should switch device to modem mode by default, right after plugging it. You still need to execute "eject /dev/sr0", don't you? Maybe you could create such a feature request on kernel's bugzilla? -- Rafał -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, 10 May 2010 14:23:17 +0200 Rafał Miłecki <zajec5@gmail.com> wrote:
2010/5/10 Andi Sugandi <andisugandi@gmail.com>:
On 5/10/10, Stefan Seyfried <stefan.seyfried@googlemail.com> wrote:
can't you just "eject sr0" to switch the device? Definitely worth trying.
Wonderful, it works! =)
I guess it's kernel's module that switches device to modem mode. That's why userspace tool usb_modeswitch should not be needed anymore.
Not anymore...
However I think it should switch device to modem mode by default, right after plugging it. You still need to execute "eject /dev/sr0", don't you? Maybe you could create such a feature request on kernel's bugzilla?
That depends. Opinions on this change about every week. During even weeks, the "kernel driver makes the device useful" approach is chosen. During odd weeks, the "we need userspace crap like usb_modeswitch to make the device useful" approach is chosen. I learned that when I tried to make a device useful for all users (a USB WLAN stick) half a year ago and I finally gave up on the issue. Packaging a udev rule that does "eject" automatically would be a simple solution for Andi. -- Stefan Seyfried "Any ideas, John?" "Well, surrounding them's out." -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, May 10, 2010 at 03:22:07PM +0200, Stefan Seyfried wrote:
However I think it should switch device to modem mode by default, right after plugging it. You still need to execute "eject /dev/sr0", don't you? Maybe you could create such a feature request on kernel's bugzilla?
That depends. Opinions on this change about every week. During even weeks, the "kernel driver makes the device useful" approach is chosen. During odd weeks, the "we need userspace crap like usb_modeswitch to make the device useful" approach is chosen.
No, the kernel developers responsible for this driver, and the usb-storage driver have a very clear approach, that does not change per-week. It is: Existing kernel quirks to automatically handle these types of devices will be left alone in the kernel. Any new tweaks like this, that can be done in userspace, should be done in userspace. The "usb-modeswitch" program is the recommended way to resolve this, and is part of the default udev rules, so perhaps you just need to add your device id to it. thanks, greg k-h -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, 10 May 2010 08:02:33 -0700 Greg KH <gregkh@suse.de> wrote:
On Mon, May 10, 2010 at 03:22:07PM +0200, Stefan Seyfried wrote:
That depends. Opinions on this change about every week. During even weeks, the "kernel driver makes the device useful" approach is chosen. During odd weeks, the "we need userspace crap like usb_modeswitch to make the device useful" approach is chosen.
No, the kernel developers responsible for this driver, and the usb-storage driver have a very clear approach, that does not change per-week. It is: Existing kernel quirks to automatically handle these types of devices will be left alone in the kernel. Any new tweaks like this, that can be done in userspace, should be done in userspace.
It certainly feels like it changes quite often ;) Anyway, I had the problem that my device was (wrongly) claimed by the zd1211 driver, which wanted to switch it but couldn't. I was neither allowed to implement switching into zd1211 (which is of course wrong, but at least fixes the problem), so that ar97something could drive the stick, ("no new quirks, and it is generally wrong!!") nor to remove it from zd1211 ("will break existing users!!"), so I wandered off into the sunset, especially since I now have different hardware ;)
The "usb-modeswitch" program is the recommended way to resolve this, and is part of the default udev rules, so perhaps you just need to add your device id to it.
If eject will do perfectly fine, why mess around with usb-modeswitch? The last time I had looked at this fine piece of software engineering, I was not willing to have this run as root on my machines. That's also why I did refuse to maintain it for openSUSE and drop it. -- Stefan Seyfried "Any ideas, John?" "Well, surrounding them's out." -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, May 10, 2010 at 05:31:27PM +0200, Stefan Seyfried wrote:
On Mon, 10 May 2010 08:02:33 -0700 Greg KH <gregkh@suse.de> wrote:
On Mon, May 10, 2010 at 03:22:07PM +0200, Stefan Seyfried wrote:
That depends. Opinions on this change about every week. During even weeks, the "kernel driver makes the device useful" approach is chosen. During odd weeks, the "we need userspace crap like usb_modeswitch to make the device useful" approach is chosen.
No, the kernel developers responsible for this driver, and the usb-storage driver have a very clear approach, that does not change per-week. It is: Existing kernel quirks to automatically handle these types of devices will be left alone in the kernel. Any new tweaks like this, that can be done in userspace, should be done in userspace.
It certainly feels like it changes quite often ;)
Anyway, I had the problem that my device was (wrongly) claimed by the zd1211 driver, which wanted to switch it but couldn't.
I was neither allowed to implement switching into zd1211 (which is of course wrong, but at least fixes the problem), so that ar97something could drive the stick, ("no new quirks, and it is generally wrong!!") nor to remove it from zd1211 ("will break existing users!!"), so I wandered off into the sunset, especially since I now have different hardware ;)
That's up to the zd1211 driver developers, sorry.
The "usb-modeswitch" program is the recommended way to resolve this, and is part of the default udev rules, so perhaps you just need to add your device id to it.
If eject will do perfectly fine, why mess around with usb-modeswitch? The last time I had looked at this fine piece of software engineering, I was not willing to have this run as root on my machines. That's also why I did refuse to maintain it for openSUSE and drop it.
usb-modeswitch handles more complex situations where a simple 'eject' command will not switch the device into modem mode. This type of device is becoming more popular these days for some reason :( thanks, greg k-h -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Mon, 10 May 2010 08:55:49 -0700, Greg KH <gregkh@suse.de> wrote:
usb-modeswitch handles more complex situations where a simple 'eject' command will not switch the device into modem mode.
And the package got dropped from factory ... Philipp -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (5)
-
Andi Sugandi
-
Greg KH
-
Philipp Thomas
-
Rafał Miłecki
-
Stefan Seyfried