
| Line: 1 to 1 | ||||||||
|---|---|---|---|---|---|---|---|---|
| Added: | ||||||||
| > > | 
 RS485 EmulatorOverviewThe development of protocols for embedded systems that are based on shared buses (e.g. RS485), it's not always easy to implement and validate when implemented directly on the target system, which often lacks high-level debug capabilities. This project aims to create an emulator/server that runs inside a linux/unix environment. It emulates the behaviors observed on shared buses, for example collision of data, echo, noise and lost information.DescriptionThe following figure describes an overview of the functionality. Both the client and the server are linux processes. The server emulates the functionality of the shared RS485 bus. The client emulates the embedded nodes connected to the bus. 
The target embedded nodes usually use their internal UART (Universal Asynchronous Receiver/Transmitter) to send and receive serial data on the bus and uses a RS-485 transceiver to send and receive data on the bus with RS-485 levels.
Since the RS-485 is used normally in a shared bus then the transmitted data is received in all nodes, including the one making the transmission. Some HW implementations block the reception data during transmission. That will not allow the transmitter to detect collisions in the case other node starts transmitting at the same time.
The UART can only report that a new byte is received after that byte is fully transmitted. This implies that there is always one byte latency between transmission and reception of the data, even on the transmitter. In addition this also implies that implementations that are based only on UART information to detect when the bus is idle have a potential collision interval equal to the byte transmission period.  
The RS485 emulator implements this two "characteristics" of a RS485 bus: 
 ./rs485 -p <port> -b <baud rate> <port> - TCP port for connections <byte rate> - Number of byte to transfer per secondThe server accepts connections at the specified TCP "port" from multiple clients and uses the "byte rate" to determine the collision interval size. Files and downloadThe source code, files, tickets, support and blog of this project can be found on SourceForge in the following link: https://sourceforge.net/projects/rs485emulator/ -- PedroMaiaAlves - 2015-07-14
 | |||||||
 Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.