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-25-2021, 05:18 PM   #1
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Rep: Reputation: Disabled
How to set modem device D-Link DWRr600b via usb_modeswitch


Hi,
I would like my usb modem to be detected as modem and not sda. After connecting the device, he gets the following message:

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 2001:a410 D-Link Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$dmesg
[ 7792.326573] usb-storage 1-1.3:1.2: USB Mass Storage device detected
[ 7792.327020] scsi host0: usb-storage 1-1.3:1.2
[ 7793.355229] scsi 0:0:0:0: Direct-Access SD Storage 0000 PQ: 0 ANSI: 2
[ 7793.356033] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 7793.367636] sd 0:0:0:0: [sda] Unit Not Ready
[ 7793.367665] sd 0:0:0:0: [sda] Sense Key : 0x5 [current]
[ 7793.367687] sd 0:0:0:0: [sda] ASC=0x20 ASCQ=0x0
[ 7793.387431] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08
[ 7793.387451] sd 0:0:0:0: [sda] Sense Key : 0x5 [current]
[ 7793.387466] sd 0:0:0:0: [sda] ASC=0x20 ASCQ=0x0
[ 7793.387488] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[ 7793.387502] sd 0:0:0:0: [sda] 0-byte physical blocks
[ 7793.387878] sd 0:0:0:0: [sda] Write Protect is off
[ 7793.387894] sd 0:0:0:0: [sda] Mode Sense: 0f 00 00 00
[ 7793.388881] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 7793.440858] sd 0:0:0:0: [sda] Unit Not Ready
[ 7793.440878] sd 0:0:0:0: [sda] Sense Key : 0x5 [current]
[ 7793.440893] sd 0:0:0:0: [sda] ASC=0x20 ASCQ=0x0
[ 7793.454856] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08
[ 7793.454875] sd 0:0:0:0: [sda] Sense Key : 0x5 [current]
[ 7793.454890] sd 0:0:0:0: [sda] ASC=0x20 ASCQ=0x0
[ 7793.456849] sd 0:0:0:0: [sda] Attached SCSI removable disk

so I add lines to /etc/usb_modeswitch.conf:

DefaultVendor=0x2001
DefaultProduct=0xa410
TargetVendor=0x2001
TargetProduct=0x7e19
StandardEject=1

when I run "sudo usb_modeswitch -c /etc/usb_modeswitch.conf" and reboot system, still sees as sda and doesn't show ttyUSB, but I see that numner is changed

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2001:7e39 D-Link Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

What could I do?

Last edited by Creatorczyk; 02-26-2021 at 01:18 AM.
 
Old 02-25-2021, 07:50 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Bus 001 Device 004: ID 2001:a410 D-Link Corp.
DefaultVendor=0x2001
DefaultProduct=0x7e19
TargetVendor=0x2001
TargetProduct=0x7e19
Where does the "7e19" come from? Didn't see it anywhere in list commands. Apparently 2001:7e19 is the Vendor/Product ID for Modem D-Link DWM-221.
Googling ---> 2001:a410 didn't show anything modem related on the first page.
 
Old 02-26-2021, 01:27 AM   #3
Creatorczyk
LQ Newbie
 
Registered: Feb 2021
Posts: 11

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Brains View Post
Where does the "7e19" come from? Didn't see it anywhere in list commands. Apparently 2001:7e19 is the Vendor/Product ID for Modem D-Link DWM-221.
Googling ---> 2001:a410 didn't show anything modem related on the first page.
sorry my mistake while creating the post. In the file, "DefaultProduct = 0xa410" was set (just like in my edited post). When I wanted to do:
tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz 2001\:a410
I received an error with no package. Therefore, I found a similar device from the manufacturer in the hope that it will work. If there is no package for this modem, does it mean that it cannot be configured?
 
Old 02-26-2021, 12:49 PM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Creatorczyk View Post
sorry my mistake while creating the post. In the file, "DefaultProduct = 0xa410" was set (just like in my edited post). When I wanted to do:
tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz 2001\:a410
I received an error with no package. Therefore, I found a similar device from the manufacturer in the hope that it will work. If there is no package for this modem, does it mean that it cannot be configured?
It's possible you are on the right track. I know nothing about this modem, but noticed another mistake. I'm not sure what's in the configPack.tar.gz, but the error likely came about as a result of appending the 2001:a410 which is not a tar.gz file or destination directory and thus an error was reported. Try unpacking the file without that:
Code:
tar -xzvf /usr/share/usb_modeswitch/configPack.tar.gz
It will be unpacked in /usr/share/usb_modeswitch/ unless you specify otherwise in the command

Last edited by Brains; 02-26-2021 at 01:04 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
Suggestions for GDBM, XZ, libarchive and usb_modeswitch packages on Current Darth Vader Slackware 2 08-04-2012 09:58 PM
[SOLVED] usb_modeswitch with Huawei e220 toredo Linux - Software 7 07-23-2011 09:33 AM
Unable to install USB_ModeSwitch sudhirpradhan Linux - Newbie 11 07-03-2011 12:22 PM
Configure Evdo Capitel card in Fedora 13 using usb_modeswitch vskram21 Linux - Networking 1 09-19-2010 09:41 PM
Verizon/Nortel USB760 3G and USB_ModeSwitch tronayne Slackware 4 06-09-2010 03:05 AM

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

All times are GMT -5. The time now is 12:49 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