mbusd(8)

πŸ“¦
version 0.5.3 Β· 2 versions
, in nixpkgs unstable

πŸ’… mbusd πŸ’… β€” that's the page name, and yes it's section 8 of the System Manager's Manual, we love a system admin moment

okay so bestie, the page you're reading about is literally called mbusd, and near the top of the actual file it says mbusd(8) in the corner like a little name tag. now let's get into it πŸ’–


✨ SYNOPSIS ✨

here's the whole shape of it, copy-paste exact:

mbusd [-h] [-d] [-L logfile] [-v level] [-c cfgfile] [-p device] [-s
speed] [-m mode] [-t] [-r] [-y sysfsfile] [-Y sysfsfile] [-A address]
[-P port] [-C maxconn] [-N retries] [-R pause] [-W wait] [-T timeout]
[-b]

lowkey iconic bracket spam, but that's just how flags are born 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

mbusd is a MODBUS/TCP to MODBUS/RTU gateway. that's it, that's the sentence, and honestly she ate πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

this is the part where I hold your hand, bestie, because there are like a million of them and each one is a little gift:

  • -h β€” usage help. the "help me please" flag ✨
  • -d β€” tells mbusd not to fork itself (aka non-daemonize). she stays in the foreground with you, main character energy πŸ‘‘
  • -L logfile β€” picks the log file name. '-' means log to STDOUT only. the default is /var/log/mbusd.log πŸ“
  • -v level β€” sets how chatty the logging is. 0 = errors only, 1 = also warnings, 2 = also information messages. if mbusd was compiled in debug mode, valid log levels go all the way up to 9, and anything above 2 forces logging of information about additional internal events. so like, level 9 is her venting in her notes app πŸ’€
  • -c cfgfile β€” read configuration from cfgfile. yes queen, externalize your config πŸ™ˆ
  • -p device β€” sets the serial port device name πŸ”Œ
  • -s speed β€” sets the serial port speed ⚑
  • -m mode β€” sets the serial port mode (like 8N1). those three little characters are doing so much work ngl
  • -S β€” enable RS-485 support for the given serial port device (Linux only 🐧, sorry not sorry to everyone else)
  • -A address β€” sets the TCP address to bind 🌐
  • -P port β€” sets the TCP port number πŸšͺ
  • -t β€” enable RTS RS-485 data direction control using RTS, active transmit πŸ“€
  • -r β€” enable RTS RS-485 data direction control using RTS, active receive πŸ“₯
  • -y file β€” enable RS-485 direction data direction control by writing '1' to file for transmitter enable, and '0' to file for transmitter disable. ones and zeros, her love language πŸ’œ
  • -Y file β€” same deal but flipped: writes '0' to file for transmitter enable, and '1' to file for transmitter disable. the evil twin, we stan 🌈
  • -C maxconn β€” sets the maximum number of simultaneous TCP connections πŸ‘―β€β™€οΈ
  • -N retries β€” sets the maximum number of request retries (0 = disable retries, no second chances fr fr)
  • -R pause β€” sets the pause between requests, in milliseconds ⏸️
  • -W wait β€” sets the response wait time, in milliseconds βŒ›
  • -T timeout β€” sets the connection timeout value, in seconds (0 = disable timeout, she waits forever, delulu but valid)
  • -b β€” instructs mbusd to reply on a broadcast πŸ“’ periodt

πŸ’€ NOTES πŸ’€

okay this is the drama section, pay attention:

  • when mbusd gets a response with an invalid CRC and can't correct the error by re-requesting, it returns a MODBUS/TCP packet with exception code 04 πŸ’€
  • when mbusd can't receive a response from the MODBUS RTU device at all (like, the addressed controller is just not present on the network, ghosted πŸ‘»), it returns a MODBUS/TCP packet with exception code 0x0B 😭

no cap, these codes are your best friends when things go sideways.


πŸ› BUGS πŸ›

please send bug reports to the author. be nice about it, they're doing their best 🫢


πŸ‘‘ AUTHORS πŸ‘‘

the legends themselves:

  • Victor Antonovich <v.antonovich@gmail.com>
  • Andrew Denysenko <nitr0@seti.kr.ua>

πŸ“œ LICENSE πŸ“œ

this program is distributed under the BSD license. see the LICENSE file in the installation directory for the full license text πŸ“„βœ¨


and that's the whole page bestie!! you made it to the bottom, I'm obsessed πŸŽ€ the version on this one is mbusd 0.5.3, dated 07 Apr 2026, and the page is mbusd(8) β€” mwah, go forth and gateway πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from