[Coco] PING the 2 or 3 people in the world who use my incomplete EmCee server for Linux

Juan Castro jccyc1965 at gmail.com
Tue Oct 29 20:10:45 EDT 2013


Serial programming: I was doing it wrong. There were many
configuration bits (for the tcsetattr() syscall) I was leaving
uninitialized, which was causing all sorts of unpredictable behaviors.
Namely, everything worked in Ubuntu but not in CentOS, in the same
machine. Bytes would sometimes come wrong, sometimes go wrong,
sometimes work for a couple dozen packets then stop... drove me
insane.

And gcc's -Wall option was kind enough NOT to warn me of that
condition, the f***er. Well, I finally found the error and corrected
it. Chances are, if you at one time tested it and angrily tossed it
aside because it didn't work, now it will. Download it here:

https://www.dropbox.com/sh/ugqjjrz1afaz1eh/qylL_L_QUp/emceed.c

Compile it with

gcc -Wall -o emceed emceed.c

And run it with

./emceed /dev/ttyS0

Or whatever your serial port's device name is.

Juan



More information about the Coco mailing list