Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
JasonH
Posts: 21
Joined: Sun Jul 05, 2015 1:54 pm

EnableLogging=1 is ignored / not working?

Post by JasonH » Mon Jul 06, 2015 1:19 am

I have installed the latest usb-modeswitch (2.2.3) from sources, along with the latest usb-modeswitch-data (2015-06-27)

I am using the latest raspian on a raspberry pi 2 with a device that identifies as:

Code: Select all

Bus 001 Device 007: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)
This is through lsusb with usb-modeswitch not installed (and externally on the physical package it is identified as a huawei E1750)

With the latest usb-modeswitch installed the device is switched into:

Code: Select all

Bus 001 Device 007: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
(but no modem is present in /dev/gsm*)

So to debug this I set EnableLogging=1 in /etc/usb_modeswitch.conf but when I reboot I don't see any log files in /var/log/

I was wondering if it didn't have write permissions or something but it looks like usb_modeswitch is owned by root:

Code: Select all

[pi@pi008:usr/local/src/usb-modeswitch-2.2.3] $ ls -al /usr/sbin/usb_*
-rwxr-xr-x 1 root root 65045 Jul  6 11:16 /usr/sbin/usb_modeswitch
-rwxr-xr-x 1 root root 30473 Jul  6 11:16 /usr/sbin/usb_modeswitch_dispatcher
[pi@pi008:usr/local/src/usb-modeswitch-2.2.3] $ usb_mode
usb_modeswitch             usb_modeswitch_dispatcher  
[pi@pi008:usr/local/src/usb-modeswitch-2.2.3] $ usb_modeswitch --version

 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.2.3 (C) Josua Dietze 2015
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !
Any hints as to why the log messages are not being written?

Thanks!!
Jason

JasonH
Posts: 21
Joined: Sun Jul 05, 2015 1:54 pm

Re: EnableLogging=1 is ignored / not working?

Post by JasonH » Thu Jul 09, 2015 4:49 pm

For some weird reason this is now working for me. I don't know what happened. I did disable the automatic switching in the /etc/usb_modeswitch.conf and then re-enabled switching and now I am getting log files again. Weird. Consider this closed I guess...

ZPrime
Posts: 7
Joined: Sat Sep 05, 2015 12:13 am

Re: EnableLogging=1 is ignored / not working?

Post by ZPrime » Fri Sep 25, 2015 12:06 am

JasonH wrote:For some weird reason this is now working for me. I don't know what happened. I did disable the automatic switching in the /etc/usb_modeswitch.conf and then re-enabled switching and now I am getting log files again. Weird. Consider this closed I guess...
Are you still running wheezy or have you upgraded to jessie?

I'm on an RPi with Jessie and I can't get it to honor the debug flag either. Jessie uses systemd and while journalctl shows systemd "starting USB_modeswitch," nothing seems to actually happen and I'm not sure how to figure out where the problem lies without increased logging. :(

XFer
Posts: 1
Joined: Sat Nov 28, 2015 12:08 am

Re: EnableLogging=1 is ignored / not working?

Post by XFer » Sat Nov 28, 2015 12:21 am

Hello, I'm in the same position:

- RPI2 running Debian Wheezy, kernel 3.18.9-v7+

- USB_ModeSwitch v2.2.6

- Data v20151101

- Huawey K3675 (12d1:1520)

The 3G key does not switch into Modem mode; plus, "EnableLogging=1" in /etc/usb_modeswitch.conf does nothing: no usb_modeswitch logs in /var/log :cry:

I also tried using (-c) a specific config file:

Code: Select all

DefaultVendor=  0x12d1
DefaultProduct= 0x1520

TargetVendor=   0x12d1
TargetProduct=  0x1465

MessageContent="55534243123456780000000000000011060000000000000000000000000000"

I get

Code: Select all

Look for target devices ...
 No devices in target mode or class found
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 005 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI Technology
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Looking for active driver ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
but still no modem (Mass Storage only) and no logs :cry:

Any hint?

Thanks!!

Fernando

Josh
Site Admin
Posts: 6534
Joined: Sat Nov 03, 2007 12:30 am

Re: EnableLogging=1 is ignored / not working?

Post by Josh » Sun Nov 29, 2015 10:12 pm

XFer wrote:"EnableLogging=1" in /etc/usb_modeswitch.conf does nothing: no usb_modeswitch logs in /var/log
It's likely that usb_modeswitch is not even started.

There were several reports of problems on the Pi due to unstable or insufficient power supply to USB modems. You may want to try with an externally powered hub.

hkapanen
Posts: 1
Joined: Sun Feb 14, 2016 10:31 pm

Re: EnableLogging=1 is ignored / not working?

Post by hkapanen » Sun Feb 14, 2016 10:39 pm

Josh wrote:
XFer wrote:"EnableLogging=1" in /etc/usb_modeswitch.conf does nothing: no usb_modeswitch logs in /var/log
It's likely that usb_modeswitch is not even started.

There were several reports of problems on the Pi due to unstable or insufficient power supply to USB modems. You may want to try with an externally powered hub.
No log for me either despite EnableLogging=1 on /etc/usb_modeswitch.conf. Not even when running usb_modeswitch manually.

I'm running Jessie Lite on Pi 2 to which Huawei E3372s-153 USB LTE stick is plugged in via powered hub. I can switch the stick manually with...

Code: Select all

sudo usb_modeswitch -J -v 0x12d1 -p 0x1f01 -V 0x12d1 -P 0x14dc -M 55534243123456780000000000000a11062000000000000100000000000000
...but can't get it automated. Nor logged. Help appreciated.

Post Reply