(See update below)
I'm trying to get a serial device working on my linux (debian) system. On the internet, I found these rules for the communication:
- Transmit a break time, which is a logical "0" lasting for 88 microseconds. On a microcontroller you can usually do this by temporarily setting the baud rate to 96KBaud, then transmit a "0" byte.
- Then transmit a startcode of "0" (returning the baud rate to 250KBaud).
- Then transmit up to 512 8-bit channel level bytes
Now I'm not quite sure how to implement that. My version:
stty -F /dev/ttyS0 96000
echo 0 > /dev/ttyS0
stty -F /dev/ttyS0 250000
echo 0ggg > /dev/ttyS0
Now, that doesn't work. (The device's data-LED is on when I run the script.) With stty I couldn't set the baud-rates to the 96k and 250k as written in the specifications (Error message: stty: invalid argument ,,96000"). BTW: Changing to 9600 and others does work!
How would you implement these specifications?
Could anybody help me, please?
(Sorry for my english)
UPDATE 07-24-07 06:02 PM
Ok I think I could fix the baud-problems on my own. But now I should write single bits to the serial port. Is this possible using bash?