Author Message

<  Device Information  ~  D-LINK DWM-222

PostPosted: Fri Oct 21, 2016 12:29 pm Reply with quote
Posts: 4 Joined: Fri Oct 21, 2016 12:21 pm
Hi, i got a new LTE stick: D-LINK DWM222

Unfortunately I cannot get it working, its always stuck in the usb mode.

I tried some things i read here in the forum, but i got no luck.

Here are the hardware infos:

root@BenVM2:/etc/usb_modeswitch.d# usb_modeswitch -I -W -c /etc/usb_modeswitch.d/2001\:ab00

Read config file: /etc/usb_modeswitch.d/2001:ab00

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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x2001
DefaultProduct= 0xab00
TargetVendor= 0x2001
TargetProduct= 0x7d02
MessageContent="5553424312345678000000000000061b000000020000000000000000000000"
NeedResponse=0

InquireDevice=1

Look for target devices ...
found USB ID 2001:ab00
vendor ID matched
found USB ID 1d6b:0002
found USB ID 0e0f:0008
found USB ID 0e0f:0002
found USB ID 0e0f:0003
found USB ID 1d6b:0001
No devices in target mode or class found
Look for default devices ...
found USB ID 2001:ab00
vendor ID matched
product ID matched
found USB ID 1d6b:0002
found USB ID 0e0f:0008
found USB ID 0e0f:0002
found USB ID 0e0f:0003
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 007 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)
Inquire device details; driver will be detached ...
Looking for active driver ...
OK, driver detached

SCSI inquiry data (for identification)
-------------------------
Vendor String:
Model String: SD Storage
Revision String: 0000
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: Mobile Connect
Product: Mobile Connect
Serial No.: 0a37124719a7
-------------------------
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!

/root@BenVM2:/etc/usb_modeswitch.d# lsusb
Bus 001 Device 007: ID 2001:ab00 D-Link Corp.
root@BenVM2:/etc/usb_modeswitch.d# usb-devices

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0
D: Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2001 ProdID=ab00 Rev=02.28
S: Manufacturer=Mobile Connect
S: Product=Mobile Connect
S: SerialNumber=0a37124719a7
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)


I also tried things like
usb_modeswitch -v 2001 -p ab00 -V 2001 -P 7e19 -K -W

But no luck. How can I get this stick running?


Offline
PostPosted: Fri Oct 21, 2016 2:33 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
wagnbeu0 wrote:
I also tried things like
usb_modeswitch -v 2001 -p ab00 -V 2001 -P 7e19 -K -W

But no luck. How can I get this stick running?


Update usb_modeswitch!
You are using a 2.5 year old release and there is a good chance that the cmdline above
will switch the dongle after you have updated.

Please paste the output of lsusb -vd 2001:ab00, the usb-devices cmd hides all interesting info about the interfaces.


Offline
PostPosted: Mon Oct 24, 2016 3:17 pm Reply with quote
Posts: 4 Joined: Fri Oct 21, 2016 12:21 pm
very interesting. I downloaded the latest version. With that version my Hardware Id has changed:

root@benvm:~/Downloads/usb-modeswitch-2.4.0# lsusb
Bus 001 Device 008: ID 2001:7e35 D-Link Corp.

Unfortunately I don get it working. Does anyone has some more tips for me?


Offline
PostPosted: Mon Oct 24, 2016 6:09 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
Paste the output from lsusb -vd 2001:7e35 here so I can see what interfaces this device has now that it has been switched.
I guess that it has the same interface layout as other recent D-Link modems we have seen but want to have it confirmed.


Offline
PostPosted: Tue Oct 25, 2016 8:41 am Reply with quote
Posts: 4 Joined: Fri Oct 21, 2016 12:21 pm
When I plugin the Device, I get the old ID ab00 again. When I run usb_modeswitch, it changes to the new one:

Code:
root@benvm:~# lsusb -vd 2001:ab00

Bus 001 Device 002: ID 2001:ab00 D-Link Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x2001 D-Link Corp.
  idProduct          0xab00
  bcdDevice            2.28
  iManufacturer           1 Mobile Connect
  iProduct                2 Mobile Connect
  iSerial                 3 0a37124719a7
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      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               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
Device Status:     0x0000
  (Bus Powered)

root@benvm:~# usb_modeswitch -K -W -v 2001 -p ab00
Take all parameters from the 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= 0xab00

StandardEject=1

Look for default devices ...
  found USB ID 2001:ab00
   vendor ID matched
   product ID matched
  found USB ID 1d6b:0002
  found USB ID 0e0f:0002
  found USB ID 0e0f:0003
  found USB ID 1d6b:0001
 Found devices in default mode (1)
Access device 002 on bus 001
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: Mobile Connect
     Product: Mobile Connect
  Serial No.: 0a37124719a7
-------------------------
Sending standard EJECT sequence
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
Read the response to message 1 (CSW) ...
 Response successfully read (13 bytes), status 0
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 0
Trying to send message 3 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 3 (CSW) ...
 Response successfully read (13 bytes), status 0
Trying to send message 4 to endpoint 0x01 ...
 OK, message successfully sent
Read the response to message 4 (CSW) ...
 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!

root@benvm:~# lsusb
Bus 001 Device 003: ID 2001:7e35 D-Link Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@benvm:~# lsusb -vd 2001:7e35

Bus 001 Device 003: ID 2001:7e35 D-Link Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.01
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x2001 D-Link Corp.
  idProduct          0x7e35
  bcdDevice            2.28
  iManufacturer           1 Mobile Connect
  iProduct                2 Mobile Connect
  iSerial                 3 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          232
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      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           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      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           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 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
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 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     0x04  EP 4 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        4
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x89  EP 9 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 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     0x05  EP 5 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        5
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x8a  EP 10 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     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           12
  bNumDeviceCaps          1
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
Device Status:     0x0000
  (Bus Powered)
root@benvm:~#


Offline
PostPosted: Tue Oct 25, 2016 3:29 pm Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
As suspected this is a MediaTek based dongle with the same interface layout as we have seen before and its sister device DWM-221 B1 (2001:7e19) is supported by linux in the serial driver named option and in the net device driver qmi_wwan.

This is how the 6 interfaces are used:

MI_00 D-Link HS-USB Diagnostics (option)
MI_01 D-Link HS-USB Modem (option)
MI_02 D-Link HS-USB AT Port (option)
MI_03 D-Link HS-USB NMEA (option)
MI_04 D-Link HS-USB WWAN Adapter (qmi_wwan)
MI_05 USB Mass Storage Device (usb-storage)


You can add the usb id of your dongle to the option driver and use the dongle as a ppp serial dial-up modem with the cmds:

modprobe option
echo "2001 7e35" > /sys/bus/usb-serial/drivers/option1/new_id

which will create ttyUSB devices in /dev where ttyUSB1 is the ppp dialup modem device.

Better though is if you can submit patches to linux_usb so that the dongle get included in the two drivers.

The 2001:ab00 id switching to 2001:7e35 will be included in next issue of the usb_modeswitch data package late this year or early next year.

You can add it to your system by copying the already existing 2001:a401 config file to /etc/usb_modeswitch.d , rename it to 2001:ab00 and edit the TargetProduct id inside the file.
Then create an entry for 2001:ab00 in /lib/udev/rules.d/40-usb_modeswitch.rules. and you'll have automatic switching.


Offline
PostPosted: Sun Oct 30, 2016 8:32 pm Reply with quote
Posts: 4 Joined: Fri Oct 21, 2016 12:21 pm
Hm, these are my steps:

Code:
echo Installation USB_Modeswitch
apt-get install usb-modeswitch usb-modeswitch-data libusb-1.0-0 libusb-1.0-0-dev

echo Download newest Version
mkdir /root/usb_modeswitch
cd /root/usb_modeswitch
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.4.0.tar.bz2
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20160803.tar.bz2

tar xfvj usb-modeswitch-2.4.0.tar.bz2
tar xfvj usb-modeswitch-data-20160803.tar.bz2

cd /root/usb_modeswitch/usb-modeswitch-2.4.0
make install

cd /root/usb_modeswitch/usb-modeswitch-data-20160803
make install

cd /usr/sbin
mv usb_modeswitch usb_modeswitch.orig
mv usb_modeswitch_dispatcher usb_modeswitch_dispatcher.orig

ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch
ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch_dispatcher

echo configure UDEV Rules UDEV-Rules:

modprobe option
echo "2001 7e35" > /sys/bus/usb-serial/drivers/option1/new_id

cp /root/usb_modeswitch/usb-modeswitch-data-20160803/usb_modeswitch.d/2001\:a401 /etc/usb_modeswitch.d/2001:ab00


echo Replace the line
echo TargetProduct=0x7e19
echo with
echo TargetProduct=0x7e35
vi /etc/usb_modeswitch.d/2001\:ab00

Save the file


Edit Udev-Rules:Installation USB_Modeswitch
apt-get install usb-modeswitch usb-modeswitch-data libusb-1.0-0 libusb-1.0-0-dev

Download newest Version
mkdir /root/usb_modeswitch
cd /root/usb_modeswitch
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.4.0.tar.bz2
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20160803.tar.bz2

tar xfvj usb-modeswitch-2.4.0.tar.bz2
tar xfvj usb-modeswitch-data-20160803.tar.bz2

cd /root/usb_modeswitch/usb-modeswitch-2.4.0
make install

cd /root/usb_modeswitch/usb-modeswitch-data-20160803
make install

cd /usr/sbin
mv usb_modeswitch usb_modeswitch.orig
mv usb_modeswitch_dispatcher usb_modeswitch_dispatcher.orig

ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch
ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch_dispatcher

configure UDEV Rules UDEV-Rules:

modprobe option
echo "2001 7e35" > /sys/bus/usb-serial/drivers/option1/new_id

cp /root/usb_modeswitch/usb-modeswitch-data-20160803/usb_modeswitch.d/2001\:a401 /etc/usb_modeswitch.d/2001:ab00

vi /etc/usb_modeswitch.d/2001\:ab00
Replace the line
TargetProduct=0x7e19
with
TargetProduct=0x7e35

Save the file


Edit Udev-Rules:
vi /lib/udev/rules.d/40-usb_modeswitch.rules
Add the following line:
# D-Link DWM-221 B1
ATTR{idVendor}=="2001", ATTR{idProduct}=="ab00", RUN+="usb_modeswitch '%b/%k'"

vi /lib/udev/rules.d/40-usb_modeswitch.rules
Add the following line:
# D-Link DWM-221 B1
ATTR{idVendor}=="2001", ATTR{idProduct}=="ab00", RUN+="usb_modeswitch '%b/%k'"




Unfortunately it did not work. Where is my mistake?


Offline
PostPosted: Mon Oct 31, 2016 7:36 am Reply with quote
Site Admin Posts: 6439 Joined: Sat Nov 03, 2007 12:30 am
To me, it's not clear what you want to do in this part:
Code:
cd /root/usb_modeswitch/usb-modeswitch-2.4.0
make install

cd /root/usb_modeswitch/usb-modeswitch-data-20160803
make install

cd /usr/sbin
mv usb_modeswitch usb_modeswitch.orig
mv usb_modeswitch_dispatcher usb_modeswitch_dispatcher.orig

ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch
ln -s /root/usb_modeswitch/usb-modeswitch-2.4.0/usb_modeswitch_dispatcher

Why would you rename the newly installed binaries? Maybe you confused the order of those steps?

Anyway, "does not work" is a bit short of information. I suggest you enable logging in /etc/usb_modeswitch.conf and try again. Then have a look at the logs.


Offline
PostPosted: Tue May 09, 2017 5:13 pm Reply with quote
Posts: 1 Joined: Tue May 09, 2017 4:48 pm
were you able to get it to work?


Offline
PostPosted: Tue Aug 08, 2017 10:28 am Reply with quote
Posts: 2 Joined: Tue Aug 08, 2017 10:23 am
Hello

I have the same dongle. Is there an issue?
I have an error on command

# sudo usb_modeswitch -K -W -v 2001 -p 7e35
Take all parameters from the command line


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

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x2001
DefaultProduct= 0x7e35

StandardEject=1

Look for default devices ...
found USB ID 2001:7e35
vendor ID matched
product ID matched
found USB ID 0424:ec00
found USB ID 0424:9514
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 006 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 255
Error: can't use storage command in MessageContent with interface 0; interface class is 255, expected 8. Abort


Offline
PostPosted: Tue Aug 08, 2017 10:40 am Reply with quote
Posts: 1175 Joined: Wed Jul 11, 2012 3:14 pm Location: Koh Samui, TH
Norbert wrote:
I have an error on command



Of course you have, 2001:7e35 is the Id after switching, you can not switch it one more time..


Offline
PostPosted: Wed Aug 09, 2017 7:07 pm Reply with quote
Posts: 2 Joined: Tue Aug 08, 2017 10:23 am
Thank you. I can send SMS with DWM-222 but I need to make
sudo modprobe option;sudo sh -c "echo 2001 7e35 > /sys/bus/usb-serial/drivers/option1/new_id"
after reboot


Offline
PostPosted: Thu Aug 10, 2017 1:42 pm Reply with quote
Posts: 2 Joined: Thu Aug 10, 2017 12:08 pm
Hi all
I encountern the same issue
I recompile version 2.5.1 and the switch works .
But no /dev/USB* appears.
With the use of sudo modprobe option;sudo sh -c "echo 2001 7e35 > /sys/bus/usb-serial/drivers/option1/new_id" I obtain 5 /dev/ttyUSB0 to /dev/ttyUSB4, but I am not able to use them.

I try with gammu, but I am not able to send SMS or to connect to my provider.
Did you encounter the same issue ?

Regards

Code:
[gammu]
device = /dev/ttyUSB0
name = Téléphone sur le port USB série Mobile_ConnectMobile_Connect
connection = at

[gammu1]
device = /dev/ttyUSB1
name = Téléphone sur le port USB série Mobile_ConnectMobile_Connect
connection = at

[gammu2]
device = /dev/ttyUSB2
name = Téléphone sur le port USB série Mobile_ConnectMobile_Connect
connection = at

[gammu3]
device = /dev/ttyUSB3
name = Téléphone sur le port USB série Mobile_ConnectMobile_Connect
connection = at

[gammu4]
device = /dev/ttyUSB4
name = Téléphone sur le port USB série Mobile_ConnectMobile_Connect
connection = at


Offline
PostPosted: Thu Aug 10, 2017 11:22 pm Reply with quote
Site Admin Posts: 6439 Joined: Sat Nov 03, 2007 12:30 am
chris38170,

did you try ttyUSB1 as LOM recommended in the previous post?

I don't know about SMS capabilities, but you can check if this port accepts AT commands. Try the "minicom" terminal program.


Offline
PostPosted: Fri Aug 11, 2017 8:10 am Reply with quote
Posts: 2 Joined: Thu Aug 10, 2017 12:08 pm
Thanks, it work on ttyUSB1 and my 4G connection is up.

If anybody else try to use a DWN-222, here are the steps I did on my raspi 3



Code:
echo Installation USB_Modeswitch
sudo apt-get install libgusb-dev

echo Download newest Version
mkdir /root/usb_modeswitch
cd /root/usb_modeswitch
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-2.5.1.tar.bz2
wget http://www.draisberghof.de/usb_modeswitch/usb-modeswitch-data-20170806.tar.bz2

tar xfvj usb-modeswitch-2.5.1.tar.bz2
tar xfvj usb-modeswitch-data-20170806.tar.bz2


cd /root/usb_modeswitch/usb-modeswitch-2.5.1
sudo make install

cd /root/usb_modeswitch/usb-modeswitch-data-20170806
sudo make install


Then I update /etc/usb_modeswitch.conf
Code:
# Configuration for the usb_modeswitch package, a mode switching tool for
# USB devices providing multiple states or modes
#
# Evaluated by the wrapper script /usr/sbin/usb_modeswitch_dispatcher
#
# To enable an option, set it to "1", "yes" or "true" (case doesn't matter)
# Everything else counts as "disable"


# Disable automatic mode switching globally (e.g. to access the original
# install storage)

DisableSwitching=0

# Disable check for MBIM module presence and configuration globally (to aid
# special embedded environments). Available as per-device parameter
# 'NoMBIMCheck'

DisableMBIMGlobal=0

# Enable logging (results in a extensive report file in /var/log, named
# "usb_modeswitch_<interface-name>" and probably others

EnableLogging=0

# Optional increase of "delay_use" for the usb-storage driver; there are hints
# that a recent kernel default change to 1 sec. may lead to problems, particu-
# larly with USB 3.0 ports. Set this to at least 3 (seconds) in that case.
# Does nothing if the current system value is same or higher

#SetStorageDelay=4

# If the configuration for your Huawei modem uses the standard switching method,
# you can globally set an alternative method here which provides a different mod
e:
# either plain serial PPP (for older modems) or NCM which integrates nicely
# with recent Linux distributions, possibly avoiding configuration through a
# modem built-in web page. All other modems are not affected.
# Available as per-device parameter 'AltHuaweiMode'

HuaweiAltModeGlobal=0

DefaultVendor=0x2001
DefaultProduct=0xab00

# D-Link DWM-222
TargetVendor=0x2001
TargetProduct=0x7e35
StandardEject=1


and then the content of /etc/wvdial.conf for my orange provider in France
Code:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","orange"
Stupid Mode = 1
Modem Type = Analog Modem
ISDN = 0
Phone = *99***1#
Modem =  [b]/dev/ttyUSB1[/b]
Username = { }
Password = { }
Baud = 460800


and finally dial
Code:
sudo modprobe option;sudo sh -c "echo 2001 7e35 > /sys/bus/usb-serial/drivers/option1/new_id"

sudo wvdial


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 2
22 posts
Go to page 1 2 Next
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