Re: Suggestions for custom application-layer protocol?

From: Grant Edwards (grante_at_visi.com)
Date: 05/25/05


Date: Wed, 25 May 2005 20:36:55 -0000

On 2005-05-25, Mark <mark_2811nospam@excite.com> wrote:

> I need to implement a simple application layer protocol that will be used to
> communicate between an embedded device (single-board computer running Linux)
> and a monitoring terminal (running Windows).

Not sure what you mean by "monitoring terminal"?

Is the data intended for use by man or by machine? If the
former, then why not just use the telnet protocol and telnet
into your SBC?

If by machine, then simple ASCII newline terminated messages
are often the easiest to impliment and debug.

> I want the protocol to be text based rather than binary since
> the data throughput is low. I also want the protocol to be
> based on TCP/IP. Does anyone here have any suggestions on the
> design of a simple protocol?

Telnet, SMTP, IMAP, NNTP, etc. are all worth looking at.

> Are there simple, standard ways of formatting text messages to
> be sent over a TCP socket (such as comma-separated)?

No, there aren't really any overall standards. I'd stick with
something plain ASCII and line-oriented.

> I would prefer to avoid the complexities of XML.

I would hope so. :)

> Since either the embedded device or the monitoring terminal
> can initiate a message, is it preferable to have TCP servers
> running on both sides? Or is it better to simply leave a TCP
> connection open between client and server?

Who can initiate a message and who can initiate a connection
are orthogonal issues. We have no way of knowing what approach
will work best for your application.

> Any suggestions on ultra-simple standard protocols that do
> something similar to this?

You haven't given enough details for us to know what might be
similar and what wouldn't.

> Any suggestions or pointers to further reading are much
> appreciated.

Whatever you pick, my main recommendation would be to do
something you can test/debug by using a telnet client and
netcat.

-- 
Grant Edwards                   grante             Yow!  OVER the
                                  at               underpass! UNDER the
                               visi.com            overpass! Around the FUTURE
                                                   and BEYOND REPAIR!!


Relevant Pages

  • Re: Suggestions for custom application-layer protocol?
    ... then why not just use the telnet protocol and telnet ... I also want the protocol to be ... > be sent over a TCP socket? ... Who can initiate a message and who can initiate a connection ...
    (comp.unix.programmer)
  • Re: What is telnet?
    ... Telnet is a protocold that creates a Virual Terminal to a server or Main Frame. ... When TCP/IP came about the Telnet protocol was created to perform Virtual Terminal service ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Windows->Linux. Graphical terminal emulator.
    ... Telnet is a transport protocol only! ... We are talking about remote access to Unix in a console mode. ... For improved security reasons instead of using SSH protocol the ... > For how long have UNIX terminals had multiple virtual terminals? ...
    (alt.linux)
  • Re: Windows->Linux. Graphical terminal emulator.
    ... Telnet is a transport protocol only! ... We are talking about remote access to Unix in a console mode. ... For improved security reasons instead of using SSH protocol the ... > For how long have UNIX terminals had multiple virtual terminals? ...
    (alt.os.linux)
  • RE: Timeout strategy: terminal vs Telnet drivers
    ... >>> layer may or may not send them as individual packets. ... > The context was Telnet which IS an application wrt TCP ...
    (comp.os.vms)