Author Message

<  Device Information  ~  Samsung GT-B3730 4G LTE Dongle

PostPosted: Thu Aug 12, 2010 3:54 am
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
Hi!

I've been messing around for a while trying to get this darn 4g dongle switching mode, but
darnit if I'm am able to make it work. :(

Here's the output from 'lsusb -v' for the device in mass storage mode:
Code:
Bus 005 Device 107: ID 04e8:689a Samsung Electronics Co., Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x689a
  bcdDevice            0.01
  iManufacturer           1
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval             255
      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             255
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered


Here's the configuration I've tried putting together and experimenting around from usbsnoop log (available at http://proyvind.net/~peroyvind/UsbSnoop.log ) on windows:

#######################################################
# Samsung Electronics Co., Ltd Composite LTE device

DefaultVendor= 0x04e8
DefaultProduct= 0x689a

TargetVendor= 0x04e8
TargetProduct= 0x6889
#TargetClass= 0xff
#TargetProductList=""

DetachStorageOnly=0
MessageEndpoint = 0x02
MessageContent = "575004000000002000000000"
MessageContent2 = "575004000000000200f40000"
MessageContent3 = "575004000000000300000000"

NeedResponse=1
ResponseEndpoint= 0x81

CheckSuccess=10


And here's the output from running usb_modeswitch which fails:

[root@localhost usb-modeswitch-1.1.3]# usb_modeswitch -W -c "/etc/usb_modeswitch.d/04e8:689a"
Reading config file: /etc/usb_modeswitch.d/04e8:689a

* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.3 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x04e8
DefaultProduct= 0x689a
TargetVendor= 0x04e8
TargetProduct= 0x6889
TargetClass= not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint=0x02
MessageContent="575004000000002000000000"
MessageContent2="575004000000000200f40000"
MessageContent3="575004000000000300000000"
NeedResponse=1
ResponseEndpoint=0x81
Interface=0x00

InquireDevice enabled (default)
Success check enabled, max. wait time 10 seconds
System integration mode disabled


Looking for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
found matching product ID
adding device
Found devices in default mode or class (1)
Accessing device 111 on bus 005 ...
Using endpoints 0x02 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2
Could not send INQUIRY message (error -5)
Error: could not get description string "manufacturer"

USB description data (for identification)
-------------------------
Manufacturer:
Product: not provided
Serial No.: not provided
-------------------------
Looking for active driver ...
No driver found. Either detached before or never attached
Setting up communication with interface 0 ...
Using endpoint 0x02 for message sending ...
Trying to send message 1 to endpoint 0x02 ...
libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2
Sending the message returned error -5. Trying to continue
Reading the response to the message (CSW) ...
libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2
libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2
Response reading got error -5, can probably be ignored
Device is gone, skipping any further commands

Checking for mode switch (max. 10 times, once per second) ...
Original device is gone already, not checking
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
No new devices in target mode or class found

Mode switch has failed. Bye.



So uhm, yeah.. I feel totally lost, and have been fiddling around and tried messing with the configuration back and forth, still not getting anywhere..

Could anyone perhaps take a brief look and maybe provide me with some hints?

Provider is btw. Netcom, Norway..

Any help is *very* welcome, I'm totally lost and tired about to give up.. :p


Offline Profile
PostPosted: Thu Aug 12, 2010 9:24 am
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
Well, you managed to sniff which is not necessarily easy. It's just that you sniffed at the switched device which is already in modem state.

I can tell from the log at the point where URB_FUNCTION_SELECT_CONFIGURATION is "coming back". This gives you a similar listing of the device as "lsusb -v" in Linux. And if you compare you get:

lsusb:
bInterfaceNumber 0
...
bInterfaceClass 8 Mass Storage

Windows sniff log:
Interface[0]: Class = 0x000000ff

You want to see in the log:
Interface[0]: Class = 0x00000008

The trick is to install the log filter at the original device which is present only for a very short time until the driver kicks the mode switch.
In the sniffer, check the box "List Devices Not Present". The modem doesn't even have to be plugged.
You may get a looong list of all devices ever connected to your machine. Look for "Vid_04e8&Pid_689a" and install the sniffing filter there. Delete the Log to have a fresh start, then plug the modem.
Usually the log stops growing after a while (use "Refresh" to update); then you are done.

Note that mass storage commands usually start with "55534243"; well, you will see that.



Offline Profile
PostPosted: Thu Aug 12, 2010 9:02 pm
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
k, I've made sure to provide myself with a more complete log now ( http://proyvind.net/~peroyvind/UsbSnoop2.log ), and managed to do the switch with the following configuration:


#######################################################
# Samsung Electronics Co., Ltd Composite LTE device

DefaultVendor= 0x04e8
DefaultProduct= 0x689a
TargetVendor= 0x04e8
TargetProductList= "6722,6875,6888,6806,6876,6889,6802,6807"
TargetClass= 0xff

MessageContent= "55534243785634120100000080000601000000000000000000000000000000"
CheckSuccess= 10
Interface= 0x00


Here's the output:

[root@localhost ~]# usb_modeswitch -W -c /etc/usb_modeswitch.d/04e8:689a
Reading config file: /etc/usb_modeswitch.d/04e8:689a

* usb-modeswitch: handle USB devices with multiple modes
* Version 1.1.3 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)

! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor= 0x04e8
DefaultProduct= 0x689a
TargetVendor= 0x04e8
TargetProduct= not set
TargetClass= 0xff
TargetProductList="6722,6875,6888,6806,6876,6889,6802,6807"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243785634120100000080000601000000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, max. wait time 10 seconds
System integration mode disabled


Looking for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624
searching devices, found USB ID 04e8:689a
found matching vendor ID
found matching product ID
target class ff not matching
adding device as default
Found devices in default mode or class (1)
Accessing device 004 on bus 005 ...
Using endpoints 0x06 (out) and 0x85 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
libusb:error [op_clear_halt] clear_halt failed error -1 errno 110

SCSI inquiry data (for identification)
-------------------------
Vendor String: Samsung
Model String: Install Disk
Revision String: 0.10
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: SAMSUNG ELECTRONICS Co.Ltd.
Product: not provided
Serial No.: not provided
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x06 for message sending ...
Trying to send message 1 to endpoint 0x06 ...
OK, message successfully sent
Resetting response endpoint 0x85
libusb:error [op_clear_halt] clear_halt failed error -1 errno 71
Error resetting endpoint: -34
Resetting message endpoint 0x06
Error resetting endpoint: -6
Device is gone, skipping any further commands

Checking for mode switch (max. 10 times, once per second) ...
Original device is gone already, not checking
Searching for target devices ...
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 0af0:6971
searching devices, found USB ID 0b97:7761
searching devices, found USB ID 0b97:7762
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 1d6b:0001
searching devices, found USB ID 04e8:6889
found matching vendor ID
found matching product ID from list
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 413c:a005
searching devices, found USB ID 413c:8103
searching devices, found USB ID 0951:1624

Found target device 006 on bus 005

Target device description data
-------------------------
Manufacturer: SAMSUNG ELECTRONICS Co.Ltd.
Product: not provided
Serial No.: not provided
-------------------------
Found correct target device

Mode switch succeeded. Bye.

Also output from dmesg:
Aug 12 20:55:13 localhost kernel: usb 5-7: new high speed USB device using ehci_hcd and address 4
Aug 12 20:55:13 localhost kernel: usb 5-7: New USB device found, idVendor=04e8, idProduct=689a
Aug 12 20:55:13 localhost kernel: usb 5-7: New USB device strings: Mfr=1, Product=0, SerialNumber=0
Aug 12 20:55:13 localhost kernel: usb 5-7: Manufacturer: SAMSUNG ELECTRONICS Co.Ltd.
Aug 12 20:55:13 localhost kernel: scsi94 : usb-storage 5-7:1.0
Aug 12 20:55:18 localhost kernel: scsi 94:0:0:0: CD-ROM Samsung Install Disk 0.10 PQ: 0 ANSI: 0 CCS
Aug 12 20:55:18 localhost kernel: sr1: scsi3-mmc drive: 0x/0x caddy
Aug 12 20:55:18 localhost kernel: sr 94:0:0:0: Attached scsi generic sg3 type 5
Aug 12 20:55:18 localhost kernel: sr1: Hmm, seems the drive doesn't support multisession CD's
Aug 12 20:55:37 localhost kernel: usb 5-7: usbfs: process 2708 (usb_modeswitch) did not claim interface 0 before use
Aug 12 20:55:37 localhost kernel: usb 5-7: USB disconnect, address 4
Aug 12 20:55:37 localhost kernel: usb 5-7: new high speed USB device using ehci_hcd and address 6
Aug 12 20:55:37 localhost kernel: usb 5-7: New USB device found, idVendor=04e8, idProduct=6889
Aug 12 20:55:37 localhost kernel: usb 5-7: New USB device strings: Mfr=1, Product=0, SerialNumber=0
Aug 12 20:55:37 localhost kernel: usb 5-7: Manufacturer: SAMSUNG ELECTRONICS Co.Ltd.



So the switch happens now, but as you see there's some errors reported,
and unsurprisingly, I'm not able to make it work much further...


So I guess I need to send a second message, perhaps a third as well?

With a better log provided now, someone could perhaps take a look again and come up with some suggestions, I'm kinda lost again and new to this whole thing..


Offline Profile
PostPosted: Thu Aug 12, 2010 11:03 pm
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
You are almost there. For driver binding you need the integration into the automatic workflow.
Don't bother about the libusb debug errors.

Create a new file in "/etc/usb_modeswitch.d" named "04e8:689a". Fill it with the content you figured out. BTW, you can skip the line with the interface number, the default is 0. And TargetClass is only important for devices which do not change the product ID after switching.
Code:
#######################################################
# Samsung GT-B3730

DefaultVendor=  0x04e8
DefaultProduct= 0x689a
TargetVendor=  0x04e8
TargetProductList="6722,6875,6888,6806,6876,6889,6802,6807"

MessageContent= "55534243785634120100000080000601000000000000000000000000000000"
CheckSuccess=10
The success check time depends on how quick the modem re-appears after switching. Huawei and ZTE take several seconds, whereas Option devices return right away.

Now add a line in "/lib/udev/rules.d/40-usb_modeswitch.rules"; it has to go somewhere before the "modeswitch_rules_end" label. The tidiest way is to put it close to the other Samsung line, but it does not matter technically.
Code:
# Samsung GT-B3730
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="689a", RUN+="usb_modeswitch '%b/%k'"
To be on the safe side, run "udevadm control --reload-rules" - and you should be set!

Last, allow me the question where you got all these target product IDs from ? Is this a whole device family ?



Offline Profile
PostPosted: Fri Aug 13, 2010 12:33 am
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
Yes, the ids were picked up from the .inf file that came with the windows driver. :)

I know the default value is redundant, but somehow it's still a bit flakey, and somehow it seemed to
work more often when the value were set (same for target class), really dunno why at all..

But I'll try add the remaining udev rules etc., I just figured that something else magically would give me some better confirmal of things working before having to do so.. ;)

thx for the suggestions :)


Offline Profile
PostPosted: Fri Aug 13, 2010 2:02 am
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
BTW, your sniffing log caught more interfaces than necessary. If you sniff at the one original device, remember to remove the sniffing filters from the others. You really don't need them and they only blur the picture.

Also, the log should end with some lines where one contains "SURPRISE_REMOVAL". That's the point where the original device just vanishes, right after the switch.



Offline Profile
PostPosted: Fri Aug 13, 2010 3:49 am
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
yeah, I know the log is much larger than necessary, but since I had some issues with usbsnoop and getting it to log at the appropriate moment, I just started logging long before when I started the install since it didn't seem to pick up everything when I plugged it in after installing the driver in windows..

Btw. here's an update to the configuration:
http://svn.mandriva.com/cgi-bin/viewvc. ... h?view=log

I noticed that the instability earlier was due to having to wait for scsi device to show up
before inquirying it, otherwise it would end up screw everything up. So the choice
was to either implement an option for waiting before inquiredevice, or just don't.
As just don't would make it switch more reliably right away, I've disabled it. :)

Seems to correctly detect it as a modem now at least, I've yet to test, it had difficulties connecting in windows, so I'm uncertain whether I'm able to connect with it and verify it to work whether it's actually working or not now.. :p


Offline Profile
PostPosted: Fri Aug 13, 2010 8:32 am
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
Ah, yes, I should have told you. The inquiry feature is for manual mode only. The only purpose of it is to help identifying a device if other attributes are not enough for this. So far, the necessity came up for only one device ID - which is used by four completely different and unrelated modems (see the 05c6:1000 config files).

In the automatic mode, the -I option is used per default, and you can of course add it to your manual command line.



Offline Profile
PostPosted: Fri Aug 13, 2010 10:27 am
Posts: 3Joined: Fri Aug 13, 2010 10:22 am
Hi. I have one of these modems too, from Telia in Sweden -- are any other companies using them too?

I'm able to run modeswitch successfully, but I don't see any ttyUSB0 devices so I'm lost at what the next step is to get the modem to work. Any ideas? I've tried loading the ehci_hcd module, but no difference.

Thanks,
/Simon


Offline Profile WWW
PostPosted: Fri Aug 13, 2010 10:55 am
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
Did you apply the changes pointed out in the post above ?

(http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=3089#3089)


Offline Profile
PostPosted: Sat Aug 14, 2010 3:34 pm
Posts: 3Joined: Fri Aug 13, 2010 10:22 am
Josh wrote:
Did you apply the changes pointed out in the post above ?

(http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?p=3089#3089)


Thanks, I must have forgotten to reload udev or something. I've since then rebooted the machine, and now when I insert the device I get this in the kernel log:

Code:
[  808.829058] usb 1-8: new high speed USB device using ehci_hcd and address 9
[  808.988704] usb 1-8: configuration #1 chosen from 1 choice
[  808.994814] option 1-8:1.0: GSM modem (1-port) converter detected
[  808.995051] usb 1-8: GSM modem (1-port) converter now attached to ttyUSB0
[  808.995321] option 1-8:1.1: GSM modem (1-port) converter detected
[  808.995571] usb 1-8: GSM modem (1-port) converter now attached to ttyUSB1


However I can't seem to talk to device using minicom, it doesn't echo anything back. Tried both ttyUSB0 and ttyUSB1. 115200 8N1. I have a Huawei E220 and I can talk fine to it using minicom. Any ideas?

proyvind, did you get the device to work?

/Simon


Offline Profile WWW
PostPosted: Sat Aug 14, 2010 3:49 pm
Site AdminPosts: 4855Joined: Sat Nov 03, 2007 12:30 am
There is no guarantee that the "option" driver is right for a device with class 255 (vendor-specific). Manufacturers can as well create their own protocol which is then supported by their Windows driver.

To be 100% certain, you have to sniff the traffic to the switched device in Windows.

proyvind, did you manage to connect from Linux yet ?



Offline Profile
PostPosted: Tue Aug 24, 2010 7:06 pm
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
Josh, unfortunately not, I haven't really had much chance to look closer into
it either due to lack of time, hardware etc. to test with as I'm kinda in between
places moving etc...

IIRC the log I provided earlier should contain activity with the modem getting online
as well, for anyone who wants to take a closer look at it to determine..


Offline Profile
PostPosted: Wed Aug 25, 2010 7:19 pm
Posts: 1Joined: Wed Aug 25, 2010 7:00 pm
I have a similar dongle. But in my case i see that it enumerates 3 interfaces without having to use the modeswitch. All i had to do was disable the mass storage from mounting (otherwise the device keeps resetting for some reason). I tried the option driver and it didnt work for me. Was also playing around with the ndiswrapper to see if i can get the network adapter to work. That didnt help either. I was using 2.6.33 kernel and here is the lsusb output. Let me know if you make any progress with the driver.


Code:
Bus 001 Device 012: ID 04e8:6876 Samsung Electronics Co., Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04e8 Samsung Electronics Co., Ltd
  idProduct          0x6876
  bcdDevice            0.01
  iManufacturer           1
  iProduct                0
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           78
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      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     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        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0
      iInterface              0
      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     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        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 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               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered


Offline Profile
PostPosted: Mon Sep 06, 2010 11:52 pm
Posts: 18Joined: Thu Aug 12, 2010 3:37 am
I've been succesfully able to communicate with it on /dev/ttyUSB1 now,
but this requires sending messages to the new device after the switch has happened, which usb_modeswitch currently does not support.
To achieve it currently, usb_modeswitch has to be run a second time with the following configuration:

DefaultVendor= 0x04e8
DefaultProduct=0x6889

MessageContent="575004000000002000000000"
MessageContent2="575004000000000200f40000"

So a feature request of mine for the next release would be support for sending messages to the new device. :)

I've not been able to succsfully connect with it quite yet though, I need to investigate further, but at least we're at least one step closer to have it working. :o)


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 8
106 posts
Go to page 1, 2, 3, 4, 5 ... 8  Next
Users browsing this forum: No registered users and 0 guests
Search for:
Post new topic  Reply to topic
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