LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-26-2021, 05:36 PM   #1
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Rep: Reputation: Disabled
How to switch modem E173s by usb_modeswitch?


Hi,

I have my own linux distribution build by "buildroot". I would like to connect a modem (Huawei E173s) but unfortunately it is read as sda. (device 12d1:1c0b)

Code:
# lsusb
Bus 001 Device 002: ID 05e3:0608
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 1307:0330
Bus 001 Device 004: ID 12d1:1c0b
I would like the device to be detected as a modem so I added in the file "/etc/usb_modeswitch.conf" I added the following lines

Code:
DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b
TargetVendor= 0x12d1
TargetProduct= 0x1c05
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
CheckSuccess=20
When I run "sudo usb_modeswitch -c /etc/usb_modeswitch.conf" i got this messege

Code:
# sudo usb_modeswitch -c /etc/usb_modeswitch.conf 
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 004 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x0f (out) and 0x8f (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI Mobile
  Serial No.: not provided
-------------------------
Looking for active driver ...
 OK, driver detached
Set up interface 0
Use endpoint 0x0f for message sending ...
Trying to send message 1 to endpoint 0x0f ...
 OK, message successfully sent
Reset response endpoint 0x8f
 Could not reset endpoint (probably harmless): -99
Reset message endpoint 0x0f
 Could not reset endpoint (probably harmless): -99

Check for mode switch (max. 20 times, once per second) ...
 Search for target devices ...
 Search for target devices ...
 Search for target devices ...
   product ID matched

Found target device, open it
 Found correct target device

Mode switch succeeded. Bye!
the name device has changed, but usb is still not detected as modem

Code:
# lsusb
Bus 001 Device 002: ID 05e3:0608
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 1307:0330
Bus 001 Device 005: ID 12d1:1c05

Code:
# dmesg
[ 6257.864859] usb 1-1.4: new high-speed USB device number 5 using musb-hdrc
[ 6257.966307] usb 1-1.4: New USB device found, idVendor=12d1, idProduct=1c05
[ 6257.973502] usb 1-1.4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 6257.981189] usb 1-1.4: Product: HUAWEI Mobile
[ 6257.985761] usb 1-1.4: Manufacturer: HUAWEI
[ 6257.999821] usb-storage 1-1.4:1.3: USB Mass Storage device detected
[ 6258.007745] scsi host3: usb-storage 1-1.4:1.3
[ 6258.014284] usb-storage 1-1.4:1.4: USB Mass Storage device detected
[ 6258.022770] scsi host4: usb-storage 1-1.4:1.4
[ 6259.008267] scsi 3:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[ 6259.029054] scsi 4:0:0:0: Direct-Access     HUAWEI   SD Storage       2.31 PQ: 0 ANSI: 2
[ 6259.045629] sd 4:0:0:0: [sde] Attached SCSI removable disk
[ 6428.889608] usb 1-1.4: USB disconnect, device number 5
What could I do?
 
Old 02-26-2021, 08:16 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
1. Look online to see if your distro supports that modem and how to configure it.

I found this for Arch and this for Mint. There were lots of hits for other distros as well.

Since you did not tell us what distro and version you are using it is hard to give specific recommendations. Maybe by perusing several you can get a hint as to what you need.

In your post above you did not post anything for column 7 from lsusb. If that does not show on your system then you cannot say it does not reveal the modem since that info would be there.

dmesg, inxi, and maybe even lspci should give more info as well when the device is configured.

Then
2. Is the modem newer than your system will support?
3. Are drivers available for your system to support that modem?
4. Are the drivers installed?

Last edited by computersavvy; 02-26-2021 at 08:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set modem device D-Link DWRr600b via usb_modeswitch Creatorczyk Linux - Hardware 3 02-26-2021 01:49 PM
[SOLVED] [Ubuntu 14.04] Huawei E173s - only storage mode Furry Linux - Hardware 3 12-03-2015 03:07 PM
[SOLVED] How to switch a GPRS USB without usb_modeswitch? floppy_stuttgart Linux - Wireless Networking 1 01-18-2014 12:43 PM
Configure Evdo Capitel card in Fedora 13 using usb_modeswitch vskram21 Linux - Networking 1 09-19-2010 10:41 PM
Verizon/Nortel USB760 3G and USB_ModeSwitch tronayne Slackware 4 06-09-2010 04:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration