Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-09-22 Thread Christian Kastner
Hi all,

On 08/09/2011 03:50 PM, Didier Raboud wrote:
 Christian: ping ?
 
 By the way, I just uploaded new upstream releases for usb-modeswitch{,-data} 
 to unstable, you might want to try them.

I invested another couple of hours yesterday and still no clue for what
might be causing this. So far I've seen this with 2 models, on every
system I tested, both with Squeeze and with Wheezy.

Since this appears to be an isolated issue and debugging hasn't been
fruitful yet I believe I'll just work around it by pinning version
1.1.4. If nobody else is seeing this, expending any more effort into
debugging seems to be pointless.

Please feel free to close the bug.

Thanks for all the help -- especially Josua, who even agreed to me
sending him the stick so he could look at it first-hand!

Sorry for the noise,
Christian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-17 Thread Josua Dietze

Am 17.08.2011 01:10, schrieb Christian Kastner:

I did not yet have time to run the full battery of tests (eg [0]), but
will do so as soon as I can.


I am almost out of clues about what else is there to test. I'll try further to 
evoke the problem on my systems somehow. So far, this has failed.



Thanks for your patience and perseverance...


Likewise ...


Josh

--
Man is the only creature on earth enabled to take a
warm meal while flying.  Loriot



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-16 Thread Christian Kastner
On 08/13/2011 10:03 AM, Josua Dietze wrote:
 Am 11.08.2011 00:34, schrieb Christian Kastner:
 Strange thing: on my netbook the problem hasn't changed, but on my
 desktop PC switching occurs with versions 1.1.4 to 1.1.9 (as confirmed
 by lsusb and dmesg output), but the /dev/gsmmodem symlink does not get
 set up in versions 1.1.7 and above.
 
 So what you are saying that the main problem (no mode switch at boot) is
 now limited to your router, right?

It was still present on the netbook for sure; I couldn't test the router
because it is still in my old apartment and I didn't want to push my
luck (Murphy's Law, etc).

But please scratch that about the desktop PC as well, this was a serious
error on my part. My shell history shows me *rebooting* instead of
powering off/booting to test, which of course meant every reboot going
from 1.1.4 to 1.1.9 was seeing the device already switched by 1.1.4 as
it never lost power. So my success, wasn't.

 Regarding the symlink, the logic has changed somewhat in 1.1.7; to avoid
 treating unrelated devices, a list of known USB IDs is checked before
 acting. This list is appended if you switch your device for the first
 time by plugging in. You will get the symlink from every following mode
 switch, but not on that first encounter.
 So, to test this feature during a boot process, you would in advance
 have to 1. install, 2. plug in, 3. reboot (with or without a previous
 re-plug cycle).
 
 The list of known devices is being deleted when uninstalling, so you
 have the same situation after each version testing. See
 /var/lib/usb_modeswitch/link_list if you want to check it out.

Thanks for the info; I was wondering about that file. It does seem
obvious but it's good to have confirmation.

 Resuming the earlier exchange, the error that you saw in the udev debug
 log should be gone with version 1.1.9 ('arithmetic expression: expecting
 EOF: 0x'). Also, the shell script is not likely to be the culprit when
 it is not even being called during boot.
 
 The main issue was that udev did not run usb_modeswitch _at all_ during
 boot on the router. That may shift the focus to the udev rules file,
 which is part of the data package.

Yeah, that sounds plausible.

 Can you tell us which usb-modeswitch-data version is currently installed
 on your gateway router?
 And did you install a new data package on your desktop machine at some
 point?

Yes, I tried all upgrades provided via squeeze-backports.

Currently, I have usb-modeswitch_1.1.8-1~bpo60+1 and
usb-modeswitch-data_20110714~bpo60+1 installed (I gave 1.1.9 and
20110805 from unstable a try, too).



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-16 Thread Christian Kastner
On 08/15/2011 05:36 PM, Josua Dietze wrote:
 Am 13.08.2011 10:03, schrieb Josua Dietze:
 The main issue was that udev did not run usb_modeswitch _at all_
 during boot on
 the router. That may shift the focus to the udev rules file, which is
 part of
 the data package.
 
 Oddly enough, I received a report by mail from someone at AltLinux. He
 encountered a boot-n-switch problem as well. His analysis is quite
 interesting (quoted):
 
 The reason for that is that the kernel emits only 'change' events for
 the devices it finds already plugged-in when 'udevadm trigger' is called
 on the udev service start. However, only 'add' events are processed by
 the modeswitch udev rule script.
 
 The udev version involved was 172 which is fairly new.
 
 The fix should be easy - let the rules be evaluated not only for an
 add event but also for a change event.
 
 To put it in a nutshell: in /lib/udev/rules.d/40-usb_modeswitch.rules
 change this line
 
 ACTION!=add, GOTO=modeswitch_rules_end
 
 to this:
 
 ACTION!=add|change, GOTO=modeswitch_rules_end

This explanation sounded so plausible and convincing, imagine my
disappointment when it didn't work -- the device is still not switched.

I did not yet have time to run the full battery of tests (eg [0]), but
will do so as soon as I can. I put ~50 reboots in tonight before I
realized my dumb mistake mentioned in the other mail...

I should have more info tomorrow; Friday latest.

Thanks for your patience and perseverance...
Christian


[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629371#96



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-15 Thread Josua Dietze

Am 13.08.2011 10:03, schrieb Josua Dietze:

The main issue was that udev did not run usb_modeswitch _at all_ during boot on
the router. That may shift the focus to the udev rules file, which is part of
the data package.


Oddly enough, I received a report by mail from someone at AltLinux. He 
encountered a boot-n-switch problem as well. His analysis is quite interesting 
(quoted):


The reason for that is that the kernel emits only 'change' events for
the devices it finds already plugged-in when 'udevadm trigger' is called
on the udev service start. However, only 'add' events are processed by
the modeswitch udev rule script.

The udev version involved was 172 which is fairly new.

The fix should be easy - let the rules be evaluated not only for an add event 
but also for a change event.


To put it in a nutshell: in /lib/udev/rules.d/40-usb_modeswitch.rules change 
this line


ACTION!=add, GOTO=modeswitch_rules_end

to this:

ACTION!=add|change, GOTO=modeswitch_rules_end

Let's see if there will be any change (ahaha).

Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-13 Thread Josua Dietze

Am 11.08.2011 00:34, schrieb Christian Kastner:

Strange thing: on my netbook the problem hasn't changed, but on my
desktop PC switching occurs with versions 1.1.4 to 1.1.9 (as confirmed
by lsusb and dmesg output), but the /dev/gsmmodem symlink does not get
set up in versions 1.1.7 and above.


So what you are saying that the main problem (no mode switch at boot) is now 
limited to your router, right?


Regarding the symlink, the logic has changed somewhat in 1.1.7; to avoid 
treating unrelated devices, a list of known USB IDs is checked before acting. 
This list is appended if you switch your device for the first time by plugging 
in. You will get the symlink from every following mode switch, but not on that 
first encounter.
So, to test this feature during a boot process, you would in advance have to 1. 
install, 2. plug in, 3. reboot (with or without a previous re-plug cycle).


The list of known devices is being deleted when uninstalling, so you have the 
same situation after each version testing. See /var/lib/usb_modeswitch/link_list 
if you want to check it out.


Resuming the earlier exchange, the error that you saw in the udev debug log 
should be gone with version 1.1.9 ('arithmetic expression: expecting EOF: 
0x'). Also, the shell script is not likely to be the culprit when it is not 
even being called during boot.


The main issue was that udev did not run usb_modeswitch _at all_ during boot on 
the router. That may shift the focus to the udev rules file, which is part of 
the data package.


Can you tell us which usb-modeswitch-data version is currently installed on your 
gateway router?

And did you install a new data package on your desktop machine at some point?

Regards,
Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-10 Thread Christian Kastner
Hey again,

On 06/18/2011 06:04 PM, Josua Dietze wrote:
 Am 18.06.2011 16:11, schrieb Christian Kastner:
 I have attached a file with the following contents:
1. output of lsusb when plugged in at boot, then removed, then plugged
   back in, and `diff -U 0`
  a) from boot to removed
 
 That output is enough to confirm that there was no switching during bootup.

I've now run some tests again with 1.1.4, 1.1.7, 1.1.8 and 1.1.9.

Strange thing: on my netbook the problem hasn't changed, but on my
desktop PC switching occurs with versions 1.1.4 to 1.1.9 (as confirmed
by lsusb and dmesg output), but the /dev/gsmmodem symlink does not get
set up in versions 1.1.7 and above.

The only things different from when I conducted the tests with the above
quoted results are minimal: eg, no network connection. I cannot possibly
see how these could affect the process.

I ran out of time today, but I need to start again from scratch anyway:
it's been too long since my initial report. I hope I can provide more
information on Sunday.

Sorry I don't have better news...

Christian






-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-09 Thread Didier Raboud
tags 629371 +moreinfo
thanks

Le jeudi, 23 juin 2011 10.41:15, Josua Dietze a écrit :
 Am 22.06.2011 09:56, schrieb Josua Dietze:
  If you want you can check for the other variables too; just before the
  case line, the values for v_id and p_id should be set.
  
  echo ums variables: v_id $v_id, p_id $p_id 2
 
 I have to correct myself here; the variables mentioned are *not* relevant
 for the mode switching; they are used afterwards only, for the
 post-handling of the switched device.

Christian: ping ?

By the way, I just uploaded new upstream releases for usb-modeswitch{,-data} 
to unstable, you might want to try them.

Cheers,

-- 
OdyX



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-08-09 Thread Christian Kastner
On 08/09/2011 03:50 PM, Didier Raboud wrote:
 Christian: ping ?
 
 By the way, I just uploaded new upstream releases for usb-modeswitch{,-data} 
 to unstable, you might want to try them.

Sorry about the delay -- moved to a new apartment, and underestimated
the effort...

I'll run a full battery of tests tomorrow afternoon.

Regards,
Christian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-23 Thread Josua Dietze

Am 22.06.2011 09:56, schrieb Josua Dietze:

If you want you can check for the other variables too; just before the case
line, the values for v_id and p_id should be set.

echo ums variables: v_id $v_id, p_id $p_id 2


I have to correct myself here; the variables mentioned are *not* relevant for 
the mode switching; they are used afterwards only, for the post-handling of the 
switched device.


We need to look only at the bottom part of the script (upstream version):

--x--x--
(
count=120
while [ $count != 0 ]; do
if [ ! -e /usr/bin/tclsh ]; then
sleep 1
count=$(($count - 1))
else
exec /usr/bin/tclsh /usr/sbin/usb_modeswitch_dispatcher $@ 2/dev/null 

exit 0
fi
done
) 
--x--x--

Here you could watch the value of $count, plus you could remove the error 
redirection of the dispatcher call to get a possible error report. Updated script:


--x--x--
(
count=120
while [ $count != 0 ]; do
echo ums: wait counter is $count 2
if [ ! -e /usr/bin/tclsh ]; then
sleep 1
count=$(($count - 1))
else
exec /usr/bin/tclsh /usr/sbin/usb_modeswitch_dispatcher $@ 
exit 0
fi
done
) 
--x--x--

Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-22 Thread Didier Raboud
Hi,

Le mercredi, 22 juin 2011 00.26:35, Christian Kastner a écrit :
 Sorry for the delayed reply.

You are kidding, right ? Your delays are optimal !

 FYI, the logs also contained the following linces (twice):
 '/lib/udev/usb_modeswitch' (stderr) '/lib/udev/usb_modeswitch: 33: '
 '/lib/udev/usb_modeswitch' (stderr) 'arithmetic expression: expecting
 EOF: 0x'
 '/lib/udev/usb_modeswitch' (stderr) ''

This is very probably what we call a bashism. Debian's /bin/sh now points to 
/bin/dash.

What happens if you substitute /lib/udev/usb_modeswitch 's shebang by 
#!/bin/bash ?

Cheers,
-- 
OdyX



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-22 Thread Josua Dietze

Am 22.06.2011 10:24, schrieb Didier Raboud:

FYI, the logs also contained the following linces (twice):
'/lib/udev/usb_modeswitch' (stderr) '/lib/udev/usb_modeswitch: 33:'
'/lib/udev/usb_modeswitch' (stderr) 'arithmetic expression: expecting
EOF: 0x'
'/lib/udev/usb_modeswitch' (stderr) ''


This is very probably what we call a bashism. Debian's /bin/sh now points to
/bin/dash.


I have checked the script for bashisms. The problem may rather be a missing 
parameter from the script call.


I recommend to add an echo line to put out the parameter list via error 
channel so that it may appear in the udev log. Right before the line p_id=$4:


echo ums params: $@ 2

If you want you can check for the other variables too; just before the 
case line, the values for v_id and p_id should be set.


echo ums variables: v_id $v_id, p_id $p_id 2

No way to check these commands right now, there may be errors.

Regards,
Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-21 Thread Christian Kastner
Hi,

Sorry for the delayed reply.

On 06/20/2011 05:28 PM, Josua Dietze wrote:
 Two things to do (staying at version 1.1.8):
 
 1. Edit /usr/sbin/usb_modeswitch_dispatcher,
 2. Edit (create if not present) /etc/udev/udev.conf,
 
 Now activate usb_modeswitch logging in /etc/usb_modeswitch.conf and do
 the boot test once more.
 You should get a lot of udev: and ums: entries in /var/log/syslog.
 Check the whole boot process and search for occurrences of
 usb_modeswitch and ums. At least there should be indications that
 the little starter script usb_modeswitch is actually started.
 
 Examples:
 udevd-work[548]: RUN 'usb_modeswitch '%b/%k'
 udevd-work[548]: 'usb_modeswitch '/1-3:1.0'' started

OK, this narrowed it down. It appears that usb_modeswitch is *not* being
called (and by extension, neither is u_m_d)

When plugged in at boot, the device itself is recognized: udev spits out
a lot of messages regarding HUAWEI SD Storage, Mass Storage CD-ROM and
so on.

Removing the device and plugging it back in, everything runs fine (as
expected). The final line udev logs is:

New USB device found, idVendor=12d1, idProduct=1001

Does that help in any way?


FYI, the logs also contained the following linces (twice):
'/lib/udev/usb_modeswitch' (stderr) '/lib/udev/usb_modeswitch: 33: '
'/lib/udev/usb_modeswitch' (stderr) 'arithmetic expression: expecting
EOF: 0x'
'/lib/udev/usb_modeswitch' (stderr) ''


Christian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-20 Thread Didier Raboud
Le lundi, 20 juin 2011 00.16:49, Christian Kastner a écrit :
 On 06/18/2011 11:24 PM, Josua Dietze wrote:
  I'm just now working on the next version, 1.1.8, which tries to use a
  fallback in case of said quirks instead of bailing out.
  
  Do you want to try it in the place of usb_modeswitch.c in the source
  folder? Just make and replace /usr/sbin/usb_modeswitch.
 
 I can report partial success here! With package version 1.1.4-2
 installed and usb_modeswitch.c from 1.1.8, I get:
 
 $ lsusb | grep Huawei
 Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB
 Modem
 
 However, with package version 1.1.7-1 installed, replacing
 usb_modeswitch did not help.

Hi Christian,

I just released usb-modeswitch 1.1.8-1 and usb-modeswitch-data 20110619-1 to
Debian unstable. For your convenience, I just prepared immediate backports so
that you can test if this is really fixed:

http://alioth.debian.org/~odyx-guest/debian/squeeze-backports/usb-modeswitch-data_20110619-1~bpo60~test629371+0_all.deb
http://alioth.debian.org/~odyx-guest/debian/squeeze-backports/usb-modeswitch_1.1.8-1~bpo60~test629371+0_amd64.deb

What happens when you test with those packages installed ?

Cheers,
-- 
OdyX


signature.asc
Description: This is a digitally signed message part.


Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-20 Thread Christian Kastner
On 06/20/2011 10:57 AM, Didier Raboud wrote:
 Le lundi, 20 juin 2011 00.16:49, Christian Kastner a écrit :
 On 06/18/2011 11:24 PM, Josua Dietze wrote:
 I'm just now working on the next version, 1.1.8, which tries to use a
 fallback in case of said quirks instead of bailing out.

 Do you want to try it in the place of usb_modeswitch.c in the source
 folder? Just make and replace /usr/sbin/usb_modeswitch.

 I can report partial success here! With package version 1.1.4-2
 installed and usb_modeswitch.c from 1.1.8, I get:

 $ lsusb | grep Huawei
 Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB
 Modem

 However, with package version 1.1.7-1 installed, replacing
 usb_modeswitch did not help.
 
 Hi Christian,
 
 I just released usb-modeswitch 1.1.8-1 and usb-modeswitch-data 20110619-1 to
 Debian unstable. For your convenience, I just prepared immediate backports so
 that you can test if this is really fixed:
 
 http://alioth.debian.org/~odyx-guest/debian/squeeze-backports/usb-modeswitch-data_20110619-1~bpo60~test629371+0_all.deb
 http://alioth.debian.org/~odyx-guest/debian/squeeze-backports/usb-modeswitch_1.1.8-1~bpo60~test629371+0_amd64.deb
 
 What happens when you test with those packages installed ?

No luck, sorry...

$ apt-cache policy usb-modeswitch{,-data} | grep Installed
  Installed: 1.1.8-1~bpo60~test629371+0
  Installed: 20110619-1~bpo60~test629371+0

$ lsusb | grep Huawei
Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552
(HSPA modem)

To summarize so far:
  * 1.1.4 worked
  * 1.1.4 with udev from 1.1.7 worked
  * 1.1.4 with udev,dispatcher from 1.1.7 worked
  * 1.1.4 with modeswitch.c from 1.1.8 worked
  * 1.1.7 works, but only _after_ system is booted

To me, the strangest part is the last point: when the computer is up and
running, the stick is properly switched when I plug it in. It is only
during boot that it fails, and only in 1.1.7 and above. My first guess
would have been udev, but we tested that. It can't be the database move
to /usr/share either, /usr is not a separate filesystem.


Christian



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-20 Thread Didier Raboud
reopen 629371
found 629371 1.1.8-1
retitle 629371 usb-modeswitch: Huawei E1750 not switched at boot-time
thanks 

Le lundi, 20 juin 2011 16.03:38, Christian Kastner a écrit :
  What happens when you test with those packages installed ?
 
 No luck, sorry...

Hence re-opening this bug.

 To summarize so far:
 (…)

Thanks for your detailed investigation !

Cheers,

-- 
OdyX


signature.asc
Description: This is a digitally signed message part.


Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-20 Thread Josua Dietze

Am 20.06.2011 15:03, schrieb Christian Kastner:


No luck, sorry...


O.K., time to remove the velvet gloves and get really nasty.

Two things to do (staying at version 1.1.8):

1. Edit /usr/sbin/usb_modeswitch_dispatcher,
   insert these lines in the {Log} procedure before line 616:

--- snip ---
foreach line [split $msg \n] {
catch {exec /bin/logger -p syslog.warning ums: $line}
}
--- snip ---

2. Edit (create if not present) /etc/udev/udev.conf,
   insert/change the following line:

udev_log=debug


Now activate usb_modeswitch logging in /etc/usb_modeswitch.conf and do the boot 
test once more.

You should get a lot of udev: and ums: entries in /var/log/syslog.
Check the whole boot process and search for occurrences of usb_modeswitch and 
ums. At least there should be indications that the little starter script 
usb_modeswitch is actually started.


Examples:
udevd-work[548]: RUN 'usb_modeswitch '%b/%k'
udevd-work[548]: 'usb_modeswitch '/1-3:1.0'' started

Maybe you can spot a problem in the entries following that.

Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-19 Thread Josua Dietze

Am 18.06.2011 22:24, schrieb Josua Dietze:

I'm just now working on the next version, 1.1.8, which tries to use a fallback
in case of said quirks instead of bailing out.


Now I have prepared a full test package of 1.1.8. I will release tonight if no 
quirks are reported.


Get it here:

http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-1.1.8-test.tar.bz2
http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20110619-test.tar.bz2



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-19 Thread Christian Kastner
On 06/18/2011 11:24 PM, Josua Dietze wrote:
 I'm just now working on the next version, 1.1.8, which tries to use a
 fallback in case of said quirks instead of bailing out.
 
 Do you want to try it in the place of usb_modeswitch.c in the source
 folder? Just make and replace /usr/sbin/usb_modeswitch.

I can report partial success here! With package version 1.1.4-2
installed and usb_modeswitch.c from 1.1.8, I get:

$ lsusb | grep Huawei
Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB
Modem

However, with package version 1.1.7-1 installed, replacing
usb_modeswitch did not help.

HTH,
Christian




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: Fwd: Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Christian Kastner
(I must have accidentally dropped the bug# from CC, so forwarding)

On 06/15/2011 10:28 PM, Josua Dietze wrote:
 Are you sure the switching itself is not happening? Did you check the
 device ID after booting with the stick?

I have attached a file with the following contents:
  1. output of lsusb when plugged in at boot, then removed, then plugged
 back in, and `diff -U 0`
a) from boot to removed
b) from removed to plugged back in
c) from boot to plugged back in

  2. like 1., but output of usb-devices

  3. dmesg output for the device
a) when plugged in at boot
b) when plugged in running system

Doesn't look like it's being switched, but from 1.c it would appear as
if the device first gets misrecognized: as a E1552 (HSPA modem) at
boot and E620 USB Modem after.

From my recollection, E620 was also what 1.1.4 (the version without the
booting issues) identified.

HTH,
Christian





1.a
===
--- boot/lsusb  2011-06-18 01:54:35.924408324 +0200
+++ out/lsusb   2011-06-18 01:58:17.828905923 +0200
@@ -10 +9,0 @@
-Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA 
modem)

1.b
===
--- out/lsusb   2011-06-18 01:58:17.828905923 +0200
+++ up/lsusb2011-06-18 01:58:43.488407115 +0200
@@ -9,0 +10 @@
+Bus 001 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem

1.c
===
--- boot/lsusb  2011-06-18 01:54:35.924408324 +0200
+++ up/lsusb2011-06-18 01:58:43.488407115 +0200
@@ -10 +10 @@
-Bus 001 Device 003: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552 (HSPA 
modem)
+Bus 001 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB Modem



2.a
===
--- boot/usb-devices2011-06-18 01:54:50.208907421 +0200
+++ out/usb-devices 2011-06-18 01:58:18.156906755 +0200
@@ -20,9 +19,0 @@
-T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
-D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
-P:  Vendor=12d1 ProdID=1446 Rev=00.00
-S:  Manufacturer=HUAWEI Technology
-S:  Product=HUAWEI Mobile
-C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
-I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
-I:  If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
-

2.b
===
--- out/usb-devices 2011-06-18 01:58:18.156906755 +0200
+++ up/usb-devices  2011-06-18 01:58:43.884407772 +0200
@@ -19,0 +20,12 @@
+T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=12d1 ProdID=1001 Rev=00.00
+S:  Manufacturer=HUAWEI Technology
+S:  Product=HUAWEI Mobile
+C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+

2.c
===
--- boot/usb-devices2011-06-18 01:54:50.208907421 +0200
+++ up/usb-devices  2011-06-18 01:58:43.884407772 +0200
@@ -20 +20 @@
-T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
+T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  5 Spd=480 MxCh= 0
@@ -22 +22 @@
-P:  Vendor=12d1 ProdID=1446 Rev=00.00
+P:  Vendor=12d1 ProdID=1001 Rev=00.00
@@ -25,3 +25,6 @@
-C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA
-I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
-I:  If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage



3.a
===
[6.466312] usb 1-2: New USB device found, idVendor=12d1, idProduct=1446
[6.466314] usb 1-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[6.466316] usb 1-2: Product: HUAWEI Mobile
[6.466317] usb 1-2: Manufacturer: HUAWEI Technology
[6.466380] usb 1-2: configuration #1 chosen from 1 choice
[   11.464551] usb-storage: device scan complete
[   11.465048] scsi 8:0:0:0: CD-ROMHUAWEI   Mass Storage 2.31 
PQ: 0 ANSI: 2
[   11.468668] usb-storage: device scan complete
[   11.469547] scsi 9:0:0:0: Direct-Access HUAWEI   SD Storage   2.31 
PQ: 0 ANSI: 2
[   11.470158] sr1: scsi-1 drive
[   11.470431] sr 8:0:0:0: Attached scsi CD-ROM sr1
[   11.470488] sr 8:0:0:0: Attached scsi generic sg8 type 5
[   11.470850] sd 9:0:0:0: Attached scsi generic sg9 type 0
[   11.473795] sd 9:0:0:0: [sdh] Attached SCSI removable disk

3.b
===
[  283.916011] usb 1-2: new high speed USB device using ehci_hcd and address 4
[  284.050360] usb 1-2: New USB device found, idVendor=12d1, 

Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Josua Dietze

Am 18.06.2011 16:11, schrieb Christian Kastner:

I have attached a file with the following contents:
   1. output of lsusb when plugged in at boot, then removed, then plugged
  back in, and `diff -U 0`
 a) from boot to removed


That output is enough to confirm that there was no switching during bootup.

To circle in further, can you install version 1.1.4 and just swap the 
little shell script usb_modeswitch in /lib/udev with the updated file 
from upstream 1.1.7 ?


(Rename usb_modeswitch to usb_modeswitch.orig or whatever, then copy 
usb_modeswitch.sh from the source folder to /lib/udev/usb_modeswitch)


To see if there was any switching, running lsusb is sufficient. If you 
see 12d1:1446 instead of 12d1:1001, switching did not happen.


Josh



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Christian Kastner
On 06/18/2011 06:04 PM, Josua Dietze wrote:
 Am 18.06.2011 16:11, schrieb Christian Kastner:
 I have attached a file with the following contents:
1. output of lsusb when plugged in at boot, then removed, then plugged
   back in, and `diff -U 0`
  a) from boot to removed
 
 That output is enough to confirm that there was no switching during bootup.
 
 To circle in further, can you install version 1.1.4 and just swap the
 little shell script usb_modeswitch in /lib/udev with the updated file
 from upstream 1.1.7 ?

 To see if there was any switching, running lsusb is sufficient. If you
 see 12d1:1446 instead of 12d1:1001, switching did not happen.

With the above configuration, it's switched correctly:

# apt-cache policy usb-modeswitch | head -n 3
usb-modeswitch:
  Installed: 1.1.4-2
  Candidate: 1.1.7-1~bpo60+1

# head -n 2 /lib/udev/usb_modeswitch
#!/bin/sh
# part of usb_modeswitch 1.1.7

# lsusb | grep Huawei
Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB
Modem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Josua Dietze

Am 18.06.2011 19:09, schrieb Christian Kastner:

On 06/18/2011 06:04 PM, Josua Dietze wrote:


To circle in further, can you install version 1.1.4 and just swap the
little shell script usb_modeswitch in /lib/udev with the updated file
from upstream 1.1.7 ?


With the above configuration, it's switched correctly:


Interesting - now, can you do the same procedure with the file
/usr/sbin/usb_modeswitch_dispatcher? The respective source file is 
usb_modeswitch.tcl which is renamed during a normal installation.


Thanks for your precise reports, BTW!



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Christian Kastner
On 06/18/2011 10:16 PM, Josua Dietze wrote:
 Am 18.06.2011 19:09, schrieb Christian Kastner:
 On 06/18/2011 06:04 PM, Josua Dietze wrote:

 To circle in further, can you install version 1.1.4 and just swap the
 little shell script usb_modeswitch in /lib/udev with the updated file
 from upstream 1.1.7 ?

 With the above configuration, it's switched correctly:
 
 Interesting - now, can you do the same procedure with the file
 /usr/sbin/usb_modeswitch_dispatcher? The respective source file is
 usb_modeswitch.tcl which is renamed during a normal installation.

With 1.1.4 and udev, dispatcher from 1.1.7, it still appears to be
switching properly at boot:

$ lsusb | grep Huawei
Bus 001 Device 004: ID 12d1:1001 Huawei Technologies Co., Ltd. E620 USB
Modem



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-18 Thread Josua Dietze

Am 18.06.2011 22:11, schrieb Christian Kastner:

With 1.1.4 and udev, dispatcher from 1.1.7, it still appears to be
switching properly at boot:


So it's most likely a problem with the binary C program.

There has been a change regarding determining the current device configuration 
since 1.1.6. We had few reports that some modems did not respond properly to the 
request about the configuration. Maybe that is a problem affecting your device 
during the boot process.


I'm just now working on the next version, 1.1.8, which tries to use a fallback 
in case of said quirks instead of bailing out.


Do you want to try it in the place of usb_modeswitch.c in the source folder? 
Just make and replace /usr/sbin/usb_modeswitch.


Here's the link:
http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.c.gz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-15 Thread Josua Dietze

Am 07.06.2011 01:45, schrieb Christian Kastner:


I rebuilt the package with (eventually) all patches dropped,
unfortunately to no avail: /dev/ttyUSB[0-2] and /dev/gsmmodem are still
not present at boot, and there is no log file in /var/log/ with
EnableLogging=1.


The main inconvenience is the problem that it's hard to get any log if you plug 
before booting. The file system is mounted read-only first, so switching may 
succeed but there is no logging at all.


Are you sure the switching itself is not happening? Did you check the device ID 
after booting with the stick?


Josua Dietze



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-06 Thread Josua Dietze

Am 06.06.2011 00:59, schrieb Christian Kastner:

usb-modeswitch no longer detects devices when the device is already plugged in
at boot time. When the device is plugged later, into an already running system,
everything works as expected. With version 1.1.4 from Squeeze, everything works
fine in both cases.


Can you test with the upstream source package of 1.1.7? There was a similar 
report before where we circled in on the Debian patches, but the reporter was 
not able to follow through.



The device in question is a Huawei E1750. It is quasi-permanently plugged into
my gateway router as a fallback in case my main ISP connection goes down, but I
can reproduce this issue with my desktop machine too.


There might be an additional quirk. The latest data packages are using a 
different switching command for Huawei devices, by request from Huawei 
engineers. It turned out that some modems are getting a different target ID with 
that command which may not be included with the respective config file.


I suspect that may be the reason why you don't get the gsmmodem link.

Josua Dietze



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-06 Thread Christian Kastner
On 06/06/2011 08:36 AM, Josua Dietze wrote:
 Am 06.06.2011 00:59, schrieb Christian Kastner:
 usb-modeswitch no longer detects devices when the device is already
 plugged in
 at boot time. When the device is plugged later, into an already
 running system,
 everything works as expected. With version 1.1.4 from Squeeze,
 everything works
 fine in both cases.
 
 Can you test with the upstream source package of 1.1.7? There was a
 similar report before where we circled in on the Debian patches, but the
 reporter was not able to follow through.

I'll try to do this tonight.

 The device in question is a Huawei E1750. It is quasi-permanently
 plugged into
 my gateway router as a fallback in case my main ISP connection goes
 down, but I
 can reproduce this issue with my desktop machine too.
 
 There might be an additional quirk. The latest data packages are using a
 different switching command for Huawei devices, by request from Huawei
 engineers. It turned out that some modems are getting a different target
 ID with that command which may not be included with the respective
 config file.
 
 I suspect that may be the reason why you don't get the gsmmodem link.

Ow, my bad -- the /dev/gsmmodem link *is* created. The output I reported
for 1.1.7 was probably just copy-pasta, please ignore that part and
sorry about that.

Christian



signature.asc
Description: OpenPGP digital signature


Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-06 Thread Christian Kastner
On 06/06/2011 08:36 AM, Josua Dietze wrote:
 Am 06.06.2011 00:59, schrieb Christian Kastner:
 usb-modeswitch no longer detects devices when the device is already
 plugged in
 at boot time. When the device is plugged later, into an already
 running system,
 everything works as expected. With version 1.1.4 from Squeeze,
 everything works
 fine in both cases.
 
 Can you test with the upstream source package of 1.1.7? There was a
 similar report before where we circled in on the Debian patches, but the
 reporter was not able to follow through.

I rebuilt the package with (eventually) all patches dropped,
unfortunately to no avail: /dev/ttyUSB[0-2] and /dev/gsmmodem are still
not present at boot, and there is no log file in /var/log/ with
EnableLogging=1.






signature.asc
Description: OpenPGP digital signature


Bug#629371: usb-modeswitch: Devices no longer detected when plugged in at boot-time

2011-06-05 Thread Christian Kastner
Package: usb-modeswitch
Version: 1.1.7-1~bpo60+1
Severity: normal

usb-modeswitch no longer detects devices when the device is already plugged in
at boot time. When the device is plugged later, into an already running system,
everything works as expected. With version 1.1.4 from Squeeze, everything works
fine in both cases.

The device in question is a Huawei E1750. It is quasi-permanently plugged into
my gateway router as a fallback in case my main ISP connection goes down, but I
can reproduce this issue with my desktop machine too.

I've listed the devices as the (may) appear 1) when plugged in at reboot and
2) when plugged in later. With version 1.1.7, setting EnableLogging=1 results
in log files being written _only_ in case 2) -- could it be that usb-modeswitch
never gets called? I haven't checked this with version 1.1.4, as everything
works fine there.

Regards,
Christian


(Since the backport was produced by the Maintainer, I assume he's OK with a bug
report for it)


1.1.4-2, both when plugged in at a boot, and plugged in later
===

$ ls -l /dev/gsmmodem
lrwxrwxrwx 1 root root 7 Jun  6 00:35 /dev/gsmmodem - ttyUSB0

$ ls -l /dev/ttyUSB*
crw-rw 1 root dialout 188, 0 Jun  6 00:35 /dev/ttyUSB0
crw-rw 1 root dialout 188, 1 Jun  6 00:35 /dev/ttyUSB1
crw-rw 1 root dialout 188, 2 Jun  6 00:35 /dev/ttyUSB2

1.1.7-1~bpo60+1, when plugged in at boot
===

$ ls -l /dev/gsmmodem
ls: cannot access /dev/gsmmodem: No such file or directory

$ ls -l /dev/ttyUSB*
ls: cannot access /dev/ttyUSB*: No such file or directory

1.1.7-1~bpo60+1, when plugged in later
===

$ ls -l /dev/gsmmodem
ls: cannot access /dev/gsmmodem: No such file or directory

$ ls -l /dev/ttyUSB*
crw-rw 1 root dialout 188, 0 Jun  6 00:41 /dev/ttyUSB0
crw-rw 1 root dialout 188, 1 Jun  6 00:41 /dev/ttyUSB1
crw-rw 1 root dialout 188, 2 Jun  6 00:41 /dev/ttyUSB2


-- System Information:
Debian Release: 6.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages usb-modeswitch depends on:
ii  dpkg  1.15.8.10  Debian package management system
ii  libc6 2.11.2-10  Embedded GNU C Library: Shared lib
ii  libusb-0.1-4  2:0.1.12-16userspace USB programming library
ii  tcl   8.4.16-2   The Tool Command Language (default
ii  tcl8.4 [tclsh]8.4.19-4   Tcl (the Tool Command Language) v8
ii  tcl8.5 [tclsh]8.5.8-2Tcl (the Tool Command Language) v8
ii  usb-modeswitch-data   20110227-2~bpo60+1 mode switching data for usb-modesw

usb-modeswitch recommends no packages.

Versions of packages usb-modeswitch suggests:
pn  comgt none (no description available)
ii  wvdial1.60.4 PPP dialer with built-in intellige

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org