@@ -34,6 +34,27 @@ if Code.ensure_loaded?(Circuits.UART) do
3434 to your `mix.exs` as dependency! It is an optional dependency and thus
3535 by default not present when you install this library.
3636
37+ ### Autobaud
38+
39+ This transport implements automatically detecting the used baudrate by listening to the network ("autobaud").
40+ Once it detects a valid BACnet frame, the baudrate that detected the frame will be used and autobaud will be disabled.
41+ If there's no valid BACnet frame in a short time window (~5.5s) or an invalid frame is detected,
42+ then the next baudrate will be tried. It will go through all defined baudrates specified by the BACnet protocol.
43+ If no valid BACnet frame has been detected and all baudrates have been tested, the transport will fallback
44+ to baudrate `38_400` - a Logger warning will be issued.
45+ Autobaud can be manually re-enabled through `configure/2` - **note that all communication will be unrecoverable dropped**!
46+
47+ The following baudrates will be tried in this order: 9600, 19_200, 38_400, 57_600, 76_800, 115_200.
48+
49+ Autobaud can be used by specifying `baudrate: :auto` when starting the transport (recommended way to use autobaud).
50+ Autobaud can also be manually enabled through `configure/2` - but communication is disruptive and thus not recommended.
51+
52+ > #### Empty Network {: .warning}
53+ >
54+ > Autobaud requires at least one active device on the MS/TP network!
55+ > If there are no active devices (other than itself) on the network,
56+ > it will fail to detect the baudrate and fallback to the default.
57+
3758 ### Logger warning spam due to bad data/devices/network
3859
3960 This section is only relevant if you're working on this project or have bacstack debugging enabled.
@@ -62,27 +83,6 @@ if Code.ensure_loaded?(Circuits.UART) do
6283 ```
6384
6485 Note that this will also remove info or debugging output (`log_communication_rcv` option of this transport).
65-
66- ### Autobaud
67-
68- This transport implements automatically detecting the used baudrate by listening to the network ("autobaud").
69- Once it detects a valid BACnet frame, the baudrate that detected the frame will be used and autobaud will be disabled.
70- If there's no valid BACnet frame in a short time window (~5.5s) or an invalid frame is detected,
71- then the next baudrate will be tried. It will go through all defined baudrates specified by the BACnet protocol.
72- If no valid BACnet frame has been detected and all baudrates have been tested, the transport will fallback
73- to baudrate `38_400` - a Logger warning will be issued.
74- Autobaud can be manually re-enabled through `configure/2` - **note that all communication will be unrecoverable dropped**!
75-
76- The following baudrates will be tried in this order: 9600, 19_200, 38_400, 57_600, 76_800, 115_200.
77-
78- Autobaud can be used by specifying `baudrate: :auto` when starting the transport (recommended way to use autobaud).
79- Autobaud can also be manually enabled through `configure/2` - but communication is disruptive and thus not recommended.
80-
81- > #### Empty Network {: .warning}
82- >
83- > Autobaud requires at least one active device on the MS/TP network!
84- > If there are no active devices (other than itself) on the network,
85- > it will fail to detect the baudrate and fallback to the default.
8686 """
8787
8888 # TODO: Convert Master Node FSM to :gen_statem?
0 commit comments