The C Source, Patches and (shudder!) Bugs
Post Reply
alexfish
Posts: 7
Joined: 16 Aug 2010, 14:26

usb_modeswitch (Oneiric , Natty )

Post by alexfish » 30 Oct 2011, 20:36

Have tested latest debian packages 1.9 and 1.2 on Natty assuming this may apply to Oneiric

1.9 partially breaks , mainly the hot plugging (tested with two zte devices) not sure about others have seen posts about this
1.2 can break totally
have also see post where manual switch fails , yes I know what udev is for. but have checked by disabled the switching. in the usb_modeswitch.conf , then moved the unpack the tar.gz file to /tmp/usb_modeswitch.d

then usb_modeswitch to the /tmp/usb_modeswitch.d

anyhow for Ubuntu users of the above Title, have done a post here

usb_modeswitch (Oneiric , Natty )
http://ubuntuforums.org/showthread.php?t=1872251

alexfish

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

Post by Josh » 31 Oct 2011, 09:17

Can you define "1.2.0 can break totally"?

What is happening and what is not happening?

alexfish
Posts: 7
Joined: 16 Aug 2010, 14:26

Post by alexfish » 31 Oct 2011, 22:16

Hi Josh

upgraded to 1.9 to give it a run , OK at boot ; the hot plugging did not work ,

in 1.2 , test 2 devices 19d2:2000 and 19d2:0103 : both not switching at boot or when hot plugging

part of the err message read could not claim interface , when manual switching , here is part of the syslog

Code: Select all

Oct 29 19:31:47 alexfish-desktop usb_modeswitch_dispatcher: *** glibc detected *** /usr/sbin/usb_modeswitch_dispatcher: double free or corruption (!prev): 0x094537e0 ***
Oct 29 19:31:48 alexfish-desktop kernel: [  142.195640] scsi 7:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 2
Oct 29 19:31:48 alexfish-desktop kernel: [  142.211743] sr1: scsi-1 drive
Oct 29 19:31:48 alexfish-desktop kernel: [  142.212623] sr 7:0:0:0: Attached scsi CD-ROM sr1
Oct 29 19:31:48 alexfish-desktop kernel: [  142.212889] sr 7:0:0:0: Attached scsi generic sg3 type 5
Oct 29 19:31:48 alexfish-desktop kernel: [  143.028112] usb 1-3: usbfs: USBDEVFS_CONTROL failed cmd lsusb rqt 128 rq 6 len 4 ret -110
Oct 29 19:32:23 alexfish-desktop kernel: [  177.389263] usb 1-8: USB disconnect, address 4
Oct 29 19:32:23 alexfish-desktop kernel: [  177.660042] usb 1-8: new high speed USB device using ehci_hcd and address 5
Oct 29 19:32:23 alexfish-desktop kernel: [  177.815703] scsi8 : usb-storage 1-8:1.2
Oct 29 19:32:23 alexfish-desktop kernel: [  177.916705] usbcore: registered new interface driver usbserial
Oct 29 19:32:23 alexfish-desktop kernel: [  177.916754] USB Serial support registered for generic
Oct 29 19:32:23 alexfish-desktop kernel: [  177.919599] usbcore: registered new interface driver usbserial_generic
Oct 29 19:32:23 alexfish-desktop kernel: [  177.919607] usbserial: USB Serial Driver core
tried disable and enable the usb_modeswitch.conf and made no difference , used manual eject to get the device to switch

I have reinstalled the repo modeswitch , will re-run the upgrades as before , to get the debug files , and will post asp

as a matter of note, sakis3g will switch the devices {latest version} have also recompile sakis3g with usb_modeswitch 1.9 . no problem with the two devices, have not tried 1.2

will also post the results of Sakis3g log as well

regards

alexfish

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

Post by Josh » 31 Oct 2011, 23:53

It seems there is trouble with the dispatcher variant of Ubuntu. I can't really help there, they are using a different program, not the original script. Please report this as a bug to the Ubuntu "Launchpad".

On the other hand, it seems that the file that was missing and needed to make the Debian package work, is back. It's called "/lib/udev/hotplug.functions".
So you should be able to use the unchanged Debian packages again.

Or simply use the source package. It's tested on Natty and Oneiric (and a load of other distros) and working well. Easy and quick to install - just add package "libusb-dev".


alexfish
Posts: 7
Joined: 16 Aug 2010, 14:26

Post by alexfish » 10 Nov 2011, 13:35

hi josh

RE : Natty
can confirm if 1.2.0 is installed the the dispatcher is the problem : remove the 1.2.0 dispatcher (seems to be an exec ) and replaced with natty dispatcher (tcl script ) solved the problem both devices now working
readers can use gksu nautilus to change the files over.

also had not noticed the the change in permissions of latest usb_modeswitch , the main errors of
Looking for active driver ...
USB error: could not get bound driver: Operation not permitted
No driver found. Either detached before or never attached
Setting up communication with interface 0
USB error: could not claim interface 0: Operation not permitted
Could not claim interface (error -1). Skipping message sending
-> Run lsusb to note any changes. Bye.
should have realized should be running sudo usb_modeswitch ((Cloth head)) : Bah. sure earlier versions did not require root

had not spotted this since I use own ui for debugging the system (a relic from earlier ubuntu verions)

got around that by

Code: Select all

sudo su

chmod u+s /usr/sbin/usb_modeswitch
thanks for the hat tip

Added: have done posts on Ubuntu Forums : Tutorials and tips
Re: How To : Mobile Broadband Connections [ Ubuntu 11.04: 10.10 : 10.04 : 9.10 ] posts #59 : can also check out : #60 and #61




alexfish

Post Reply