WeTelecom WM-D300
WeTelecom WM-D300 - MTS Ukraine
ATTRS{idVendor}=="22de", ATTRS{idProduct}=="6803", RUN+="usb_modeswitch '%b/%k'"
Seems like it's working with the std settings, pls. add it to the dev. db:
$cat 22de:6803
# WeTelecom WM-D300
DefaultVendor= 0x22de
DefaultProduct=0x6803
TargetVendor= 0x22de
TargetProduct=0x6801
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
ReleaseDelay=4000
NeedResponse=1
CheckSuccess=5
ATTRS{idVendor}=="22de", ATTRS{idProduct}=="6803", RUN+="usb_modeswitch '%b/%k'"
Seems like it's working with the std settings, pls. add it to the dev. db:
$cat 22de:6803
# WeTelecom WM-D300
DefaultVendor= 0x22de
DefaultProduct=0x6803
TargetVendor= 0x22de
TargetProduct=0x6801
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
MessageContent3="55534243123456702000000080000c85010101180101010101000000000000"
ReleaseDelay=4000
NeedResponse=1
CheckSuccess=5
Sorry, it looks like something is still wrong.Josh wrote:Thanks a lot !
This will go into the next data package release.
Did you check if the ReleaseDelay is required?
What happens if you leave out the third MessageContent?
It's working pretty fine when I use usb_modeswitch -с , but now I tried to remove the device and then plug it in again and it failed to switch. Have no idea why, here's the log, will investigate it further. I suppose it's not a usb_modeswitch problem though, should be something udev related.
Code: Select all
Aug 11 21:10:16 gate kernel: [19539.332690] usb 1-1: USB disconnect, device number 7
Aug 11 21:10:26 gate kernel: [19549.976344] usb 1-1: new high-speed USB device number 8 using ehci_hcd
Aug 11 21:10:27 gate kernel: [19550.112115] usb 1-1: New USB device found, idVendor=22de, idProduct=6803
Aug 11 21:10:27 gate kernel: [19550.112129] usb 1-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
Aug 11 21:10:27 gate kernel: [19550.112138] usb 1-1: Product: Wetelecom Mobile Products
Aug 11 21:10:27 gate kernel: [19550.112145] usb 1-1: Manufacturer: WeTelecom Incorporated
Aug 11 21:10:27 gate kernel: [19550.112152] usb 1-1: SerialNumber: 1dcefb7d0000
Aug 11 21:10:27 gate kernel: [19550.114433] scsi11 : usb-storage 1-1:1.0
Aug 11 21:10:27 gate logger: usb_modeswitch: using overriding config file /etc/usb_modeswitch.d/22de:6803; make sure this is intended
Aug 11 21:10:27 gate logger: usb_modeswitch: please report any new or corrected settings; otherwise, check for outdated files
Aug 11 21:10:27 gate usb_modeswitch: switching device 22de:6803 on 001/008
Aug 11 21:10:33 gate logger: usb_modeswitch: switched to 22de:6803 on 001/008
Aug 11 21:10:34 gate pppd[13329]: Failed to open /dev/serial/by-id/usb-WeTelecom_Incorporated_Wetelecom_Mobile_Products-if00-port0: No such file or directory
And even worse, aftre unplugging, it won't switch at all. Just waits for something forever waiting for driver:bbik wrote:Sorry, it looks like something is still wrong.Josh wrote: Did you check if the ReleaseDelay is required?
What happens if you leave out the third MessageContent?
It's working pretty fine when I use usb_modeswitch -с , but now I tried to remove the device and then plug it in again and it failed to switch. Have no idea why, here's the log, will investigate it further. I suppose it's not a usb_modeswitch problem though, should be something udev related.
Code: Select all
# usb_modeswitch -c 22de:6803
Looking for target devices ...
No devices in target mode or class found
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 008 on bus 001 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached
Don't understan what's going on.Josh wrote:Thanks a lot !
This will go into the next data package release.
Did you check if the ReleaseDelay is required?
What happens if you leave out the third MessageContent?
When I use pure usb_modeswitch -с without any changes to udev, it works just fine.
Found that "Message3" and "delay" ain't necessary. Will try to resolve udev issue, but have no idea what's wrong though.
Re: WeTelecom WM-D300
Looks like I need help )bbik wrote:WeTelecom WM-D300 - MTS Ukraine
This config works well from command line. But when I try to run it from udev, device failed to switch. And even more, it's failed to switch until I remove it and then plug it in again. Looks like it's usb_modeswitch bug?
Here's the log:
Code: Select all
USB_ModeSwitch log from Mon Aug 13 11:40:04 EEST 2012
Raw args from udev: 1-1/1-1:1.0
Using global config file: /etc/usb_modeswitch.conf
Using top device dir /sys/bus/usb/devices/1-1
----------------
USB values from sysfs:
manufacturer WeTelecom Incorporated
product Wetelecom Mobile Products
serial 1dcefb7d0000
----------------
bNumConfigurations is 1 - don't check for active configuration
Found packed config collection /usr/share/usb_modeswitch/configPack.tar.gz
SCSI attributes not needed, moving on
checking config: /etc/usb_modeswitch.d/22de:6803
! matched. Reading config data
Using config file from override folder /etc/usb_modeswitch.d
Logger is /usr/bin/logger
config: TargetVendor set to 22de
config: TargetProduct set to 6801
config: CheckSuccess set to 5
Driver module is "option", ID path is /sys/bus/usb-serial/drivers/option1
Command to be run:
usb_modeswitch -I -W -D -s 20 -u -1 -b 1 -g 16 -v 22de -p 6803 -f $configBuffer
Verbose debug output of usb_modeswitch and libusb follows
(Note that some USB errors are to be expected in the process)
--------------------------------
usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 009
usb_os_find_busses: Found 008
usb_os_find_busses: Found 007
usb_os_find_busses: Found 004
usb_os_find_busses: Found 006
usb_os_find_busses: Found 005
usb_os_find_busses: Found 003
usb_os_find_busses: Found 002
usb_os_find_busses: Found 001
usb_os_find_devices: Found 001 on 009
usb_os_find_devices: Found 001 on 008
usb_os_find_devices: Found 002 on 007
usb_os_find_devices: Found 001 on 007
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 004
usb_os_find_devices: Found 001 on 006
skipping descriptor 0x30
skipped 1 class/vendor specific endpoint descriptors
usb_os_find_devices: Found 002 on 005
skipped 1 class/vendor specific interface descriptors
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 005
error obtaining child information: Inappropriate ioctl for device
usb_os_find_devices: Found 001 on 003
usb_os_find_devices: Found 001 on 002
usb_os_find_devices: Found 016 on 001
usb_os_find_devices: Found 007 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
USB error: could not get bound driver: No data available
Reading long config from command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.2.3 (C) Josua Dietze 2012
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x22de
DefaultProduct= 0x6803
TargetVendor= 0x22de
TargetProduct= 0x6801
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint= not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
InquireDevice disabled
Success check enabled, max. wait time 5 seconds
System integration mode enabled
Use given bus/device number: 001/016 ...
Looking for default devices ...
bus/device number matched
searching devices, found USB ID 22de:6803
found matching vendor ID
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Skipping the check for the current configuration
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
USB description data (for identification)
-------------------------
Manufacturer: WeTelecom Incorporated
Product: Wetelecom Mobile Products
Serial No.: 1dcefb7d0000
-------------------------
Looking for active driver ...
No driver found. Either detached before or never attached
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
USB error: error submitting URB: Device or resource busy
OK, message successfully sent
Reading the response to message 1 (CSW) ...
OK, response successfully read (0 bytes).
Trying to send message 2 to endpoint 0x01 ...
USB error: error submitting URB: Device or resource busy
USB error: error submitting URB: Device or resource busy
USB error: error submitting URB: Device or resource busy
Sending the message returned error -16. Trying to continue
Reading the response to message 2 (CSW) ...
Response reading got error -16
Device is gone, skipping any further commands
Bus/dev search active, referring success check to wrapper. Bye.
ok:busdev
--------------------------------
(end of usb_modeswitch output)
Checking success of mode switch for max. 5 seconds ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Reading attributes ...
Mode switching was successful, found 22de:6803 (WeTelecom Incorporated: Wetelecom Mobile Products)
No vendor-specific class found, skip driver checking
Checking for AVOID_RESET_QUIRK kernel attribute
AVOID_RESET_QUIRK activated
All done, exiting
Re: WeTelecom WM-D300
Are you on a USB 3 port by any chance?
There have been reports of failed mode-switching on these ports due to a changed kernel setting.
There is an instant solution - increase the "delay_use" of the usbstorage driver before re-plugging:
(Run with sudo or as root)
There have been reports of failed mode-switching on these ports due to a changed kernel setting.
There is an instant solution - increase the "delay_use" of the usbstorage driver before re-plugging:
Code: Select all
# echo 3 >/sys/module/usb_storage/parameters/delay_use
Re: WeTelecom WM-D300
Does not help. Not sure how it was because my intel ssd hdd had passed by. Now it's plugged into ordinary usb 2.0 and i did this change of the delay_use but it does not work anyway (Josh wrote:Are you on a USB 3 port by any chance?
There have been reports of failed mode-switching on these ports due to a changed kernel setting.
There is an instant solution - increase the "delay_use" of the usbstorage driver before re-plugging:(Run with sudo or as root)Code: Select all
# echo 3 >/sys/module/usb_storage/parameters/delay_use
Re: WeTelecom WM-D300
Re-reading your information, there is something strange in the system output of your second post:
"Aug 11 21:10:34 gate pppd[13329]: Failed to open /dev/serial/by-id/usb-WeTelecom_Incorporated_Wetelecom_Mobile_Products-if00-port0: No such file or directory"
Did you ever install Linux software from that stick? Something in the system files was changed, probably by an udev "rules" file ...
Try to run this shell command in the folder "/lib/udev/rules.d":
"Aug 11 21:10:34 gate pppd[13329]: Failed to open /dev/serial/by-id/usb-WeTelecom_Incorporated_Wetelecom_Mobile_Products-if00-port0: No such file or directory"
Did you ever install Linux software from that stick? Something in the system files was changed, probably by an udev "rules" file ...
Try to run this shell command in the folder "/lib/udev/rules.d":
Code: Select all
# grep WeTelecom *
Re: WeTelecom WM-D300
lolJosh wrote:Re-reading your information, there is something strange in the system output of your second post:
"Aug 11 21:10:34 gate pppd[13329]: Failed to open /dev/serial/by-id/usb-WeTelecom_Incorporated_Wetelecom_Mobile_Products-if00-port0: No such file or directory"
Did you ever install Linux software from that stick? Something in the system files was changed, probably by an udev "rules" file ...
Try to run this shell command in the folder "/lib/udev/rules.d":Code: Select all
# grep WeTelecom *
I do have some linux experience since 1995 (as far as i remember) and some experience with unix systems since 1990
I mean that my system usually does exactly what I want it to do and i understand what every piece of software is intended for (although in modern linux dists it's quite difficult )
It's just my cron script that's trying to bring up ppp interface bound to that device (ifup interface_name that calls pon interface_name for this device). Just don't pay attention to it )
There's only udev rule I've added:
#WeTelecom WM-D300
ATTRS{idVendor}=="22de", ATTRS{idProduct}=="6803", RUN+="usb_modeswitch '%b/%k'"
And after that all further manual attempts to "modeswitch" this device manually, fails. The only way to switch then, is to unplug the device, remove these strings from 40-usb_modeswitch.rules and then plug in the devie and switch it manually by usb_modeswitch -c 22de:6803
It's succeeding then and i can ifup my ppp interface.
Re: WeTelecom WM-D300
(I don't know the year, but my first Linux distro was a four-floppy "Soft Landing Linux". I think it was at kernel version 0.98.2. Just to set the record straight ... )
I still have the feeling that your problem may be somehow timing-related. The difference between automatic and manual mode switch is that the latter happens well after the device has been initialized.
You can try the "WaitBefore" parameter in your config file, where you set a delay (in seconds) before usb_modeswitch kicks in after plugging.
This whole mode-switching business is a dirty one - you might say truly unworthy of an affiliation with a noble operating system like Unix ...
I still have the feeling that your problem may be somehow timing-related. The difference between automatic and manual mode switch is that the latter happens well after the device has been initialized.
You can try the "WaitBefore" parameter in your config file, where you set a delay (in seconds) before usb_modeswitch kicks in after plugging.
This whole mode-switching business is a dirty one - you might say truly unworthy of an affiliation with a noble operating system like Unix ...
Re: WeTelecom WM-D300
BTW, I just received this patch:
http://www.draisberghof.de/usb_modeswit ... f=3&t=1116
What do you make of it? I think it's saying that the device IDs don't change when switching ...
Did you ever have a look at "lsusb -v -d 22de:6803" after the 'failed' automatic switching?
http://www.draisberghof.de/usb_modeswit ... f=3&t=1116
What do you make of it? I think it's saying that the device IDs don't change when switching ...
Did you ever have a look at "lsusb -v -d 22de:6803" after the 'failed' automatic switching?
Re: WeTelecom WM-D300
The patch is correct so we will have to fix the current config file error in next data package release.Josh wrote:BTW, I just received this patch:
http://www.draisberghof.de/usb_modeswit ... f=3&t=1116
What do you make of it? I think it's saying that the device IDs don't change when switching ...
Did you ever have a look at "lsusb -v -d 22de:6803" after the 'failed' automatic switching?
There are actually 3 devices:
WM-D200 22de:6801 switches by StandardEject to 22de:6801
WM-D200A 22de:6802 switches by StandardEject to 22de:6802
WM-D300 22de:6803 switches by StandardEject to 22de:6803
all three of them has TargetClass=0xff