1.. _modbus:
2
3Modbus
4######
5
6Modbus is an industrial messaging protocol. The protocol is specified
7for different types of networks or buses. Zephyr OS implementation
8supports communication over serial line and may be used
9with different physical interfaces, like RS485 or RS232.
10TCP support is not implemented directly, but there are helper functions
11to realize TCP support according to the application's needs.
12
13Modbus communication is based on client/server model.
14Only one client may be present on the bus. Client can communicate with several
15server devices. Server devices themselves are passive and must not send
16requests or unsolicited responses.
17Services requested by the client are specified by function codes (FCxx),
18and can be found in the specification or documentation of the API below.
19
20Zephyr RTOS implementation supports both client and server roles.
21
22More information about Modbus and Modbus RTU can be found on the website
23`MODBUS Protocol Specifications`_.
24
25Samples
26*******
27
28* :zephyr:code-sample:`modbus-rtu-server` and :zephyr:code-sample:`modbus-rtu-client` samples give
29  the possibility to try out RTU server and RTU client implementation with an evaluation board.
30* :zephyr:code-sample:`modbus-tcp-server` sample is a simple Modbus TCP server.
31* :zephyr:code-sample:`modbus-gateway` sample shows how to build a TCP to serial line
32  gateway with Zephyr OS.
33
34API Reference
35*************
36
37.. doxygengroup:: modbus
38
39.. _`MODBUS Protocol Specifications`: https://www.modbus.org/specs.php
40