From: Bernard L. <le...@bo...> - 2003-03-13 22:50:39
|
Hi all, Seems I was a little hasty with the latest patch. Today I had a look at building the serial drivers to try out the remote control and the piezo. After about 1/2 of reading and 1/2 testing I had something working! This is why I really like Linux! Anyhow I've just checked into CVS the code to get the serial ports working. /dev/ttyS0 is the remote control. if you type "stty -F /dev/ttyS0 raw" and then "cat /dev/ttyS0" and then press a button on the remote control you should see output. The data appears as so: 0xff 0xfd 0xf1 0x00 and repeats until you release the key when you get 0xff 0xfd 0xf0 0x00 the 0xf1 part varies on the key pressed. 0xf1 -> play/pause 0xf2 -> volume up 0xf3 -> volume down 0xf4 -> fast foward 0xf5 -> rewind You can't write to this this serial port and expect anything good to come from it. /dev/ttyS1 is connected to the piezo. dd if=/dev/zero of=/dev/ttyS0 count=10 bs=1 should produce some noise. if=/dev/urandom should produce a different noise. stty -F /dev/ttyS1 speed 19200 will also change the noise. Now does anyone know of a portable serial keyboard that works with only a TX line? :) enjoy, bern. |