Why Linux?

1. Full access to source code

All of the networking between the analyser nodes and the Linux box is done on an RS-485 network. The packet protocol is relatively simple:
        Node address (this byte has bit 8 set high for host->node traffic)
	Length of packet
	Command number
	Data (optional)
	2 checksum bytes
The 68HC11 embedded controller in each node is set up to only accepts a packet that is addressed to it (it has a special mode to accept a packet with bit 8 set).

On a DOS box, twiddling bit 8 on a serial port isn't a problem using the MARK and SPACE parity settings, however the POSIX standard has no definition for MARK or SPACE, and there is no support for this in the standard Linux serial driver.

[As an aside... The linux-serial mailing list is typical of the technical Linux mailing lists: very helpful people in a relatively low noise environment.]

Fortunately, we have access to the source and only a couple of lines of code to the Linux serial driver (the diffs are below) are required to enable MARK and SPACE parity on a 80x86 system, allowing us to easily toggle MARK and SPACE.


<         /*
<          * This provides support for mark & space parity
<          * If it is set and PARODD is not set, then we have MARK parity
<          * If it is set and PARODD is set, then we have SPACE parity
<          *
<          * NB: This is not supported by POSIX at all
<          */
<         if (cflag & CMSPAR) {
<             cval |= UART_LCR_SPAR;
< 	  }

< #define CMSPAR    010000000000  /* this adds support for mark/space parity */

2. Extensive networking

While we are based in Melbourne, the analyser system is going to be based at a pilot plant at the Warwick Farm sewerage treatment plant in the western suburbs of Sydney.

Using Linux, monitoring the system remotely is a straightforward task: as Linux has complete TCP/IP functionality as well as excellent support of SLIP, PPP, UUCP, simple dial-up shell connections, etc.

The AFIMS system is designed to operate in a client/server fashion, so that:

3. Costs

Total software costs for the project to date have been:

  1. Approximately $600 for a commercial 68HC11 cross-compiler for the embedded controllers. This is run from either a DOS computer or from DOSEMU on the Linux box, and

  2. $25 for an Infomagic CD-ROM.

4. And also...

[Index] [Prev] [Next]