| Our country’s toll charge mostly rely on manual way currently.This way to charge has high cost and low efficiency.Especially as the rising of car ownership of our country,the low efficiency of toll methods often causes road crowded,a lot of traffic pollution and even traffic accidents.As the development of electronics,communications,software and other techonlogys,the social management tend to be intelligent and the road traffic management is urgent to upgrade toward intelligent and high efficient management.The Electronic Toll Collection(ETC)system can efficiently improve the road network capacity and traffic efficiency by changing traditional charge mode.The ETC system is based on the Dedicated Short-range Communication Protocol(DSRC).DSRC is a highly efficient wireless communication technology and it can realize two-way communication with the moving targets within a smaller area.The DSRC is mainly using for communication between the Road Side Unit(RSU)and the On Board Unit(OBU)in the ETC system.In this dissertation,we focus on the software design and implementation of DSRC protocol to provide reliable communication for the application of ETC based on the company’s projects and oriented to the application requirement.By studying the basic theory and related technical standards of DSRC protocol,the arm-linux software and hardware development environment was established.The design and implementation of physical layer,data link layer and application layer were carried out.For physical layer,the interface of control and data communication of RF module were realized by using SPI.For data link layer,the layer management was designed.Thus interrupts could be handled by combining external interrupt and asynchronous notification.The data buffer was realized by using multithreading to send and receive the underlying data and process the upper level protocol stack.The message queue was used to conununicate between threads each other.The retransmission mechanism was employed to solve the communication errors.Link control mechannism of Logical Link Control(LLC)sublayer was designed by using state machine.Finally,the flow charts of the Media Access Control(MAC)sublayer and LLC sublayer were given.For application layer,the layer management was designed and the ASN.1 was used to define application layer service,to realize the coding,decoding,segmentation and merge of transfer data.Thus the Transfer Kernel(T-KE),Initialization Kernel(I-KE)and Broadcast Kernel(B-KE)were realized.For device application layer,the extension application interface and application security were designed.Finally,the software of DSRC protocol was tested to verify if the design of software meet the requirement goals,and the communication function can be implemented between RSU and OBU with good stability. |