From: Dave H. <dhy...@gm...> - 2012-01-16 18:22:45
|
Hi, On Thu, Jan 12, 2012 at 12:56 AM, sac <sch...@ya...> wrote: > > Hi all, > > Background > I m working on a gumstix-connex 400xm alongwith a tweener. I've connected the > connex to my laptop on via ethernet port and having access via ssh. > Now, through its serial port (ttyS2), the gumstix is communicating to a device > successfully. the device is to send an "M" signal on the serial port at some > occurence. > Problem > I want connex to constantly look for that signal on serial port and consequently > set a GPIO, which i shall use to blink any LED. > Please help! The serial port is pretty much the same as for all linux serial ports. You can read about serial port programming http://tldp.org/HOWTO/Serial-Programming-HOWTO/ I wrote a sample program which you can find here: http://svn.hylands.org/host/sertest/ It read from the serial port and writes to stdout, and whatever it reads from stdin it send out the serial port, in effect acting like a super-simple terminal emulator. You can readup about GPIOs over here: http://wiki.gumstix.org/index.php?title=GPIO -- Dave Hylands Shuswap, BC, Canada http://www.davehylands.com |