nanoMODBUS - A compact MODBUS RTU/TCP C library for embedded/microcontrollers

If you found this library useful, buy me a coffee on

nanoMODBUS is a small C library that implements the Modbus protocol. It is especially useful in embedded and resource-constrained systems like microcontrollers. Its main features are:

  • Compact size

  • Only ~2000 lines of code

  • Client and server code can be disabled, if not needed

  • No dynamic memory allocations

  • Transports:

  • RTU

  • TCP

  • Roles:

  • Client

  • Server

  • Function codes:

  • 01 (0x01) Read Coils

  • 02 (0x02) Read Discrete Inputs

  • 03 (0x03) Read Holding Registers

  • 04 (0x04) Read Input Registers

  • 05 (0x05) Write Single Coil

  • 06 (0x06) Write Single Register

  • 15 (0x0F) Write Multiple Coils

  • 16 (0x10) Write Multiple regi…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help