Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Samsung GT-B3730 4G LTE Dongle

Post by proyvind » 12 Aug 2010, 03:54

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: Select all

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

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

Post by Josh » 12 Aug 2010, 09:24

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.


proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Post by proyvind » 12 Aug 2010, 21:02

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..

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

Post by Josh » 12 Aug 2010, 23:03

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: Select all

####################################################### 
# 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: Select all

# 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 ?


proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Post by proyvind » 13 Aug 2010, 00:33

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 :)

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

Post by Josh » 13 Aug 2010, 02:02

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.


proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Post by proyvind » 13 Aug 2010, 03:49

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

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

Post by Josh » 13 Aug 2010, 08:32

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.


jas
Posts: 3
Joined: 13 Aug 2010, 10:22
Contact:

Modeswitch works, what's next?

Post by jas » 13 Aug 2010, 10:27

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

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

Post by Josh » 13 Aug 2010, 10:55

Did you apply the changes pointed out in the post above ?

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

jas
Posts: 3
Joined: 13 Aug 2010, 10:22
Contact:

Post by jas » 14 Aug 2010, 15:34

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: Select all

[  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

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

Post by Josh » 14 Aug 2010, 15:49

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 ?


proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Post by proyvind » 24 Aug 2010, 19:06

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..

gvse
Posts: 1
Joined: 25 Aug 2010, 19:00

Post by gvse » 25 Aug 2010, 19:19

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: Select all

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

proyvind
Posts: 18
Joined: 12 Aug 2010, 03:37

Post by proyvind » 06 Sep 2010, 23:52

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)

Post Reply