ULi M920x firmware: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 33: Line 33:
== Usbmon ==
== Usbmon ==



m920x_parse (arguments -i um -m fw)
1. patch linux/drivers/usb/mon/mon_text.c with http://www.rasterburn.org/~aet/m920x/usbmon_ext.diff
2. make sure you have CONFIG_USB_DEVICEFS, CONFIG_USB_MON and CONFIG_DEBUG_FS selected in your kernel config
3. install windows and drivers
4. rmmod ehci_hcd (vmware might freak out your computer otherwise)

You will probably need these and probably some more to get usbmon
working: (look up with google)
mount -t debugfs none_debugs /sys/kernel/debug
modprobe usbmon
mount -t usbfs none /proc/bus/usb
chmod -R a+rw /proc/bus/usb (needed by vmware. security!!)

Look at /proc/bus/usb/devices to find in which bus you device is in.
cat /sys/kernel/debug/usbmon/<b>n</b>t to a file (n is the bus number).
Finally pass this file to m920x_parse (arguments -i um -m fw)


== Snoopypro ==
== Snoopypro ==

Revision as of 06:56, 18 June 2007

You can get it either with usbsnoop or snoopypro under Windows. See http://www.linuxtv.org/pipermail/linux-dvb/2006-November/014682.html if you want to use usbmon with vmware player.

Firmware will be sent as soon as you plug in the device, so you should not start any programs. Sticks with remote controller might have program called Uremote.exe (or similar) running. If you do, please shut it down so that it doesn't cause traffic in logs.

m920x firmware consists of a number of 64 byte long usb control messages. After these control messages you will see another control message with request, value, index of M9206_CORE(0x22), 0x01, M9206_FW_GO(0xff69), respectively.

After usb device receives this message, it will disconnect itself from the bus and appear again with (possibly) different idVendor and idProduct. These new ids are known as warm ids. At very least you will see your device having new endpoints that will be used to transmit data.

It's important to have Usbsnoop or Snoopypro installed and logging before you plug in the device. It might take several attempts to get a dump where this firmware is visible.

After acquiring a log with firmware, you will need to process it with various tools.


Usbsnoop

First with parser.pl and then with m920x_parse (arguments -i us -m fw)

Usbmon

1. patch linux/drivers/usb/mon/mon_text.c with http://www.rasterburn.org/~aet/m920x/usbmon_ext.diff 2. make sure you have CONFIG_USB_DEVICEFS, CONFIG_USB_MON and CONFIG_DEBUG_FS selected in your kernel config 3. install windows and drivers 4. rmmod ehci_hcd (vmware might freak out your computer otherwise)

You will probably need these and probably some more to get usbmon working: (look up with google) mount -t debugfs none_debugs /sys/kernel/debug modprobe usbmon mount -t usbfs none /proc/bus/usb chmod -R a+rw /proc/bus/usb (needed by vmware. security!!)

Look at /proc/bus/usb/devices to find in which bus you device is in. cat /sys/kernel/debug/usbmon/nt to a file (n is the bus number). Finally pass this file to m920x_parse (arguments -i um -m fw)

Snoopypro

m920x_sp_firmware can only read data in this format: http://www.roback.cc/projects/iRiver/howto/snoopypro/wordpad_saved.png

Useful scripts