release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > RockboxUtility > DeviceDetection (r97)

Device Detection

Device Detection

We can detect the type of player that a user has using the USB VID and PID that they identify to the system. To do this, we need to know the VID:PID of all the models Rockbox supports. Since there are conflicts with the usb ids, rbutil also uses other detection methods to detect a device.

Ideas for new Autodetection schemes

The current Autodetection is pretty dumb and needs improvements. So i will try to describe a new better scheme here. Feel free to edit and change.

Start with scanning the USB-IDs of the connected Devices. This can identify all targets where we know the USB-IDs, but as there are devices with duplicate ids, it might give us more then one possible Target for a given USB-ID. At moment it is also not possible to map a USB-ID to a mountpoint on all 3 major OS. But at least it gives us a hint at what targets we have to search for. There might be also Targets without (known) USB-ID, so we have to add those to the list of possible targets.

Next we scan all possible mountpoints and try the following detection methods. The results from this is merged with our list of possible targets.
  • rbutil.log -> detects a target exactly
  • rockbox-info.txt -> duplicate targets possible
  • target-specific files -> duplicate targets possible
  • target-specific folders -> duplicate targets possible
Now we analyse our list of possible targets, and check if all devices are fully detected, ie have only one target name, and exactly one mountpoint. If not, we try the target specific detection methods (ipodpatcher, etc) for the targets where we still need more info. The results are again merged into the list.

Finally we remove those entries from the list which dont have a USB-ID, and are still without other info and present the rest to the user.

Work in progress graph to visualize the possibilities: digraph G { graph [bgcolor="#b6c6e5"]; start -> usb [label="no mountpoint,\n 1..n devices" fontsize=8] usb -> mountpoints [label="1..n possible mountpoints,\n 1..n devices" fontsize=8]

mountpoints -> ipodpatcher [label="1 mountpoint,\n 1 device,\n ipod only" fontsize=8 color=yellow] mountpoints -> sansapatcher [label="1 mountpoint\n 1 device\n sansa only" fontsize=8 color=yellow] mountpoints -> "rockbox-info.txt" [label="1 mountpoint\n 1..n devices\n only if already installed", fontsize=8, color=yellow] mountpoints -> "rbutil.log" [label="1 mountpoint,\n 1 device,\n only if already installed" fontsize=8 color=yellow] mountpoints -> "player-specific files" [label="1 mountpoint,\n 1 device\n not always working" fontsize=8 color=yellow]

"rockbox-info.txt" -> end [color=yellow] "rbutil.log" -> end [label="unique match" color=yellowgreen, fontsize=8] ipodpatcher -> end [label="ipods only", color=yellowgreen, fontsize=8] sansapatcher -> end [label="sansas only\n (not e200r)", color=yellowgreen, fontsize=8] "player-specific files" -> end [label="only a few players,\nnot reliable", color=yellowgreen, fontsize=8]

start [shape=box, style=filled, color=red] sansapatcher [shape=box, color=orange, style=filled] ipodpatcher [shape=box, color=orange, style=filled] "rbutil.log" [shape=box,style=filled,color=yellowgreen] "player-specific files" [shape=box,style=filled,color=yellowgreen] end [shape=box,style=filled,color=green] }

Detection methods

Here is a list of all currently known detection methods. The best way to combine them has still to be found.
method works uniqueness problems
general detection methods
USB IDs always 1..n some USB IDs are used by several players. Requires maintaining a list of USB IDs, targets with unknown IDs can't get detected.
rbutil.log if Rockbox has previously been installed - unless device is a USB memory stick containing a backup of a rockbox installation 1 result is unique.
rockbox-info.txt if Rockbox has previously been installed - unless device is a USB memory stick containing a backup of a rockbox installation 1..n result isn't unique as Rockbox Utility knows about more targets than configure, which creates rockbox-info.txt (f.e. X5 vs. X5V).
target-specific detection methods
player-specific files only on some devices 1..n unique on some players, not unique on others ( iPod_Contol is not unique while ajbrec.ajz is). Might be useable to rule out targets (though this will fail if the OF is missing).
ipodpatcher only ipods 1 unique for ipods. Needs raw disk access. Works only if only a single ipod is connected.
sansapatcher only sansas 1 unique for sansas. Needs raw disk access. Doesn't detect e200r. Doesn't work if multiple sansas connected.

Device-specific detection

Here's a table of detection methods for the different devices. Items in Red are at the moment not possible to detect.
Modelname Filename / Detectionmethod Already used in rbutilqt
All Models .rockbox/rockbox-info.txt (if it exists) DONE can't distinguish between X5 / X5V
All Models rbutil log file (if it exists) DONE
Apple
All Ipods ipodpatcher / usb ids DONE video64mb will be detected as video - since Release 3.7 this is fine since we have a single unified build now
Archos
Ondio 128 FM ondiost.bin DONE
Ondio 128 SP ondiosp.bin DONE
Jukebox Player archos.mod DONE
Recorder V1 ajbrec.ajz DONE
Recorder FM ajbrec.ajz DONE
Recorder V2 ajbrec.ajz DONE
Cowon
iAudio X5, X5L usb ids DONE
iAudio X5V usb ids ALERT! USB ID unknown, might be the same as X5 (and thus detected as X5)
iAudio M5, M5L usb ids DONE
iAudio M3, M3L usb ids DONE
Iriver
H100 usb ids DONE
H120, H140 usb ids DONE
H320, H340 usb ids DONE
H10 20GB usb ids DONE
H10 5,6GB MTP usb ids DONE
H10 5,6GB UMS usb ids DONE
Sandisk
Sansa e200 sansapatcher / usbids DONE
Sansa e200r - ALERT!
Sansa c200 sansapatcher DONE
Toshiba
Gigabeat F Series, X Series GBSYSTEM/ DONE
Olympus
m.robe 100 usb ids DONE
Packard Bell
Vibe 500 usb ids DONE

Please help me to fill in the blanks. If you have a idea to detect a device (all red device cant be detected at moment), write it here.

USB IDs

Here's a table of USB IDs. Items in Red are duplicates.

VID PID Model name
Apple
05ac 1201 3G
05ac 1203 Color (4G)??? / Mono (4G)
05ac 1204 Color (4G)
05ac 1205 Mini (First Generation)
05ac 1205 Mini (Second Generation)
05ac 1209 Video (5G and 5.5G (32MB / 64MB))
05ac 120a Nano (First Generation)
05ac 1260 Nano (Second Generation)
05ac 1240 Nano (Second Generation; DFU Mode)
05ac 1262 Nano (Third Generation)
05ac 1263 Nano (Fourth Generation)
05ac 1255 Nano (Fourth Generation; DFU Mode)
05ac 1265 Nano (Fifth Generation)
05ac 1266 Nano (Sixth Generation)
05ac 1267 Nano (Seventh Generation)
05ac 1261 Classic (6th Generation)
Archos
058f 9330 Ondio 128 FM (actually Alcor Micro)
058f 9330 Ondio 128 SP
05ab 0031 Jukebox Player (actually In-System Design)
05ab 0031 Recorder V1 (USB1.1 models)
05ab 0060 Recorder V1 (USB2.0 models) (actually In-System Design)
05ab 0060 Recorder FM
05ab 0060 Recorder V2
Creative
041e 4133 Creative Zen series (Removable Disk Mode)
041e 4151 Creative Zen Vision:M (MTP)
041e 4150 Creative Zen V (MTP)
041e 4152 Creative Zen V Plus (MTP)
066f 3600 Creative Zen V (HW recovery mode)
041e 4157 Creative ZEN (MTP)
041e 4128 Creative NOMAD Jukebox Zen Xtra (MTP)
041e 4111 Dell Digital Jukebox (First Generation, MTP)
041e 412f Dell Digital Jukebox (Second Generation, MTP)
Cowon
0e21 0500 iAudio M3
0e21 0510 iAudio X5, Subpack USB port
0e21 0513 iAudio X5, Side USB port
0e21 0520 iAudio M5(L), Side USB port
0e21 0751 iAudio 7 (MTP mode)
0e21 0800 Cowon D2 (UMS/MSC mode)
0e21 0801 Cowon D2 (MTP mode)
0e21 0860 Cowon D2+ (FW 2.xx, UMS/MSC mode)
0e21 0861 Cowon D2+ (FW 2.xx, MTP mode)
0e21 0870 Cowon D2+ DAB (FW 4.xx, UMS/MSC mode)
0e21 0871 Cowon D2+ DAB (FW 4.xx, MTP mode)
0e21 0880 Cowon D2+ (FW 3.xx, UMS/MSC mode)
0e21 0881 Cowon D2+ (FW 3.xx, MTP mode)
0e21 0890 Cowon D2+ DMB (FW 1.xx, UMS/MSC mode)
0e21 0891 Cowon D2+ DMB (FW 1.xx, MTP mode)
Ingenic
601A 4740 Jz4740-based players (USB Boot mode)
Iriver
1006 3001 H100
1006 3002 H120, H140
1006 3003 H320, H340
1006 3004 "H300 Series MTP" (never heard of that)
4102 1007 iFP 700 series
4102 2002 H10 6GB UMS
4102 2101 H10 20GB MTP
0b70 00ba H10 20GB MTP (UMS mode)
4102 2102 H10 5GB MTP
4102 2105 H10 5,6GB MTP
Meizu
0419 0141 M6 SP (DFU mode)
0419 0141 M3 (DFU mode)
0419 0145 M6 SL (DFU mode)
0492 0140 M3 (MSC mode)
Olympus
07b4 0280 m:robe 100
07b4 0281 m:robe 500
Onda
07C4 A4A5 Onda VX747(+) (vendor identified as Datafab Systems, Inc.)
07C4 A4A5 Onda VX767
07C4 A4A5 Onda VX777
Packard Bell
0409 8039 Vibe 500 MTP
0409 8038 Vibe 500 UMS
Philips
0471 014F GoGear SA9200
0471 014B GoGear HDD6330
Rio
045a 5210 Rio Karma (vendor identified as SONICblue, Inc.)
Samsung
04e8 5023 Samsung YH-820
04e8 5022 Samsung YH-920
04e8 501d Samsung YH-920 "Napster Edition"
04e8 5024 Samsung YH-925
Sandisk
0781 7450 Sansa c200 MTP
0781 7451 Sansa c200 UMS
0781 7452 Sansa c200v2 MTP
0781 7453 Sansa c200v2 UMS
0781 0720 Sansa c2x0 Recovery mode
0781 7420 Sansa e200 MTP
0781 7421 Sansa e200 UMS/MSC
0781 0729 Sansa e200 in Recovery Mode
0781 7422 Sansa e200v2 MTP
0781 7423 Sansa e200v2 UMS/MSC
0781 7432 Sansa Clip Autodetect / MTP
0781 7433 Sansa Clip MSC
0781 7434 Sansa Clip V2 Autodetect / MTP
0781 7435 Sansa Clip V2 MSC
0781 7480 Sansa Connect (Normal Connection)
0781 7481 Sansa Connect in Recovery Mode
0781 7400 Sansa m200-tcc (UMS/MSC)
0781 7401 Sansa m200-tcc (MTP)
0781 7430 Sansa m240
0781 7430 Sansa m200v4 (MTP)
0781 7431 Sansa m200v4 (MSC)
0781 74b1 Sansa View
0781 74c0 Sansa Fuze (MTP)
0781 74c1 Sansa Fuze (MSC)
0781 74e1 Sansa Fuze+ (MSC)
066f 3780 Sansa Fuze+ (i.MX233/STMP3780 hardware recovery mode)
0781 74e4 Sansa Clip Zip (Autodetect / MTP)
0781 74e5 Sansa Clip Zip (MSC)
Telechips
140e b011 TCC780X-based players (USB Boot mode)
140e b021 TCC77X-based players (USB Boot mode)
Toshiba
0930 0005 Gigabeat MEG50JS, UMS
0930 0009 Gigabeat F Series, X Series in UMS Mode
0930 000C Gigabeat F Series in MTP Mode (X Series unverified)
0930 0010 Gigabeat S Series MTP (No UMS mode)
0930 0014 Gigabeat V Series, MTP
0930 0019 Gigabeat T Series, MTP (No UMS mode)

Finding USB IDs

In Windows

Please help me to fill in the blanks. Attach your device to your Windows computer and run usbids from a Windows command line to get a list of devices and their IDs attached to your system. Use the Device Manager to figure out which device is your USB disk, and edit the table above.

In Linux

Linux users can use 'lsusb' or in the /sys/devices tree as follows:

After you plug in the device, you should see a line in syslog similar to this:

scsi.agent[31802]: disk at /devices/pci0000:00/0000:00:10.3/usb1/1-4/1-4:2.0/host3/target3:0:0/3:0:0:0

Looking in /sys/devices/pci0000:00/0000:00:10.3/usb1/1-4/ you'll see a group of pseudofiles. Among them are 'idProduct' and 'idVendor', those are the ID numbers listed here.
Edit | Attach | Print version | History: r98 < r97 < r96 < r95 | Backlinks | View wiki text | More topic actions...
r97 - 22 Oct 2012 - 18:50:22 - DominikRiebeling
Copyright by the contributing authors.