IN THIS CHAPTER
Project Trailblazer was proceeding quite nicely. The four target hardware boards had been booted, with bash running and an Ethernet network connection. The engineers were ready to begin tackling hardware interfacing. They decided to start with the guest authentication and lift access design. The Silverjack board wants Project Trailblazer to replace paper lift access tickets with low-cost radio-frequency identification (RFID) technology. Guests receive RFID tags that permit passage through an access point located at the bottom of each lift. These lift access points also display individual guest-specific messages. An RFID tag reader outputs tag information via an asynchronous serial link. The access point display receives commands via an asynchronous serial link. The tag reader and display will connect to the target board's serial ports.
A guest can proceed through an access point after authentication by looking at signaling lights: A red light means permission to pass is denied, and a green light indicates permission to go. The permission signaling circuit requires a single bit of information. This bit of information, the RFID tag reader and access point display communication can be accomplished through the use of a target board's serial ports.
In this chapter, you'll develop three C programs: one that sets the serial port control signal (setSerialSignal), one that queries the control signal (getSerialSignal), and one that sends and receives asynchronous serial communications (querySerial). Ultimately, within the Project Trailblazer design, bash scripts running on the target boards will call these three programs and will provide system integration to the Silverjack server. (Chapter 12, "System Integration," addresses all system integration development.) This chapter discusses how to develop a simple serial interface for the Project Trailblazer access points callable from bash.
The original RS-232 standard, defined by the Electronic Industry Association and the Telecommunications Industry Association (EIA/TIA), in 1962, is a complete standard that specifies electrical, functional, and mechanical characteristics for communications between host and peripheral equipment. RS stands for recommended standard. The characters RS have been officially replaced by the characters EIA/TIA to identify the source of the standard. Nonetheless, people continue to use the term RS-232. In this chapter, RS-232 is synonymous with EIA/TIA-232.
Dallas Semiconductor's Application Note 83, "Fundamentals of RS-232 Serial Communications"1 fully describes RS-232. This application note covers electrical, functional, and mechanical characteristics, explains implementation and signaling, and describes PC/modem communications and limitations.