DOI QR코드

DOI QR Code

Diagnosis and Improvement of mode transition delay in Linux 9bit serial communications

리눅스 9비트 시리얼통신에서 모드전환 지연원인의 분석과 개선

  • Received : 2015.12.12
  • Accepted : 2015.12.24
  • Published : 2015.12.31

Abstract

We analyze the problem that is occurring when using parity mode transformation required for 9 bit serial communication under Linux environment and propose the solution. The parity mode change is used for 9 bit serial communication in the Linux that by nature supports only 8 bit serial communication. delay (around OS tick) arises. Our analysis shows that the cause is minimum length of waiting time to transmit data remained in Tx FIFO buffers. A modified Linux serial driver proposed in this paper decreases the delay less than 1ms by using accurate time delaying. Despite various system communication interfaces, enormous existing standards and system have adopted RS-232 serial communication, and the part of them have communicated by 9bit serial.

본 논문은 리눅스 환경에서 9비트 RS-232 통신에 필요한 패러티 모드 전환 방식을 사용할 때 발생하는 바이트 간 전송 지연증가 문제를 분석하고 해결책을 제시한다. 문자 전송방식인 RS-232통신에서 메시지의 시작을 나타내기 위하여 9비트통신을 하는 경우가 상당히 있다. 8 비트 문자통신을 기본으로 하는 통상의 리눅스에서는 9비트지원을 하기위해서는 패러티 모드를 변환하는 방법이 사용되는데, 실험결과 이때 OS 틱(tick) 수준의 지연이 발생하는 것을 확인하였다. 본 논문에서 지연의 원인이 드라이버에서 전송 FIFO 버퍼에 남은 데이터를 기다리는데 걸리는 시간의 최소단위를 OS 틱을 사용하기 때문인 것을 밝혀내었으며, 표준 리눅스 드라이버를 수정하여 패러티 모드전환 시간을 1ms 이내로 감소시켰다. 최근 다양한 시스템 통신 방식의 개발되었지만, 여전히 기존의 많은 표준 및 시스템이 RS-232 방식을 사용하여 9 bit 통신을 하고 잇는 경우에 리눅스 활용이 가능하게 되었다는 의미가 있다.

Keywords

References

  1. EIA standard RS-232-C: Interface between Data Terminal Equipment and Data Communication Equipment Employing Serial Binary Data Interchange. Washington: Electronic Industries Association. Engineering Dept. 1969.
  2. RS-232, Wikipedia, https://en.wikipedia.org/wiki/RS-232
  3. SealLevel, "What Is 9-Bit Data Framing?", Aug. 2010 (available at http://www.sealevel.com/support/article/AA-00146/0/What-Is-9-Bit-Data-Framing.html)
  4. James F. Kurose, Keith W. Ross, "Computer Networking: A Top-Down Approach (6th Edition)." (book)
  5. IGT, Slot Accounting System, version 6.01 June, 2003
  6. H. Ahn, and SM Kim, "Design and Implementation of Casino Slot machine Accounting Protocol Analysis System," Journal of Korean Society for Computer Game, Vol. 26, No.2 pp. 35-41, 2013. (journal)
  7. Kerrisk, Michael. The Linux programming interface. No Starch Press, 2010. (book)
  8. RS232 Sniffer, EX-TAP http://www.stratusengineering.com/EZTap.html (retrived 2010. 10. 10)
  9. CrossRef, Linux Kernel source, http://lxr.free-electrons.com/source/drivers/tty/serial/serial_core.c
  10. Love, Robert. Linux kernel development. Pearson Education, 2010. (book)
  11. S.-Y. Heo, W.-J. Lee, B.-J. Shin, K.-J. Han, "Design and implementation of packet fitlering mechanism for secure TeredoService)", Journal of the Korea Industrial Information System Society, Vol. 12, No. 3, pp. 47-59, 2007. (journal)
  12. D. Y. Kim, J. B. Kim, S. Y. Rhew, "Performnace verification process for introduction of Open Source Software - centered on introduction of Linux into the NEIS," Journal of the Korea Industrial Information System Society, Vol. 11, No. 3, pp. 59-68, 2006. (journal)
  13. J. Lee, S. Oh, K. Chung, T Yun, K Ahn, "I/O performance analysis about memory allocation of the UBIFS," Journal of the Korea Industrial Information System Society, Vol. 18, No. 4, pp. 9-18, 2013/ (journal)