|
Activation Codes and Methods, Hardware Details, Sniffing
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 10 Jan 2015, 18:51
Perhaps I should have wrote this post here instead of on askubunutu but
http://askubuntu.com/questions/572167/h ... modeswitch
Code: Select all T: Bus=02 Lev=02 Prnt=25 Port=00 Cnt=01 Dev#= 29 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0fe6 ProdID=9702 Rev=01.01
S: Product=USB 2.0 10/100M Ethernet Adaptor
S: SerialNumber=00002550
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=122mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I: If#= 1 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none)
Code: Select all lsusb -d 0fe6:9702
Bus 002 Device 029: ID 0fe6:9702 Kontron (Industrial Computer Source / ICS Advent)
creating a config file with the below
Code: Select all sudo gedit /etc/usb_modeswitch.d/0fe6:9702
and then this into the file
Code: Select all DefaultVendor = 0x0ef6
DefaultProduct = 0x9702
MessageEndpoint = 0x05
MessageContent = "55534243d042e80200000000000006000000000000000000000000000000"
still working on binding it to a driver, but this is what my dmesg looks like now, i'm guessing that's correct
Code: Select all [ 85.972441] usb 2-3.1: new full-speed USB device number 9 using xhci_hcd
[ 86.061544] usb 2-3.1: New USB device found, idVendor=0fe6, idProduct=9702
[ 86.061556] usb 2-3.1: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[ 86.061563] usb 2-3.1: Product: USB 2.0 10/100M Ethernet Adaptor
[ 86.061568] usb 2-3.1: SerialNumber: 00002550
[ 86.062548] usb-storage 2-3.1:1.0: USB Mass Storage device detected
[ 86.062909] scsi7 : usb-storage 2-3.1:1.0
[ 87.060246] scsi 7:0:0:0: CD-ROM Supereal VR DISK 1.00 PQ: 0 ANSI: 0
[ 87.061163] sr0: scsi3-mmc drive: 126x/126x writer cd/rw xa/form2 tray
[ 87.061492] sr 7:0:0:0: Attached scsi CD-ROM sr0
[ 87.061683] sr 7:0:0:0: Attached scsi generic sg1 type 5
[ 87.110676] scsi 7:0:0:0: rejecting I/O to offline device
[ 87.110684] scsi 7:0:0:0: killing request
[ 87.124643] systemd-udevd[3526]: Failed to apply ACL on /dev/sr0: No such file or directory
[ 87.124651] systemd-udevd[3526]: Failed to apply ACL on /dev/sr0: No such file or directory
[ 87.128373] systemd-udevd[3526]: Failed to apply ACL on /dev/sr0: No such file or directory
[ 87.128382] systemd-udevd[3526]: Failed to apply ACL on /dev/sr0: No such file or directory
[ 90.120668] usb 2-3.1: USB disconnect, device number 9
https://infotomb.com/w61ey - eth.pcap usb sniff
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 15 Jan 2015, 13:31
I assume you did the capture under linux and that is not of any help, you need to do the capture under windows (XP preferably) so you can catch the command the windows driver uses for switching the device.
Set capture filter to vendor id (VID) 0x0fe6 and product id (PID) 9702 and let the capture run until it stops by itself due to "surprise device removal" which is what will happen after the windows driver has sent the switch message.
One of the last lines in the end of the capture log will be the mode switching cmd.
This ethernet dongle should probably get the usb id 0fe6:9700 after switching..
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 15 Jan 2015, 21:43
The first thing to try with a new/unknown device is the "StandardEject" procedure which works with at least 50 percent of all devices. I would always check this before even starting to sniff.
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 17 Jan 2015, 00:35
I didn't have a winxp install available, still don't but will work on asap. Used virtuabox with win7 and usbpcap to sniff and then went through the pcap until I found a string that looked simular to the examples in the deviceslist.txt to come up with messagecontent and device endpoint
somewhere along troubleshooting I seam to have started up another problem and the device isnt acting like it used to, it seams the system is having a few unusal after effects at the moment, virutalbox keeps on locking up, bluetooth is crashing frequently, and when I plug in the ethernet to usb adaptor it gives the output below.
dmesg
Code: Select all [ 2515.422997] usb 2-3.2: USB disconnect, device number 10
[ 2517.923668] usb 2-3.2: new full-speed USB device number 12 using xhci_hcd
[ 2518.012708] usb 2-3.2: New USB device found, idVendor=0fe6, idProduct=9702
[ 2518.012713] usb 2-3.2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[ 2518.012716] usb 2-3.2: Product: USB 2.0 10/100M Ethernet Adaptor
[ 2518.012718] usb 2-3.2: SerialNumber: 00002550
[ 2519.043016] init: usb-modeswitch-upstart main process (7524) terminated with status 1
[ 2614.939281] usb 2-3.2: usbfs: process 7554 (usb_modeswitch) did not claim interface 0 before use
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 17 Jan 2015, 00:51
resintalled usb_modeswitch and ndiswrapper then sudo usb_modeswitch -v 0fe6 -p 9702 -W -I -K
the device isn't picked up ast a 9700 (which would be nice) or isn't picked up by any drivers that might work with it
Code: Select all [ 77.127462] usb 2-3.1: new high-speed USB device number 6 using xhci_hcd
[ 77.762645] usb 2-3.1: New USB device found, idVendor=05dc, idProduct=a813
[ 77.762656] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 77.762661] usb 2-3.1: Product: USB Flash Drive
[ 77.762666] usb 2-3.1: Manufacturer: Lexar
[ 77.762670] usb 2-3.1: SerialNumber: AANYTN0KQOC2VWQN
[ 77.763054] usb 2-3.1: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 77.763084] usb 2-3.1: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 77.817106] usb-storage 2-3.1:1.0: USB Mass Storage device detected
[ 77.817213] scsi4 : usb-storage 2-3.1:1.0
[ 77.817405] usbcore: registered new interface driver usb-storage
[ 77.820358] usbcore: registered new interface driver uas
[ 79.822792] scsi 4:0:0:0: Direct-Access Lexar USB Flash Drive 1100 PQ: 0 ANSI: 0 CCS
[ 79.823634] sd 4:0:0:0: Attached scsi generic sg1 type 0
[ 81.177040] sd 4:0:0:0: [sdb] 15663104 512-byte logical blocks: (8.01 GB/7.46 GiB)
[ 81.177685] sd 4:0:0:0: [sdb] Write Protect is off
[ 81.177692] sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 00
[ 81.178307] sd 4:0:0:0: [sdb] No Caching mode page found
[ 81.178312] sd 4:0:0:0: [sdb] Assuming drive cache: write through
[ 82.064665] sdb: sdb1 sdb2
[ 82.068774] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[ 82.231033] FAT-fs (sdb1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ 82.438591] systemd-hostnamed[3241]: Warning: nss-myhostname is not installed. Changing the local hostname might make it unresolveable. Please install nss-myhostname!
[ 103.517922] usb 2-3.2: new full-speed USB device number 7 using xhci_hcd
[ 103.607061] usb 2-3.2: New USB device found, idVendor=0fe6, idProduct=9702
[ 103.607066] usb 2-3.2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[ 103.607069] usb 2-3.2: Product: USB 2.0 10/100M Ethernet Adaptor
[ 103.607071] usb 2-3.2: SerialNumber: 00002550
[ 103.607686] usb-storage 2-3.2:1.0: USB Mass Storage device detected
[ 103.609781] scsi5 : usb-storage 2-3.2:1.0
[ 104.611546] scsi 5:0:0:0: CD-ROM Supereal VR DISK 1.00 PQ: 0 ANSI: 0
[ 104.612817] sr0: scsi3-mmc drive: 126x/126x writer cd/rw xa/form2 tray
[ 104.612821] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 104.613054] sr 5:0:0:0: Attached scsi CD-ROM sr0
[ 104.613182] sr 5:0:0:0: Attached scsi generic sg2 type 5
[ 104.663876] xhci_hcd 0000:00:14.0: WARN Event TRB for slot 6 ep 8 with no TDs queued?
[ 105.165855] ISO 9660 Extensions: Microsoft Joliet Level 3
[ 105.184620] ISOFS: changing to secondary root
[ 105.237509] init: ureadahead-other main process (3397) terminated with status 2
[ 196.154972] usb 2-3.2: usbfs: process 4888 (usb_modeswitch) did not claim interface 0 before use
uname@host:~$ ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:372 errors:0 dropped:0 overruns:0 frame:0
TX packets:372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:50162 (50.1 KB) TX bytes:50162 (50.1 KB)
wlan0 Link encap:Ethernet HWaddr b8:ee:65:86:04:31
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::baee:65ff:fe86:431/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1995 errors:0 dropped:0 overruns:0 frame:0
TX packets:1576 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1889598 (1.8 MB) TX bytes:495105 (495.1 KB)
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 17 Jan 2015, 01:33
Drop the "-I" parameter, it may disturb things.
Also, what is the output of the manual usb_modeswitch run? I'd like to see it in full.
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 18 Jan 2015, 05:06
This is what I'm getting right now.
Code: Select all usb_modeswitch -v 0fe6 -p 9702 -W -K
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.2.0 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x0fe6
DefaultProduct= 0x9702
StandardEject=1
NeedResponse=0
Look for default devices ...
found USB ID 03eb:8c18
found USB ID 0cf3:3004
found USB ID 8087:8000
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 5986:0558
found USB ID 5986:0557
found USB ID 04f3:0743
found USB ID 05e3:0608
found USB ID 0fe6:9702
vendor ID matched
product ID matched
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 044 on bus 002
libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device /dev/bus/usb/002/044: Permission denied
libusbx: error [_get_usbfs_fd] libusbx requires write access to USB device nodes.
Error opening the device. Abort
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 18 Jan 2015, 05:19
dmesg
Code: Select all [13525.759800] usb 2-2: new full-speed USB device number 47 using xhci_hcd
[13525.888884] usb 2-2: New USB device found, idVendor=0fe6, idProduct=9702
[13525.888892] usb 2-2: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[13525.888895] usb 2-2: Product: USB 2.0 10/100M Ethernet Adaptor
[13525.888899] usb 2-2: SerialNumber: 00002550
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 18 Jan 2015, 12:01
I quote a paragraph from the usb_modeswitch main documentation (see link at the top):
Important: USB_ModeSwitch - like all programs using libusb - has to be run as root (or with "sudo") when calling it manually. Otherwise strange error messages turn up and things won't work. When trying out switching commands and strategies, it's probably easier to work at a root shell for a while ("sudo bash" or "su -").
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 19 Jan 2015, 05:03
Code: Select all DefaultVendor= 0x0fe6
DefaultProduct= 0x9702
StandardEject=1
NeedResponse=0
Look for default devices ...
found USB ID 03eb:8c18
found USB ID 0cf3:3004
found USB ID 8087:8000
found USB ID 1d6b:0002
found USB ID 1d6b:0003
found USB ID 5986:0558
found USB ID 5986:0557
found USB ID 04f3:0743
found USB ID 05e3:0608
found USB ID 0fe6:9702
vendor ID matched
product ID matched
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 007 on bus 002
Current configuration number is 1
Use interface number 0
Use endpoints 0x05 (out) and 0x84 (in)
USB description data (for identification)
-------------------------
Manufacturer: not provided
Product: USB 2.0 10/100M Ethernet Adaptor
Serial No.: 00002550
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
No active driver found. Detached before or never attached
Set up interface 0
Use endpoint 0x05 for message sending ...
Trying to send message 1 to endpoint 0x05 ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x05 ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Reset response endpoint 0x84
Reset message endpoint 0x05
-> Run lsusb to note any changes. Bye!
oopsifc
-
Josh
- Site Admin
- Posts: 6577
- Joined: 03 Nov 2007, 00:30
Post
by Josh » 19 Jan 2015, 09:10
skweek wrote:oopsifc
I don't understand that.
Have you run "lsusb" again as indicated after the successful usb_modeswitch termination? Any changes?
In any case, please post the complete output of "lsusb -v -d 0fe6:9702" after inserting the device.
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 25 Mar 2015, 23:17
It was just a fat finger
Code: Select all ~/Desktop$ lsusb -v -d 0fe6:9702
Bus 002 Device 029: ID 0fe6:9702 Kontron (Industrial Computer Source / ICS Advent)
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0fe6 Kontron (Industrial Computer Source / ICS Advent)
idProduct 0x9702
bcdDevice 1.01
iManufacturer 0
iProduct 2
iSerial 3
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 69
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 122mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 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 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 0 (Defined at Interface level)
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 0x0040 1x 64 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 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 1
-
bmork
- Posts: 167
- Joined: 15 Mar 2012, 22:47
- Location: Oslo, Norway
Post
by bmork » 26 Mar 2015, 12:37
skweek wrote:Perhaps I should have wrote this post here instead of on askubunutu but
http://askubuntu.com/questions/572167/h ... modeswitch
Code: Select all T: Bus=02 Lev=02 Prnt=25 Port=00 Cnt=01 Dev#= 29 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0fe6 ProdID=9702 Rev=01.01
S: Product=USB 2.0 10/100M Ethernet Adaptor
S: SerialNumber=00002550
C: #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=122mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I: If#= 1 Alt= 0 #EPs= 3 Cls=00(>ifc ) Sub=00 Prot=00 Driver=(none)
This looks a bit psychotic since a 00 class never makes sense at the interface level, and certainly not for a composite device like this one...
But anyway, based on the vendor ID my guess is that this is a slightly different version of the "CoreChip-sz SR9700" ethernet device, for which there is no less than 2 drivers in the kernel (I have no idea why, and which one is best):
Code: Select all bjorn@nemi:/usr/local/src/git/linux$ git grep 0fe6 drivers/net/
drivers/net/usb/dm9601.c: USB_DEVICE(0x0fe6, 0x8101), /* DM9601 USB to Fast Ethernet Adapter */
drivers/net/usb/dm9601.c: USB_DEVICE(0x0fe6, 0x9700), /* DM9601 USB to Fast Ethernet Adapter */
drivers/net/usb/sr9700.c: USB_DEVICE(0x0fe6, 0x9700), /* SR9700 device */
drivers/net/usb/sr9800.c: USB_DEVICE(0x0fe6, 0x9800), /* SR9800 Device */
You could add the device ID to one, or all, of these drivers, and see if that works. If not, then I'm afraid you'll have to go and dig up the datasheet and figure out what differences there are and how to make one of the drivers support your device.
You'll unfortunately have to modify and rebuild the drivers to test a new device ID. The "new_id" method won't work with them because they require a non-zero .driver_info field.
-
skweek
- Posts: 9
- Joined: 10 Jan 2015, 18:23
Post
by skweek » 03 Oct 2015, 23:06
I would give that a try, I'm not sure how though. Any suggestions?
-
LOM
- Posts: 1404
- Joined: 11 Jul 2012, 15:14
- Location: Koh Samui, TH
Post
by LOM » 04 Oct 2015, 07:06
skweek wrote:I would give that a try, I'm not sure how though. Any suggestions?
Seeing your lsusb interface list I retract what I wrote about switching the device and do instead agree with what bmork wrote.
Your lsusb listing did also show that this is a USB 1.1 device which means a max USB speed of 12Mbps so a 100MBps ethernet speed is not to think of.
You can read another users experience with this or a very similar device from the same company:
http://gfdsa.gfdsa.org/2013/05/14/usb-e ... nt-to-buy/
and you can get some hint of what you should have bought (Asix or MosChip based) here:
https://olimex.wordpress.com/2012/09/18 ... onverters/
What you have is some old crap so do yourself a favor and throw it in the waste basket, it is not worth the effort trying to get it working when a good one is only $5.
|
|