Skip to content

Commit 2f381d2

Browse files
committed
add web protocols, modbus, and improve system-setup documentation
1 parent d48989e commit 2f381d2

4 files changed

Lines changed: 2269 additions & 6 deletions

File tree

drivers/communications/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ This comprehensive guide covers all methods for communicating with hardware devi
2121
| **USB Bulk** | Direct USB control with bulk transfers | libusb | DSLR shutters, custom USB devices | [USB Guide](usb/) |
2222
| **HID** | USB Human Interface Devices | hidapi | Filter wheels, focusers, keypads | [HID Guide](hid/) |
2323
| **GPIO** | Raspberry Pi / Linux GPIO pins | libgpiod | Relays, switches, sensors, PWM | [GPIO Guide](gpio/) |
24+
| **Modbus** | Industrial devices (PLCs, relays, sensors) | nanomodbus (built-in) | Relay boards, automation equipment | [Modbus Guide](modbus/) |
25+
| **Web Protocols** | REST APIs, HTTP services, JSON data | cpp-httplib, nlohmann/json | Cloud devices, IoT, web APIs | [Web Protocols Guide](web-protocols/) |
2426

2527
## Communication Methods Overview
2628

@@ -54,6 +56,22 @@ For specialized hardware that doesn't fit the plugin model:
5456
- Direct access to device features
5557
- Platform-specific optimizations
5658

59+
### Application Layer Protocols
60+
61+
For modern web-based devices and industrial automation equipment:
62+
63+
- **[Web Protocols](web-protocols/)** - HTTP clients/servers and JSON handling
64+
- **[Modbus](modbus/)** - Industrial automation protocol (RTU and TCP)
65+
66+
**Advantages:**
67+
- Industry-standard protocols with wide device support
68+
- Structured data models and well-defined operations
69+
- Built-in libraries (nanomodbus included, cpp-httplib available)
70+
- Suitable for both consumer IoT and industrial applications
71+
- Extensible to other protocols (WebSocket, MQTT, etc.)
72+
73+
**Important:** The TCP Connection Plugin is designed for raw binary/text communication protocols. For HTTP/REST APIs, use the [Web Protocols Guide](web-protocols/). For Modbus-enabled industrial devices, use the [Modbus Guide](modbus/).
74+
5775
## Additional Resources
5876

5977
- **[Creating Custom Plugins](custom-plugins/)** - Build your own connection plugin
@@ -78,6 +96,11 @@ For complete working examples, see:
7896
- **HID**: `indi-sx/sxwheel.cpp` - Starlight Xpress filter wheel
7997
- **GPIO**: `indi-gpio/indi_gpio.cpp` - Raspberry Pi GPIO driver
8098
- **I2C**: `indi/libs/indibase/connectionplugins/connectioni2c.cpp` - I2C plugin
99+
- **Modbus**: `indi/drivers/io/waveshare_modbus_relay.cpp` - Modbus TCP relay control
100+
- **Web Protocols**:
101+
- HTTP Client: `indi/drivers/auxiliary/ipx800v4.cpp` - REST API consumer
102+
- HTTP Server: `indi/drivers/alpaca/indi_alpaca_server.cpp` - REST API provider
103+
- JSON Handling: `indi/drivers/auxiliary/alto.cpp` - JSON parsing examples
81104

82105
## Need Help?
83106

0 commit comments

Comments
 (0)