Serial Communication

Home » CentOS » Serial Communication
CentOS 1 Comment

Many years ago, we began scrapping the RTOS approach for some of our timing-critical applications.  Our first applications were based on Solaris real-time extensions and served well us well for many years.  Then came the era of shaky support for Intel Solaris and we moved many applications to Linux.  There appeared to be no actual need for special real-time features with a good Linux distribution kernel and a GHz processors.

One of our most productive applications involves special test equipment computers that drive high speed serial ports.  The original development of these systems had the “added benefit”
of helping us to learn udev rules.  The serial communication is very flexible and most of it is script driven.  A current need to update computing platforms is driving script review.

There appears to be a bit of variety in outputs to the serial drivers.  The echo of a string with redirection to the serial driver, cat of a file with redirection to the serial driver and dd of=/dev/…. are methods used at various places in the scripts.  It is not at all clear what drove the choice of the output method at various points in the application. In addition, changing the method of output has not succeeded in breaking most of the applications.

Is there some fundamental difference between these methods of output to the driver that might trip us up as we simplify the scripts and port to new computer platforms?

Thanks in advance for any assistance.

One thought on - Serial Communication

  • assuming ‘serial’ means RS232 asynch, the biggest tripup is that new computers don’t COME with any serial ports, they are considered
    ‘legacy’, so you end up having to use USB Serial port adapters, many of which are nearly junk. stick with the FTDI based USB-Serial adapters from reliable companies for the best results.

    If this is RS422 or some other sort of high speed serial, that requires special adapters, well, the biggest problem will be that new computers are almost entirely PCI-Express, both ISA and original parallel PCI are history, so you may need to find and qualify new adapter boards.

    as far as how to best write your programs and scripts, well, thats up to whatever techniques your development engineers are most comfortable with. Me, I’d probably be doing something like that in Perl or maybe Python (even tho that would require me to learn more python).