Skip to content
Version 6.1.0
Contact Us

BACnet MS/TP practical notes

  • MAC address. 0-127 for this engine, unique on the trunk. Make it configurable, for example with DIP switches or a setting. 255 is the broadcast address. The stack discards a frame whose source is 255.
  • Max_Master. Lowering it to the highest station actually in use shortens the Poll For Master cycle. Use the same value on every node of the trunk.
  • Baud rate. The common rates are 9600, 19200, 38400, 57600, 76800 and 115200. 38400 is the engine’s default. Every node on a trunk must use the same rate.
  • Frame size. The engine sends and receives non-encoded frames of up to 501 data octets. It also sends and receives the COBS-encoded BACnet Extended Data frames (types 32 and 33), which carry an NPDU of 502 to 1497 octets. The engine sends any NPDU longer than 501 octets that way. Only nodes that support COBS-encoded frames can receive them, and every router on the path must too, so the stack still limits APDUs on MS/TP to 480 octets.
  • Transmit complete. If your send-bytes callback returns as soon as the octets are queued in the UART, the driver-enable callback turns the driver off while they are still going out, and the end of every frame is lost.
  • Long gaps. If the clock shows more than Tno_token + 254 × Tslot of silence between BACnetStack_LoopMSTP() calls, the engine restarts its state machines. A stalled thread is the usual cause.
  • Tools. A USB-to-RS-485 adapter with Wireshark captures MS/TP traffic. A logic analyzer is the practical way to check turnaround and inter-octet timing on the wire.