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



Wiki > Main > DeviceDetection (compare)

Difference: DeviceDetection (r98 vs. 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.

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

ModelnameFilename / DetectionmethodAlready 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.

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

r98 - 22 Oct 2013 - 11:48:06 - HaydenPearce

Revision r98 - 22 Oct 2013 - 11:48 - HaydenPearce
Revision r97 - 22 Oct 2012 - 18:50 - DominikRiebeling
Copyright by the contributing authors.