On Tue, Aug 23, 2011 at 1:57 PM, Kristian Amlie kristian@amlie.name wrote:
I was not able to to use 31250 baud as you suggested. However, I tried 38400 baud, and that seemed to work. I got a small number of bytes everytime I pressed a key on the instrument.
Using the following command line:
$ cu -s 38400 -l /dev/ttyUSB0 | hexdump -C
and pressing the same key repeatedly with the same force, I got the following output:
00000000 18 f9 ff 18 03 f8 18 f9 ff 18 01 f8 18 f9 ff 18 |................| 00000010 01 f8 18 fb ff 18 01 f8 18 fb ff 18 01 f8 18 fb |................| 00000020 ff 18 03 f8 18 f9 ff 18 01 f8 18 fb ff 18 01 f8 |................| 00000030 18 fb ff 18 01 f8 18 fb ff 18 01 f8 07 43 6f 6e |.............Con| 00000040 6e 65 63 74 65 64 2e 0a 07 43 6f 6e 6e 65 63 74 |nected...Connect| 00000050 65 64 2e 0a 0a 07 44 69 73 63 6f 6e 6e 65 63 74 |ed....Disconnect| 00000060 65 64 2e 0a |ed..| 00000064
That hexdump reads as "Connected....Disconnected". Are you sure you get useful data from cu?
If you are certain about this, I would recommend you add some debug printk() into drivers/usb/serial/ftdi_sio.c and trace what values the functions change_speed() and update_mctrl() pass to usb_control_msg() when the device is connected and cu is started. Once we have this information, I can prepare a patch to add the control messages to the MIDI driver.
Daniel