Activation Codes and Methods, Hardware Details, Sniffing
Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

DLink DWM 157 B1

Post by Rtn » 27 Dec 2016, 19:13

hi there,

Please support DLink DWM 157 B1 in your file:
http://www.draisberghof.de/usb_modeswit ... erence.txt

Please support the modem.
CentOS doesn't support it.

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

Re: DLink DWM 157 B1

Post by LOM » 28 Dec 2016, 02:47

What is the USB Id (vid:pid) of your DWM-157B1 ?

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 06:01

whenever i run 'lsusb' command, i see two different output randomly:

TargetVendor=2001
TargetProduct=a707

TargetVendor=2001
TargetProduct=7d02

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

Re: DLink DWM 157 B1

Post by LOM » 28 Dec 2016, 06:25

2001:a707 is the default id before switching and the switching from it into 2001:7d02 has been supported by usb_modeswitch since long back, it was first included in the datapack 20130607.

It is the task for Centos maintainers to keep their distro up to date whenever there is a new release of the usb_modeswitch program or its data package.

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 07:41

please help.
how can i use modem mode when i plug it in?

fedora is automatic. but centos is not...

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

Re: DLink DWM 157 B1

Post by LOM » 28 Dec 2016, 08:16

Rtn wrote:
fedora is automatic. but centos is not...
Most likely because the Fedora maintainers has bundled a quite recent usb_modeswitch while CentOS has a very old one, you should be able to check if it is so and also be able to check if CentOS has any updates you can download.
They are responsible for what they choose to build, bundle, and distribute!

You can download the source code for the latest usb_modeswitch and the latest datapackage here:
http://www.draisberghof.de/usb_modeswitch/

and then compile and install it.

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 09:51

thank you mr LOM.
the usb_modeswitch 2.4.0 is running on the lastest version of CentOS (i installed EveryThing version).
but doesn't work for this modem when i plug the device in...

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

Re: DLink DWM 157 B1

Post by Josh » 28 Dec 2016, 10:17

"Doesn't work" is very unspecific.

Please enable logging in /etc/usb_modeswitch.conf and post the resulting log after you re-plug the modem.

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 15:47

Hi Mr. Josh,
where is the report you want?
is it by 'dmesg'?

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

Re: DLink DWM 157 B1

Post by Josh » 28 Dec 2016, 16:45

As it says in the file "/etc/usb_modeswitch.conf", the log is in "/var/log".

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 19:45

thanks for your help.
done.

this is in report file by name usb_modeswitch_1-1:

USB_ModeSwitch log from Wed Dec 28 21:09:01 IRST 2016

Use global config file: /etc/usb_modeswitch.conf

Started via systemd
Raw args from udev: _1-1

Use top device dir /sys/bus/usb/devices/1-1
Check class of first interface ...
Interface 0 class is 08.

----------------
USB values from sysfs:
manufacturer D-Link,Inc
product D-Link DWM-157
serial 536512505509340
----------------
ConfigList: /usr/share/usb_modeswitch/2001:a707
SCSI attributes not needed, move on
Check config: /usr/share/usb_modeswitch/2001:a707
! matched. Read config data
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1

Device may have an MBIM configuration, check driver ...
driver for MBIM devices is available
Find MBIM configuration number ...
No MBIM configuration found, switch to legacy modem mode
Unbinding driver
Command to be run:
usb_modeswitch -W -D -b 1 -g 5 -v 2001 -p a707 -f $flags(config)

Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------

Read long config from command line

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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x2001
DefaultProduct= 0xa707
TargetVendor= 0x2001
TargetProduct= 0x7d02

StandardEject=1
System integration mode enabled

Use given bus/device number: 001/005 ...
Look for default devices ...
bus/device number matched
found USB ID 2001:a707
vendor ID matched
product ID matched
Found devices in default mode (1)
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: D-Link,Inc
Product: D-Link DWM-157
Serial No.: 536512505509340
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes), status 1
Trying to send message 2 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes), status 1
Trying to send message 3 to endpoint 0x01 ...
OK, message successfully sent
Read the response to message 3 (CSW) ...
Response reading failed (error -1)
Device is gone, skip any further commands
ok:busdev
--------------------------------
(end of usb_modeswitch output)

Check success of mode switch for max. 20 seconds ...
Read attributes ...
All attributes matched
Mode switching was successful, found 2001:7d02 (D-Link,Inc: D-Link DWM-157)
Logger is /usr/bin/logger
Now check for bound driver ...
driver has bound, device is known
Check for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated

All done, exit

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

Re: DLink DWM 157 B1

Post by Josh » 28 Dec 2016, 20:17

So usb_modeswitch has worked well.

There are no signs of any problems.

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 20:38

but modem not found there...
in fedora, i see the broadband icon in networking.

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

Re: DLink DWM 157 B1

Post by Josh » 28 Dec 2016, 20:54

Then use Fedora.

CentOS is not for everyday use. It's several years behind Fedora.

Rtn
Posts: 9
Joined: 27 Dec 2016, 19:08

Re: DLink DWM 157 B1

Post by Rtn » 28 Dec 2016, 21:11

mr Josh,
i like server linuxes...
but...
i don't know about them enough...
please hint...
which one is better?

CentOS, OpenSUSE, Oracle Linux

Post Reply