Releases: mobizt/SerialNetworkBridge
v2.0.0
Release v2.0.0
This release introduces advanced control over SSL configurations, significantly improves the debugging experience, and adds support for fully asynchronous TCP networking on ESP32 hosts.
🚀 AsyncTCP Support (New)
- Non-Blocking Client: Introduced
SerialAsyncTCPClient, enabling event-driven TCP communication for high-throughput applications. - Robust Host Architecture: The
SerialNetworkHost(on ESP32) now uses a FreeRTOS Queue to decouple the network stack (LwIP) from Serial I/O. This prevents packet loss and connection stalls during bursts of data. - Flow Control: Implemented automatic Stop-and-Wait flow control to prevent overflowing the Client's hardware serial buffer, ensuring reliable data transfer even at high speeds.
- Examples: Added
AsyncTCP_Clientexamples demonstrating non-blocking HTTP requests and data reception.
🔌 Core Library & API
- SSL Status & Config Callbacks: Added callbacks to handle SSL state queries and configuration commands from the client.
- Status Reporting:
setGetFlagCallbackallows the Host to report the current secure connection status (e.g.,isSecure) back to the Client. - Configuration Control:
setSetFlagCallbackenables the Client to set SSL options likesetInsecure(skip verification) andsetPlainStarton the Host.
- Status Reporting:
- Client Debug Relaying: Implemented a new protocol command (
CMD_C_DEBUG_INFO) that allows the Arduino Client to send debug strings to the Host. This enables viewing Client-side logs on the PC terminal or Host Serial monitor even though the Client's USB/Serial port is occupied by the bridge protocol.
🛠 PC Host (serial_bridge.py)
- Color-Coded Console Output: The Python bridge now parses relayed debug messages and applies syntax highlighting for better readability:
- Red: Error messages.
- Yellow: Warning messages.
- Green: General information and success messages.
📂 Examples
- Debug Integration: Updated all examples to utilize the new
debug::printhelpers andHOST_RELAY_DEBUGmacro, ensuring debug output is correctly routed to the Host. - AsyncTCP: Added dedicated Host and Client sketches for the new asynchronous features.
v1.0.4
Release v1.0.4
This release significantly upgrades the PC Host Mode capability, transforming the Python bridge into a fully functional network manager. It introduces real OS-level control for Wi-Fi and system operations, along with critical robustness fixes for connection handling.
🛠 PC Host Improvements (serial_bridge.py)
- Real Network Management: The bridge now executes actual OS commands to manage the host's network connection (Windows, Linux, macOS):
setWiFi&connectNetwork: Can dynamically switch the PC's Wi-Fi access point.disconnectNetwork: Disconnects the current Wi-Fi interface.isNetworkConnected: Verifies internet access by pinging a public DNS (8.8.8.8).
- System Control: Implemented
rebootHostwith a safety mechanism (10-second countdown + console warning) to restart the bridge script or the OS. - Automatic Session Cleanup: The host now automatically detects and closes orphaned TCP connections when a client resets and reconnects. This eliminates the "Slow Blink" / Connection Failures previously experienced after resetting the Arduino board.
- Port Resilience: Added retry logic for opening the serial port, preventing crashes during rapid restarts.
📂 New & Updated Examples
- HostManagement (PC Host): A new sketch demonstrating how to remotely disconnect, configure, and reconnect the PC's Wi-Fi and trigger a host reboot from the Arduino.
- SecureConnection (PC Host): Demonstrates SSL/TLS verification using a local certificate file (
cert/Amazon_Root_CA1.pem) stored relative to the script. - STARTTLS (PC Host): Added support for upgrading plain TCP connections to secure SSL (e.g., for SMTP/Gmail).
- Revised HTTP Streaming: Updated logic to support local server testing across different host architectures.
📄 Documentation
- Added comprehensive
examples/Readme.mdguiding users through the new directory structure and PC Host setup. - Updated main
README.mdwith v1.0.4 features and compatibility notes.
v1.0.3
Release v1.0.3
This release focuses on stability and usability improvements for the PC Host Mode introduced in v1.0.2. It resolves SSL handshake issues on the Python bridge, improves error recovery, and adds a complete suite of PC-compatible examples.
🛠 Python Bridge Improvements (serial_bridge.py)
- Robust Error Handling: The bridge script now gracefully catches and ignores decoder errors caused by Arduino bootloader noise/garbage bytes, preventing crashes on startup.
- Relaxed SSL Verification: Disabled strict SSL certificate verification for WebSocket connections (using
ssl.CERT_NONE) to match the permissive behavior of the ESP32 Host. This fixes connectivity to public test servers likeecho.websocket.org. - Extended Timeouts: Increased the default TCP connection timeout from 2s to 10s to accommodate slower public brokers (e.g., MQTT).
📂 New PC Host Examples
A new set of examples specifically optimized for the PC USB Host architecture (using Serial and proper bootloader flushing) has been added:
- HTTP Client:
HTTP_GETandHTTP_POST(demonstrating the required 3rd parameter for SSL). - WebSocket:
Websocket_Client(tested withecho.websocket.org). - MQTT:
MQTT_Client(Secure) connecting to HiveMQ on port 8883. - UDP:
UDP_NTP_Client. - Streaming:
HTTP_Streaming(SSE) with a local Python test server.
✨ Miscellaneous
- Added Local SSE Server: A
sse_server.pyutility (withrun.bat/.shscripts) is now included inexamples/Features/PC_USB_Host/HTTP_Streaming/Serverto facilitate local HTTP streaming tests. - Updated sketches to include
Serial.write(0x00)insetup()to clear PC-side buffers on boot.
v1.0.2
Release v1.0.2
This release introduces PC Host Mode, allowing Arduino clients to access the internet directly via a USB connection to a computer or Raspberry Pi, removing the requirement for an ESP32/ESP8266 bridge.
🚀 New Features
- PC/Python Host Support: Added
serial_bridge.pyto bridge TCP, UDP, and WebSocket traffic via a PC or Raspberry Pi. - Installer Scripts: Added
install_libs.bat(Windows) andinstall_libs.sh(Linux/macOS) for automatic Python dependency installation. - Run Scripts: Added
run.batandrun.shfor easy execution of the bridge.
📚 Documentation & Examples
- Added
examples/Features/PC_USB_Hostdemonstrating USB-based networking. - Updated
README.mdwith new architecture diagrams and setup instructions for PC Host mode. - Updated library manifests (
library.json,library.properties) with new keywords and description.