Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-08-07 Thread Didier 'OdyX' Raboud
Control: tags -1 +patch +pending

Hi Jakub,

Le lundi, 4 août 2014, 20.11:33 Jakub Wilk a écrit :
 * Didier 'OdyX' Raboud o...@debian.org, 2014-08-03, 01:21:
 * The udev rule seems to be working
 
 As I noted previously, it didn't work here, unless I renamed the rule
 file. But now I checked again, and it works without renaming. Very
 odd. Possibly related bug: #754348
 
 Jakub: could you (out of luck) try the attached patch that reverts
 this?
 
 I don't think this will be necessary; see below.
 
 More importantly, jimctl doesn't seem to honour TMPDIR. :-(
 
 Thanks for the catch, I've reported this upstream:
 https://github.com/msteveb/jimtcl/issues/17
 
 So I cherry picked the upstream patch for jimtcl, and patched
 /lib/udev/usb_modeswitch to use TMPDIR. Now the device switches
 correctly. \o/

Yay. So we're on the good track here. I've cherry-picked the upstream 
patch on top of the new upstream release [0] and it's now pending in 
binary-NEW [1]. I might upload 0.74-2 with that patch in the meantime.

As for usb-modeswitch, I'm considering the attached patch to use /run as 
TMPDIR for all three init systems. Expect an upload soon'ish.

Cheers,
OdyX

[0] 
http://anonscm.debian.org/cgit/collab-maint/jimtcl.git/commit/?id=ec11aff0a36e7d2d847d88c7a1eecbedb2bb2cde
[1] https://ftp-master.debian.org/new/jimtcl_0.75-1.html

--- a/usb-modeswitch-upstart.conf
+++ b/usb-modeswitch-upstart.conf
@@ -1,5 +1,6 @@
 start on usb-modeswitch-upstart
 task
+env TMPDIR=/run
 script
 	exec /usr/sbin/usb_modeswitch_dispatcher --switch-upstart $UMS_PARAM
 end script
--- a/usb_modeswitch.sh
+++ b/usb_modeswitch.sh
@@ -82,6 +82,7 @@
 		elif [ -d /run/systemd/system/ ]; then # Test if systemd is running
 			exec /bin/systemctl --no-block start usb_modeswitch@$1.service
 		else
+			export TMPDIR=/run
 			exec /usr/sbin/usb_modeswitch_dispatcher --switch-mode $1 
 		fi
 		exit 0
--- a/usb_modeswitch@.service
+++ b/usb_modeswitch@.service
@@ -4,3 +4,4 @@
 [Service]
 Type=oneshot
 ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-systemd %I
+Environment=TMPDIR=/run


Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-08-04 Thread Jakub Wilk

* Didier 'OdyX' Raboud o...@debian.org, 2014-08-03, 01:21:

* The udev rule seems to be working


As I noted previously, it didn't work here, unless I renamed the rule 
file. But now I checked again, and it works without renaming. Very odd. 
Possibly related bug: #754348


Jakub: could you (out of luck) try the attached patch that reverts 
this?


I don't think this will be necessary; see below.


More importantly, jimctl doesn't seem to honour TMPDIR. :-(

Thanks for the catch, I've reported this upstream:
https://github.com/msteveb/jimtcl/issues/17


So I cherry picked the upstream patch for jimtcl, and patched 
/lib/udev/usb_modeswitch to use TMPDIR. Now the device switches 
correctly. \o/


--
Jakub Wilk
--- usb_modeswitch.sh	2014-08-02 21:46:14.0 +0200
+++ /lib/udev/usb_modeswitch	2014-08-03 19:02:34.80400 +0200
@@ -75,6 +75,7 @@
 esac
 exec 1- 2- 5- 7-
 (
+		export TMPDIR=/run
 		. /lib/udev/hotplug.functions
 		wait_for_file /usr/sbin/usb_modeswitch_dispatcher
 		if [ -x /sbin/initctl ]  /sbin/initctl version 2/dev/null | /bin/grep -q upstart; then # Test if upstart is running


Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-08-02 Thread Didier 'OdyX' Raboud
Hi Jakub,

Le jeudi, 19 juin 2014 00.56:43, vous avez écrit :
 * Jakub Wilk jw...@debian.org, 2014-06-18, 10:28:
 apparently /lib/udev/usb_modeswitch doesn't get run at all.
 
 Renaming the rules file as 99-usb_modeswitch.rules helped a bit (don't
 know why it makes a difference): now /lib/udev/usb_modeswitch is
 executed, but the switch still doesn't happen. I managed to collect
 strace output (attached). The interesting part appears to be:
 
 599   open(/tmp/tcl.tmp.mDGyFD, O_RDWR|O_CREAT|O_EXCL, 0600) = -1
 EROFS (Read-only file system)

Would the following patch help you there?

--- a/lib/systemd/system/usb_modeswitch@.service
+++ b/lib/systemd/system/usb_modeswitch@.service
@@ -4,3 +4,5 @@ Description=USB_ModeSwitch
 [Service]
 Type=oneshot
 ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-systemd %I
+RuntimeDirectory=usb-modeswitch
+Environment=TMPDIR=/run/usb-modeswitch

OdyX


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-08-02 Thread Jakub Wilk

* Didier 'OdyX' Raboud o...@debian.org, 2014-08-02, 19:25:
599   open(/tmp/tcl.tmp.mDGyFD, O_RDWR|O_CREAT|O_EXCL, 0600) = -1 
EROFS (Read-only file system)


Would the following patch help you there?

--- a/lib/systemd/system/usb_modeswitch@.service
+++ b/lib/systemd/system/usb_modeswitch@.service
@@ -4,3 +4,5 @@ Description=USB_ModeSwitch
[Service]
Type=oneshot
ExecStart=/usr/sbin/usb_modeswitch_dispatcher --switch-systemd %I
+RuntimeDirectory=usb-modeswitch
+Environment=TMPDIR=/run/usb-modeswitch


I use sysvinit, so no, it wouldn't. :-P

More importantly, jimctl doesn't seem to honour TMPDIR. :-(

--
Jakub Wilk


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-08-02 Thread Didier 'OdyX' Raboud
Hi Jakub, hi all,

Le samedi, 2 août 2014, 22.02:14 Jakub Wilk a écrit :
 * Didier 'OdyX' Raboud o...@debian.org, 2014-08-02, 19:25:
 Would the following patch help you there?
 
 (…)
 I use sysvinit, so no, it wouldn't. :-P

Pff. I'm really at loss here, especially given that I can't reproduce
the problem. Here's my current line of thought:

* The udev rule seems to be working: I've successfully used the generic
one for the dongle type I own (05c6:1000) and it worked, both at plug-
time and at at boot time (under systemd only though).

* Apparently, if the udev rule triggers, the two tools are correctly
called in that order:
  - /lib/udev/usb_modeswitch (shell)
  - one of:
· /sbin/initctl emit --no-wait usb-modeswitch-upstart UMS_PARAM=$1
· /bin/systemctl --no-block start usb_modeswitch@$1.service
· /usr/sbin/usb_modeswitch_dispatcher --switch-mode $1 

* The latter can fail it /tmp is not available and as it doesn't respect
TMPDIR, cannot be taught the right way (see below).

* There are some things that are specific to the new generic Huawei rule:
 - New android-vs-linux switch in the tcl but I see no indication that it
would fail:

http://sources.debian.net/src/usb-modeswitch/2.2.0%2Brepack0-1/usb_modeswitch.tcl#L201

Jakub: could you (out of luck) try the attached patch that reverts this?

 - The generic rules in usb-modeswitch-data has spaces:
   
http://sources.debian.net/src/usb-modeswitch-data/20140529-1/usb_modeswitch.d/12d1:%23linux
   
http://sources.debian.net/src/usb-modeswitch-data/20140529-1/usb_modeswitch.d/12d1:%23android
   

 More importantly, jimctl doesn't seem to honour TMPDIR. :-(

Thanks for the catch, I've reported this upstream:
https://github.com/msteveb/jimtcl/issues/17

Cheers,

OdyXDescription: Revert upstream change to discriminate android from linux
Author: Didier Raboud o...@debian.org
Origin: vendor
Bug-Debian: http://bugs.debian.org/751271
Last-Update: 2014-08-03
--- a/usb_modeswitch.tcl
+++ b/usb_modeswitch.tcl
@@ -197,15 +197,7 @@
 
 # Check (and switch) for operating system if Huawei device present
 
-set flags(os) linux
-if {$usb(idVendor) == 12d1  [regexp -nocase {android} [exec cat /proc/version]]} {
-	set flags(os) android
-}
-if {$flags(os) == android} {
-	set configList [ConfigGet conflist $usb(idVendor):#android]
-} else {
-	set configList [ConfigGet conflist $usb(idVendor):$usb(idProduct)]
-}
+set configList [ConfigGet conflist $usb(idVendor):$usb(idProduct)]
 
 if {[llength $configList] == 0} {
 	Log Aargh! Config file missing for $usb(idVendor):$usb(idProduct)! Exit


Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-07-11 Thread Willem van den Akker
Sorry, message was not complete.

After downgrading it all worked fine.

On Thu, 2014-07-10 at 23:59 +0200, Josua Dietze wrote:

 Did the problem go away when you downgraded?




Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-07-10 Thread Willem van den Akker

After upgrading to systemd-sysv in testing the Huawei modem (12d1:1465
Huawei Technologies Co., Ltd. K3765 HSPA)
did not activate after insertion.

The stick is recognized, but the stick did not show up in the
network-manager panel.

After contacting the #debian-systemd channel I downgraded 
usb-modeswitch_2.1.1+repack0-1_amd64.deb
usb-modeswitch-data_20140327-1_all.deb





Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-07-10 Thread Josua Dietze

Did the problem go away when you downgraded?


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-23 Thread Matt Li
Scrap that, false alarm from rebooting and so the modem was already 
switched.


Replacing the wrapper script with a simple logging script just like 
Jakub also showed that the wrapper wasn't being run.
Interestingly, downgrading back to 2.1.1+repack0-1 and 20140327-1 
resulted in the same issue so maybe another dependency is at play.


My interim solution is to manually call the wrapper in rc.local as the 
modem will always be in the same USB port:


if [ ! -L /dev/3gmodem ];
then
/lib/udev/usb_modeswitch '/1-1.3.3:1.0' 
sleep 10
fi
pon 3g 


Where `sleep 10` is to give another time for the device to switch, which 
I notice can take up to ~8 seconds and /dev/3gmodem is a symlink set by 
another udev rule I have in /etc/udev/rules.d/99-usb.rules:


SUBSYSTEMS==usb, DRIVERS==option, ATTRS{bInterfaceNumber}==01, 
SYMLINK+=3gmodem



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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-22 Thread mazzanet
Noticing this too after updating to 2.2.0+repack0-1 with a Huawei E398 
on armhf.


I had to manually edit /lib/udev/rules.d/40-usb_modeswitch.rules to 
specific the full path to the wrapper as follows:


--- ATTRS{idVendor}==12d1, ATTR{bInterfaceNumber}==00, 
ATTR{bInterfaceClass}==08, RUN+=usb_modeswitch '%b/%k'
+++ ATTRS{idVendor}==12d1, ATTR{bInterfaceNumber}==00, 
ATTR{bInterfaceClass}==08, RUN+=/lib/udev/usb_modeswitch '%b/%k'



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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-18 Thread Jakub Wilk

* Jakub Wilk jw...@debian.org, 2014-06-11, 18:05:


Package: usb-modeswitch
Version: 2.2.0+repack0-1

After I upgraded usb-modeswitch (2.1.1+repack0-1 = 2.2.0+repack0-1) and
usb-modeswitch-data (20140327-1 = 20140529-1), my Huawei E3131s-2 is 
no longer switched on boot:


$ lsusb | grep -w Huawei
Bus 001 Device 002: ID 12d1:14fe Huawei Technologies Co., Ltd.

I had to physically plug out the device, and then plug it in again to 
make the switching happen:


$ lsusb | grep -w Huawei
Bus 001 Device 005: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 
LTE/UMTS/GSM Modem/Networkcard


More information:

1) I replaced /lib/udev/usb_modeswitch with a wrapper (attached) that 
logs basic information to /run. With the old version a few calls to the 
script are logged (also attached), but with the new version nothing is 
logged. So apparently /lib/udev/usb_modeswitch doesn't get run at all.


2) If I boot with the device unplugged, then the first time I plug it 
(when the machine if fully booted) the switch doesn't happen either.


3) Instead of physically re-plugging the device, this command makes the 
switch happen too:

# udevadm trigger --action=add -subsystem-match=usb

--
Jakub Wilk
#!/bin/sh
log=/run/usb-modeswitch.$(date -Iminutes)
(
flock 1
echo [$(date --rfc-3339=ns)] $0 $@
export
)  $log
exec /lib/udev/usb_modeswitch.distrib $@
[2014-06-17 17:57:04.456307440+02:00] /lib/udev/usb_modeswitch 1-3/1-3
export ACTION='add'
export BUSNUM='001'
export DEVNAME='/dev/bus/usb/001/002'
export DEVNUM='002'
export DEVPATH='/devices/pci:00/:00:02.1/usb1/1-3'
export DEVTYPE='usb_device'
export ID_BUS='usb'
export ID_MODEL='HUAWEI_Mobile'
export ID_MODEL_ENC='HUAWEI\x20Mobile'
export ID_MODEL_ID='14fe'
export ID_REVISION='0102'
export ID_SERIAL='HUAWEI_HUAWEI_Mobile'
export ID_USB_INTERFACES=':080650:'
export ID_VENDOR='HUAWEI'
export ID_VENDOR_ENC='HUAWEI'
export ID_VENDOR_FROM_DATABASE='Huawei Technologies Co., Ltd.'
export ID_VENDOR_ID='12d1'
export MAJOR='189'
export MINOR='1'
export PRODUCT='12d1/14fe/102'
export PWD='/'
export SEQNUM='1196'
export SUBSYSTEM='usb'
export TYPE='0/0/0'
export USEC_INITIALIZED='65196'
[2014-06-17 17:57:10.985138120+02:00] /lib/udev/usb_modeswitch --symlink-name 
/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0 12d1 1506
export ACTION='add'
export DEVNAME='/dev/ttyUSB0'
export 
DEVPATH='/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.0/ttyUSB0/tty/ttyUSB0'
export MAJOR='188'
export MINOR='0'
export PWD='/'
export SEQNUM='1339'
export SUBSYSTEM='tty'
export USEC_INITIALIZED='258267'
[2014-06-17 17:57:10.992601920+02:00] /lib/udev/usb_modeswitch --symlink-name 
/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.2/ttyUSB1/tty/ttyUSB1 12d1 1506
export ACTION='add'
export DEVNAME='/dev/ttyUSB1'
export 
DEVPATH='/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.2/ttyUSB1/tty/ttyUSB1'
export MAJOR='188'
export MINOR='1'
export PWD='/'
export SEQNUM='1341'
export SUBSYSTEM='tty'
export USEC_INITIALIZED='258349'
[2014-06-17 17:57:10.995739560+02:00] /lib/udev/usb_modeswitch --symlink-name 
/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.3/ttyUSB2/tty/ttyUSB2 12d1 1506
export ACTION='add'
export DEVNAME='/dev/ttyUSB2'
export 
DEVPATH='/devices/pci:00/:00:02.1/usb1/1-3/1-3:1.3/ttyUSB2/tty/ttyUSB2'
export MAJOR='188'
export MINOR='2'
export PWD='/'
export SEQNUM='1343'
export SUBSYSTEM='tty'
export USEC_INITIALIZED='258454'


Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-18 Thread Jakub Wilk

* Jakub Wilk jw...@debian.org, 2014-06-18, 10:28:
3) Instead of physically re-plugging the device, this command makes 
the switch happen too:

# udevadm trigger --action=add -subsystem-match=usb


Typo; it should be of course:
# udevadm trigger --action=add --subsystem-match=usb

--
Jakub Wilk


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-18 Thread Jakub Wilk

* Jakub Wilk jw...@debian.org, 2014-06-18, 10:28:

apparently /lib/udev/usb_modeswitch doesn't get run at all.


Renaming the rules file as 99-usb_modeswitch.rules helped a bit (don't 
know why it makes a difference): now /lib/udev/usb_modeswitch is 
executed, but the switch still doesn't happen. I managed to collect 
strace output (attached). The interesting part appears to be:


599   open(/tmp/tcl.tmp.mDGyFD, O_RDWR|O_CREAT|O_EXCL, 0600) = -1 EROFS 
(Read-only file system)

--
Jakub Wilk
592   execve(/lib/udev/usb_modeswitch.distrib, 
[/lib/udev/usb_modeswitch.distrib, 1-3/1-3:1.0], [/* 12 vars */]) = 0
592   brk(0)= 0xf921c000
592   access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory)
592   mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xf76e5000
592   access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory)
592   open(/etc/ld.so.cache, O_RDONLY|O_CLOEXEC) = 3
592   fstat64(3, {st_mode=S_IFREG|0644, st_size=93410, ...}) = 0
592   mmap2(NULL, 93410, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf76ce000
592   close(3)  = 0
592   access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory)
592   open(/lib/i386-linux-gnu/i686/cmov/libc.so.6, O_RDONLY|O_CLOEXEC) = 3
592   read(3, 
\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\233\1\0004\0\0\0..., 512) 
= 512
592   fstat64(3, {st_mode=S_IFREG|0755, st_size=1742588, ...}) = 0
592   mmap2(NULL, 1747580, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0xf7523000
592   mmap2(0xf76c8000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a5000) = 0xf76c8000
592   mmap2(0xf76cb000, 10876, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xf76cb000
592   close(3)  = 0
592   mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xf7522000
592   set_thread_area({entry_number:-1 - 12, base_addr:0xf7522940, 
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, 
seg_not_present:0, useable:1}) = 0
592   mprotect(0xf76c8000, 8192, PROT_READ) = 0
592   mprotect(0xf7724000, 4096, PROT_READ) = 0
592   mprotect(0xf7707000, 4096, PROT_READ) = 0
592   munmap(0xf76ce000, 93410) = 0
592   getpid()  = 592
592   rt_sigaction(SIGCHLD, {0xf77191c0, ~[RTMIN RT_1], 0}, NULL, 8) = 0
592   geteuid32()   = 0
592   brk(0)= 0xf921c000
592   brk(0xf923d000)   = 0xf923d000
592   getppid() = 568
592   stat64(/, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
592   stat64(., {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
592   open(/lib/udev/usb_modeswitch.distrib, O_RDONLY) = 3
592   fcntl64(3, F_DUPFD, 10)   = 10
592   close(3)  = 0
592   fcntl64(10, F_SETFD, FD_CLOEXEC)  = 0
592   rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
592   rt_sigaction(SIGINT, {0xf77191c0, ~[RTMIN RT_1], 0}, NULL, 8) = 0
592   rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
592   rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
592   rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
592   rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], 0}, NULL, 8) = 0
592   read(10, #!/bin/sh\n# part of usb_modeswit..., 8192) = 1987
592   pipe([3, 4])  = 0
592   clone(child_stack=0, 
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xf75229a8) 
= 595
595   close(10 unfinished ...
592   close(4 unfinished ...
595   ... close resumed ) = 0
592   ... close resumed ) = 0
595   close(3 unfinished ...
592   read(3,  unfinished ...
595   ... close resumed ) = 0
595   dup2(4, 1)= 1
595   close(4)  = 0
595   stat64(/usr/local/sbin/expr, 0xffc9b240) = -1 ENOENT (No such file or 
directory)
595   stat64(/usr/local/bin/expr, 0xffc9b240) = -1 ENOENT (No such file or 
directory)
595   stat64(/usr/sbin/expr, 0xffc9b240) = -1 ENOENT (No such file or 
directory)
595   stat64(/usr/bin/expr, {st_mode=S_IFREG|0755, st_size=38536, ...}) = 0
595   execve(/usr/bin/expr, [expr, 1-3/1-3:1.0, :, --.*], [/* 12 vars 
*/]) = 0
595   brk(0)= 0x9816000
595   access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory)
595   mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xf7755000
595   access(/etc/ld.so.preload, R_OK) = -1 ENOENT (No such file or directory)
595   open(/etc/ld.so.cache, O_RDONLY|O_CLOEXEC) = 3
595   fstat64(3, {st_mode=S_IFREG|0644, st_size=93410, ...}) = 0
595   mmap2(NULL, 93410, PROT_READ, MAP_PRIVATE, 3, 0) = 0xf773e000
595   close(3)  = 0
595   access(/etc/ld.so.nohwcap, F_OK) = -1 ENOENT (No such file or directory)
595   open(/lib/i386-linux-gnu/i686/cmov/libc.so.6, O_RDONLY|O_CLOEXEC) = 3
595   read(3, 

Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-13 Thread Jakub Wilk

* Josua Dietze digidie...@draisberghof.de, 2014-06-12, 15:38:
there still should be a hint about usb_modeswitch running in the system 
log, at least with the older version.


No luck. All I could get with the old version is this dmesg snippets:

[Fri Jun 13 19:46:54 2014] usb 1-3: New USB device found, idVendor=12d1, 
idProduct=14fe
[Fri Jun 13 19:46:54 2014] usb 1-3: New USB device strings: Mfr=2, Product=1, 
SerialNumber=0
[Fri Jun 13 19:46:54 2014] usb 1-3: Product: HUAWEI Mobile
[Fri Jun 13 19:46:54 2014] usb 1-3: Manufacturer: HUAWEI
[Fri Jun 13 19:46:54 2014] usb-storage 1-3:1.0: USB Mass Storage device detected
[Fri Jun 13 19:46:54 2014] scsi4 : usb-storage 1-3:1.0
[Fri Jun 13 19:46:54 2014] usb-storage 1-3:1.1: USB Mass Storage device detected
[Fri Jun 13 19:46:54 2014] scsi5 : usb-storage 1-3:1.1
[Fri Jun 13 19:46:54 2014] usbcore: registered new interface driver usb-storage

and later

[Fri Jun 13 19:47:00 2014] usb 1-3: new high-speed USB device number 4 using 
ehci-pci
[Fri Jun 13 19:47:00 2014] usb 1-3: New USB device found, idVendor=12d1, 
idProduct=1506
[Fri Jun 13 19:47:00 2014] usb 1-3: New USB device strings: Mfr=3, Product=2, 
SerialNumber=0
[Fri Jun 13 19:47:00 2014] usb 1-3: Product: HUAWEI Mobile
[Fri Jun 13 19:47:00 2014] usb 1-3: Manufacturer: HUAWEI
[Fri Jun 13 19:47:00 2014] usb-storage 1-3:1.4: USB Mass Storage device detected
[Fri Jun 13 19:47:00 2014] scsi6 : usb-storage 1-3:1.4
[Fri Jun 13 19:47:00 2014] usb-storage 1-3:1.5: USB Mass Storage device detected
[Fri Jun 13 19:47:00 2014] scsi7 : usb-storage 1-3:1.5
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver usbserial
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver 
usbserial_generic
[Fri Jun 13 19:47:00 2014] usbserial: USB Serial support registered for generic
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver option
[Fri Jun 13 19:47:00 2014] usbserial: USB Serial support registered for GSM 
modem (1-port)
[Fri Jun 13 19:47:00 2014] option 1-3:1.0: GSM modem (1-port) converter detected
[Fri Jun 13 19:47:00 2014] usb 1-3: GSM modem (1-port) converter now attached 
to ttyUSB0
[Fri Jun 13 19:47:00 2014] option 1-3:1.2: GSM modem (1-port) converter detected
[Fri Jun 13 19:47:00 2014] usb 1-3: GSM modem (1-port) converter now attached 
to ttyUSB1
[Fri Jun 13 19:47:00 2014] option 1-3:1.3: GSM modem (1-port) converter detected
[Fri Jun 13 19:47:00 2014] usb 1-3: GSM modem (1-port) converter now attached 
to ttyUSB2
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver cdc_ncm
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver cdc_wdm
[Fri Jun 13 19:47:00 2014] huawei_cdc_ncm 1-3:1.1: MAC-Address: 
58:2c:80:13:92:63
[Fri Jun 13 19:47:00 2014] huawei_cdc_ncm 1-3:1.1: cdc-wdm0: USB WDM device
[Fri Jun 13 19:47:00 2014] huawei_cdc_ncm 1-3:1.1 wwan0: register 
'huawei_cdc_ncm' at usb-:00:02.1-3, Huawei CDC NCM device, 58:2c:80:13:92:63
[Fri Jun 13 19:47:00 2014] usbcore: registered new interface driver 
huawei_cdc_ncm
[Fri Jun 13 19:47:01 2014] scsi 6:0:0:0: CD-ROMHUAWEI   Mass 
Storage 2.31 PQ: 0 ANSI: 2
[Fri Jun 13 19:47:01 2014] scsi 7:0:0:0: Direct-Access HUAWEI   SD Storage  
 2.31 PQ: 0 ANSI: 2
[Fri Jun 13 19:47:01 2014] sr1: scsi-1 drive
[Fri Jun 13 19:47:01 2014] sr 6:0:0:0: Attached scsi CD-ROM sr1
[Fri Jun 13 19:47:01 2014] sd 7:0:0:0: [sdc] Attached SCSI removable disk

There was nothing in the system log, presumably because the syslog 
daemon started only 5 seconds later:


2014-06-13T19:47:06+02:00 borsuk syslog-ng[1982]: syslog-ng starting up; 
version='3.5.4.1'


I'll try with the new version later, but I don't expect to see anything 
interesting logged either. :-(


--
Jakub Wilk


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-12 Thread Josua Dietze

Am 11.06.2014 19:44, schrieb Jakub Wilk:

To be sure it works, I first tried with the old version of
usb-modeswitch(-data). It turns out that logging during boot not only
doesn't work, but it actually prevents switching. :\


O.K., there still should be a hint about usb_modeswitch running in the system 
log, at least with the older version. Can you spot it and then compare with 
what you see when the new version is installed?

My gut tells me the problem is timing-related. The next step would be to unpack 
the E3131 configuration from the data package in /usr/share/usb_modeswitch and 
copy it to /etc/modeswitch.d where it can be modified to try out several things.

For you it would be the config file named 12d1:14fe. Don't bother about the 
name in the description, model names are hardly ever consistent when it comes to mobile 
modems.


Regards,
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#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-11 Thread Jakub Wilk

Package: usb-modeswitch
Version: 2.2.0+repack0-1

After I upgraded usb-modeswitch (2.1.1+repack0-1 = 2.2.0+repack0-1) and
usb-modeswitch-data (20140327-1 = 20140529-1), my Huawei E3131s-2 is no 
longer switched on boot:


$ lsusb | grep -w Huawei
Bus 001 Device 002: ID 12d1:14fe Huawei Technologies Co., Ltd.

I had to physically plug out the device, and then plug it in again to 
make the switching happen:


$ lsusb | grep -w Huawei
Bus 001 Device 005: ID 12d1:1506 Huawei Technologies Co., Ltd. E398 
LTE/UMTS/GSM Modem/Networkcard


-- System Information:
Debian Release: jessie/sid
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

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

Versions of packages usb-modeswitch depends on:
ii  libc62.19-1
ii  libjim0.74   0.74-3
ii  libusb-1.0-0 2:1.0.18-2
ii  usb-modeswitch-data  20140529-1

Versions of packages usb-modeswitch suggests:
pn  comgt   none
ii  wvdial  1.61-4.1

--
Jakub Wilk


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



Bug#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-11 Thread Josua Dietze

Am 11.06.2014 18:05, schrieb Jakub Wilk:

After I upgraded usb-modeswitch (2.1.1+repack0-1 = 2.2.0+repack0-1) and
usb-modeswitch-data (20140327-1 = 20140529-1), my Huawei E3131s-2 is no
longer switched on boot:


Can you try to get an usb_modeswitch log?

I'm not sure if it works properly during boot, but it may be worth a try.

Set EnableLogging = 1 in /etc/usb_modeswitch.conf and go to /var/log 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#751271: usb-modeswitch: doesn't switch Huawei E3131s-2 on boot

2014-06-11 Thread Jakub Wilk

* Josua Dietze digidie...@draisberghof.de, 2014-06-11, 19:08:
After I upgraded usb-modeswitch (2.1.1+repack0-1 = 2.2.0+repack0-1) 
and usb-modeswitch-data (20140327-1 = 20140529-1), my Huawei E3131s-2 
is no longer switched on boot:


Can you try to get an usb_modeswitch log?

I'm not sure if it works properly during boot, but it may be worth a 
try.


To be sure it works, I first tried with the old version of 
usb-modeswitch(-data). It turns out that logging during boot not only 
doesn't work, but it actually prevents switching. :\


--
Jakub Wilk


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