Author Message

<  Setup Discussion  ~  Raspbian Jessie and Huawei E3372

PostPosted: Tue Jul 18, 2017 5:23 pm Reply with quote
Posts: 1 Joined: Tue Jul 18, 2017 5:10 pm
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 [i]modeswitch[i] to network adapter.
Although it works by manual switch:
Code:
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:
sudo systemctl list-units | grep usb_mod
system-usb_modeswitch.slice       loaded    active active    system-usb_modeswitch.slice


If I start new process:
Code:
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


Offline
PostPosted: Thu Jul 20, 2017 4:35 am Reply with quote
Posts: 1166 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
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.


Offline
PostPosted: Sat Jul 29, 2017 10:48 am Reply with quote
Posts: 2 Joined: Thu Jul 27, 2017 7:42 am
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:
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


Offline
PostPosted: Sat Jul 29, 2017 12:45 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
rantanplan wrote:
Did upgrading usb_modeswitch help?

It certainly does not hurt.


Offline
PostPosted: Wed Aug 02, 2017 10:00 pm Reply with quote
Posts: 2 Joined: Thu Jul 27, 2017 7:42 am
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.


Offline
PostPosted: Wed Aug 02, 2017 10:12 pm Reply with quote
Site Admin Posts: 6420 Joined: Sat Nov 03, 2007 12:30 am
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.


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
6 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum