Re: Datatransfer via serial line

From: Dave Clarke (pinggetridofthisbituino_at_operamail.com)
Date: 01/28/05

  • Next message: Grant Edwards: "Re: Datatransfer via serial line"
    Date: Fri, 28 Jan 2005 16:25:32 +0000
    
    

    On Friday 28 January 2005 14:39 Anders Christensen wrote:

    > Hi.
    >
    > I have a C-application running a while-loop that 10 times per second polls
    > a serial port for data. The program maintains some lists according to what
    > comes in on the serial port.
    >
    > I want to synchronize the data lists in my application with lists from a
    > remote device (via a serial port used only for that purpose). This
    > involves these steps:
    > 1) receive data from remote device
    > 2) update the data lists in my application
    > 3) send the updated lists to the remote device
    >
    > What is the best way to transfer the data over the serial line?
    >
    > Do I just rely on the transmission quality or, if not, how do I ensure
    > that every piece of data is transmittet correctly?
    >
    > I'd be glad to hear any kind of idea. Thank you.

    Wrap a bit of protocol round the data. Add a checksum, so you can detect
    errors, then you can have a simple ACK/NAK protocol. Add a sequence number,
    then you can tell if any data got lost on the way.

    -- 
    Dave Clarke
    

  • Next message: Grant Edwards: "Re: Datatransfer via serial line"

    Relevant Pages

    • Re: python-list query re sockets, select or: twisted and other file-descriptors & twisted questi
      ... The three lists of waitable objects are ... The optional timeout argument ... select might not yet work on Windows serial ports as well as sockets. ... How can I add serial Windows serial port ...
      (comp.lang.python)
    • Re: GPRS card
      ... I tried some w/o a result. ... > card and it starts ringing. ... Have you tried with different serial port parameters like speed and parity? ... pcmcia-cs or kernel ARM/serial people and their mailing lists. ...
      (comp.os.linux.hardware)
    • Datatransfer via serial line
      ... The program maintains some lists according to what ... comes in on the serial port. ... remote device. ... Do I just rely on the transmission quality or, if not, how do I ensure ...
      (comp.os.linux.development.system)