Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
karolism
Posts: 1
Joined: 18 Jul 2017, 17:10

Raspbian Jessie and Huawei E3372

Post by karolism » 18 Jul 2017, 17:23

Hello guys,
I am new here, but I saw this form is not dead, so I want to ask for help.
I've got my E3372 modem and tested it with Ubuntu 16.04.02 LTS. Everything works nice. Then I have tried it with Raspberry PI 3 Model B with Rasbian Jessie and it shows up as CD-ROM. It does not modeswitch to network adapter.
Although it works by manual switch:

Code: Select all

pi@raspberrypi:~ $ lsusb
Bus 001 Device 025: ID 12d1:157d Huawei Technologies Co., Ltd. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ sudo usb_modeswitch -J -v 12d1 -p 157d
Look for default devices ...
   product ID matched
 Found devices in default mode (1)
Access device 025 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_MOBILE
     Product: HUAWEI_MOBILE
  Serial No.: 0123456789ABCDEF
-------------------------
Using standard Huawei switching message
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!
My question is: how to debug/tarce why it is not working by udev rules which invoke usb_modeswitch and how to make it work automatically without my custom manual script?

EDIT:
Also:

Code: Select all

sudo systemctl list-units | grep usb_mod
system-usb_modeswitch.slice       loaded    active active    system-usb_modeswitch.slice
If I start new process:

Code: Select all

pi@raspberrypi:~ $ sudo systemctl start usb_modeswitch@1-1.4/1-1.4:1.0.service
pi@raspberrypi:~ $ sudo systemctl status usb_modeswitch@1-1.4/1-1.4:1.0.service
● usb_modeswitch@1-1.4-1-1.4:1.0.service - USB_ModeSwitch
   Loaded: loaded (/lib/systemd/system/usb_modeswitch@.service; static)
   Active: inactive (dead)

Jul 18 14:27:59 raspberrypi systemd[1]: Started USB_ModeSwitch.
Jul 18 14:43:43 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Jul 18 14:43:43 raspberrypi systemd[1]: Started USB_ModeSwitch.
Jul 18 15:16:45 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Jul 18 15:16:45 raspberrypi systemd[1]: Started USB_ModeSwitch.
Jul 18 15:27:08 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Jul 18 15:27:08 raspberrypi systemd[1]: Started USB_ModeSwitch.
Jul 18 15:27:13 raspberrypi systemd[1]: Stopped USB_ModeSwitch.
Jul 18 15:27:16 raspberrypi systemd[1]: Starting USB_ModeSwitch...
Jul 18 15:27:16 raspberrypi systemd[1]: Started USB_ModeSwitch.
how to manage taht service? I am not familiar with <name>@<args> construction and how those processes are handled an managed. But it is seen that nothing start in example above.

P. S. usb-modeswitch version: 2.2.0+repack0-2

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Raspbian Jessie and Huawei E3372

Post by LOM » 20 Jul 2017, 04:35

karolism wrote:
usb-modeswitch version: 2.2.0+repack0-2
is 3++ years old and many bug fixes and improvements has been added since then.
Current is 2.5.0, update first and get back if you still have problems.

rantanplan
Posts: 2
Joined: 27 Jul 2017, 07:42

Re: Raspbian Jessie and Huawei E3372

Post by rantanplan » 29 Jul 2017, 10:48

Hi!

I am having the same troubles on latest raspian jessie: Linux raspberrypi 4.9.35+ #1014 Fri Jun 30

The manual switch of the device works via

Code: Select all

sudo usb_modeswitch -v 12d1 -p 1f01 -M '55534243123456780000000000000a11062000000000000100000000000000'
but all my attempts to setup the system to automatically switch failed so far, i.e. adding entries to 40-usb_modeswitch.rules file

Moreover, there are no logfiles created although logging is enabled in /etc/usb_modeswitch.conf

Did upgrading usb_modeswitch help?

Best,
Rantanplan

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

Re: Raspbian Jessie and Huawei E3372

Post by Josh » 29 Jul 2017, 12:45

rantanplan wrote:Did upgrading usb_modeswitch help?
It certainly does not hurt.

rantanplan
Posts: 2
Joined: 27 Jul 2017, 07:42

Re: Raspbian Jessie and Huawei E3372

Post by rantanplan » 02 Aug 2017, 22:00

rantanplan wrote: I am having the same troubles on latest raspian jessie: Linux raspberrypi 4.9.35+ #1014 Fri Jun 30
It seems that adding the full path, i.e., /usr/sbin/usb_modeswitch to the rule in the 40-usb_modeswitch.rules file helped in my case. Update of usb_modeswitch was not necessary.

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

Re: Raspbian Jessie and Huawei E3372

Post by Josh » 02 Aug 2017, 22:12

Oha ...

The file called from the "rules" file is not the binary usb_modeswitch but a little shell script in /usr/lib/udev - unless this standard setup was changed by someone for Raspbian.

Post Reply