D-Link DWM-156
Hi,
This device has a peculiar mode switch method:
In Ubuntu Lucid beta the usb storage is automatically mounted on /media/CONNMGR with id 0x07d1:0xa800. To mode switch you just create a 0 byte file in the root directory named wcdma.cfg
#usb storage mounted in /media/CONNMGR
touch /media/CONNMGR/wcdma.cfg
The creation of this file triggers the mode switch to 0x07d1:0x3e02. I have tested this and the subsequent device (ttyUSB0-3 created) works with option.ko using ttyUSB0 as the data port. (BTW ttyUSB2 and ttyUSB3 also respond to modem-manager probes, there is a race condition, and ttyUSB0 isn't always exported as the modem - but that's another problem.)
Can the usb_modeswitch framework cater to this?
I.e., what is the MessageContent equivalent to "touch/media/CONNMGR/wcdma.cfg"
Thank you.
This device has a peculiar mode switch method:
In Ubuntu Lucid beta the usb storage is automatically mounted on /media/CONNMGR with id 0x07d1:0xa800. To mode switch you just create a 0 byte file in the root directory named wcdma.cfg
#usb storage mounted in /media/CONNMGR
touch /media/CONNMGR/wcdma.cfg
The creation of this file triggers the mode switch to 0x07d1:0x3e02. I have tested this and the subsequent device (ttyUSB0-3 created) works with option.ko using ttyUSB0 as the data port. (BTW ttyUSB2 and ttyUSB3 also respond to modem-manager probes, there is a race condition, and ttyUSB0 isn't always exported as the modem - but that's another problem.)
Can the usb_modeswitch framework cater to this?
I.e., what is the MessageContent equivalent to "touch/media/CONNMGR/wcdma.cfg"
Thank you.
Re: D-Link DWM-156
How did you find out? Did you sniff in Windows?aalba wrote:To mode switch you just create a 0 byte file in the root directory named wcdma.cfg
I would be amazed if the Windows driver does the same thing, mounting before switching ...
This is a known annoyance. It should be easy to find the right (interrupt) port if the device provides more than one. USB_ModeSwitch adds a symlink to that port in the newest release.aalba wrote:BTW ttyUSB2 and ttyUSB3 also respond to modem-manager probes, there is a race condition, and ttyUSB0 isn't always exported as the modem - but that's another problem.
Well, there is not really a limit to what the wrapper can do; the challenge would be to control the mounting procedure for every distribution.aalba wrote:Can the usb_modeswitch framework cater to this?
I.e., what is the MessageContent equivalent to "touch/media/CONNMGR/wcdma.cfg"
I have yet to sniff Windows but I found this on the following weblink (in Chinese) -
http://smallhose.blogspot.com/2009/12/u ... -375g.html
Pretty bizarre mode switch - but I'll proceed to sniff Windows and see the result.
http://smallhose.blogspot.com/2009/12/u ... -375g.html
Pretty bizarre mode switch - but I'll proceed to sniff Windows and see the result.
-
- Posts: 3
- Joined: 19 Jul 2010, 15:47
Oh, yes, please!
I don't know anything about sniffing on the Mac, I'm afraid; but Windows (XP) should work of course.
For a very short primer see "How to Contribute" on the usb_modeswitch doc page (has a link to the recommended Windows sniffer).
A more detailed example about the necessary steps is shown here:
http://www.draisberghof.de/usb_modeswit ... php?p=2422
I don't know anything about sniffing on the Mac, I'm afraid; but Windows (XP) should work of course.
For a very short primer see "How to Contribute" on the usb_modeswitch doc page (has a link to the recommended Windows sniffer).
A more detailed example about the necessary steps is shown here:
http://www.draisberghof.de/usb_modeswit ... php?p=2422
hm, for my DWM-156 it's sufficient to just detach storage for it to switch mode..
Here's a simple patch with the config:
http://svn.mandriva.com/cgi-bin/viewvc. ... iew=markup
Here's a simple patch with the config:
http://svn.mandriva.com/cgi-bin/viewvc. ... iew=markup
-
- Posts: 3
- Joined: 19 Jul 2010, 15:47
You mean, effectively, just rmmod'ing the usb-storage driver?proyvind wrote:hm, for my DWM-156 it's sufficient to just detach storage for it to switch mode..
Here's a simple patch with the config:
http://svn.mandriva.com/cgi-bin/viewvc. ... iew=markup
D-Link DWM-156
The detach method doesn't seem to work for me. I did find that eject -s sr0 (or 1,2, etc. depending on what has been assigned to the fake CDROM "ConnMgr Storage") does switch the device, though - but then the device has had a firmware update, even though the hardware is an earlier version than what is on sale today.
>lsusb | grep D-Link
Bus 001 Device 018: ID 07d1:a800 D-Link System
>eject -s sr1
>lsusb | grep D-Link
Bus 001 Device 019: ID 07d1:3e02 D-Link System
This is under Fedora 14, 64 bit .
A little bit more digging and I've come up with:
########################################################
# D-Link DWM-156 HSUPA 3.75G USB Modem
# 07d1:a800 <--> 07d1:3e02
# H/W Ver. A1
# F/W Ver. 1.04 Upgraded to 1.05b01
# Upgrades at ftp://ftp.dlink.co.uk/dwm_3G/DWM-156/
# 27-Jan-2011
DefaultVendor= 0x07d1
DefaultProduct= 0xa800
TargetVendor= 0x07d1
TargetProduct= 0x3e02
DetachStorageOnly=0
# Standard SCSI eject
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
MessageEndpoint=0x01
ResponseEndpoint=0x81
Interface=0x00
NeedResponse=0
CheckSuccess=20
>lsusb | grep D-Link
Bus 001 Device 018: ID 07d1:a800 D-Link System
>eject -s sr1
>lsusb | grep D-Link
Bus 001 Device 019: ID 07d1:3e02 D-Link System
This is under Fedora 14, 64 bit .
A little bit more digging and I've come up with:
########################################################
# D-Link DWM-156 HSUPA 3.75G USB Modem
# 07d1:a800 <--> 07d1:3e02
# H/W Ver. A1
# F/W Ver. 1.04 Upgraded to 1.05b01
# Upgrades at ftp://ftp.dlink.co.uk/dwm_3G/DWM-156/
# 27-Jan-2011
DefaultVendor= 0x07d1
DefaultProduct= 0xa800
TargetVendor= 0x07d1
TargetProduct= 0x3e02
DetachStorageOnly=0
# Standard SCSI eject
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
MessageEndpoint=0x01
ResponseEndpoint=0x81
Interface=0x00
NeedResponse=0
CheckSuccess=20
Sorry for the late answer ...
Your contribution is much appreciated! Of course I'll add the device to the next data package, and I'll include your comments about the firmware upgrade.
If you want, give me your real name (or any nickname) via PM or e-mail, and I'll add you as the contributor for this device.
Your contribution is much appreciated! Of course I'll add the device to the next data package, and I'll include your comments about the firmware upgrade.
If you want, give me your real name (or any nickname) via PM or e-mail, and I'll add you as the contributor for this device.
Re: D-Link DWM-156
I have a DVM-156 of a slightly different version, and don't manage to get it working under Ubuntu 12.10.Fuego wrote:The detach method doesn't seem to work for me. I did find that eject -s sr0 (or 1,2, etc. depending on what has been assigned to the fake CDROM "ConnMgr Storage") does switch the device, though - but then the device has had a firmware update, even though the hardware is an earlier version than what is on sale today.
>lsusb | grep D-Link
Bus 001 Device 018: ID 07d1:a800 D-Link System
>eject -s sr1
>lsusb | grep D-Link
Bus 001 Device 019: ID 07d1:3e02 D-Link System
I read and searched for the last hours and this place seems to be the closest.
Here is the basic info:
$ lsusb
Bus 001 Device 004: ID 2001:7d00 D-Link Corp.
$ dmesg
[ 2159.459080] usb 1-2: new high-speed USB device number 3 using ehci_hcd
[ 2159.591866] usb 1-2: New USB device found, idVendor=2001, idProduct=a80b
[ 2159.591877] usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 2159.591884] usb 1-2: Product: D-Link DWM-156
[ 2159.591889] usb 1-2: Manufacturer: D-Link,Inc
[ 2159.591894] usb 1-2: SerialNumber: 532274409833040
[ 2159.593378] scsi7 : usb-storage 1-2:1.0
[ 2160.590971] scsi 7:0:0:0: CD-ROM HSPA USB SCSI CD-ROM 6229 PQ: 0 ANSI: 0 CCS
[ 2160.595305] sr1: scsi3-mmc drive: 0x/0x caddy
[ 2160.595595] sr 7:0:0:0: Attached scsi CD-ROM sr1
[ 2160.598099] sr 7:0:0:0: Attached scsi generic sg7 type 5
[ 2160.966761] usb 1-2: USB disconnect, device number 3
[ 2161.716751] usb 1-2: new high-speed USB device number 4 using ehci_hcd
[ 2161.850067] usb 1-2: New USB device found, idVendor=2001, idProduct=7d00
[ 2161.850079] usb 1-2: New USB device strings: Mfr=5, Product=6, SerialNumber=0
[ 2161.850086] usb 1-2: Product: D-Link DWM-156
[ 2161.850091] usb 1-2: Manufacturer: D-Link,Inc
[ 2161.851828] scsi8 : usb-storage 1-2:1.2
[ 2162.848410] scsi 8:0:0:0: Direct-Access HSPA USB SCSI CD-ROM 6229 PQ: 0 ANSI: 0 CCS
[ 2162.849847] sd 8:0:0:0: Attached scsi generic sg7 type 0
[ 2162.857127] sd 8:0:0:0: [sdg] Attached SCSI removable disk
[ 2164.162903] show_signal_msg: 45 callbacks suppressed
[ 2164.162915] usb_modeswitch_[6067]: segfault at 0 ip 00007fed729a4101 sp 00007fffff6fc738 error 4 in libc-2.15.so[7fed7291b000+1b5000]
What I read above does not seem to work (or I don't understand it):
$ ls -l /dev/sr*
brw-rw----+ 1 root cdrom 11, 0 Feb 17 03:25 /dev/sr0
$ eject -s sr0
eject: unable to eject, last error: Success
$ eject -s sr1
eject: unable to find or open device for: `sr1'
$ eject -s sg7
eject: unable to open `/dev/sg7'
$ lsusb -v
Code: Select all
Bus 001 Device 004: ID 2001:7d00 D-Link Corp.
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x2001 D-Link Corp.
idProduct 0x7d00
bcdDevice 2.00
iManufacturer 5
iProduct 6
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 104
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 2
bInterfaceProtocol 1
iInterface 1
** UNRECOGNIZED: 05 24 00 10 01
** UNRECOGNIZED: 04 24 02 0f
** UNRECOGNIZED: 05 24 06 00 01
** UNRECOGNIZED: 05 24 01 03 01
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 4
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Uwe
Re: D-Link DWM-156
Your stick is already in modem mode so you don't need to do any of those eject commands but you'll have to load the drivers manually:
modprobe usb_wwan
modprobe option
echo "2001 7d00" > / sys/bus/usb-serial/drivers/option1/new_id"
and this will give you a ttyUSB0 and a ttyUSB1 device under /dev
ttyUSB0 is the modem.
modprobe usb_wwan
modprobe option
echo "2001 7d00" > / sys/bus/usb-serial/drivers/option1/new_id"
and this will give you a ttyUSB0 and a ttyUSB1 device under /dev
ttyUSB0 is the modem.
Re: D-Link DWM-156
@LOM:
Thanks very much! It actually does work when typed liked that.
The ugly segfault still occurs, though.
Anything I can help with to make this stick work in future out of the box?
Uwe
Thanks very much! It actually does work when typed liked that.
The ugly segfault still occurs, though.
Anything I can help with to make this stick work in future out of the box?
Uwe
Re: D-Link DWM-156
The segfault is probably caused by Ubuntu's implementation of usb_modeswitch or from using an older version of usb_modeswitch together with a later version of libc, this is something you should report to Ubuntu developers.udippel wrote:@LOM:
Thanks very much! It actually does work when typed liked that.
The ugly segfault still occurs, though.
Anything I can help with to make this stick work in future out of the box?
Uwe
You will have to load the drivers manually until the stick gets included in the option driver, the echo command only adds a
a temporary on-the-fly support.
Can you please give me the version number from the sticks label, I alrady know about versions A1 and A3 and they have
a quite different usb id.
Re: D-Link DWM-156
Thanks so much! - It is a pleasure working with you.
I will file a bug report with Ubuntu, yes.
I am aware I have to use some script to make it come up semi-automatic.
The version number is A6 (HW) and 6 0 5 WW (FW).
FCC ID would be KAZWM156A6
Thanks again,
Uwe
I will file a bug report with Ubuntu, yes.
I am aware I have to use some script to make it come up semi-automatic.
The version number is A6 (HW) and 6 0 5 WW (FW).
FCC ID would be KAZWM156A6
Thanks again,
Uwe