IOSignal for Arduino
IOSignal for Arduino sends and receives signals through an Arduino Client implementation, such as a board-compatible WiFi or Ethernet client. A plain Stream is not a network client; serial transports require an adapter. Methods, callbacks and constants are listed in the Arduino API.
Use installation, then D1 mini and ESP32-C3 channel messaging. IOSignal provides messaging; Remocon adds device discovery and control conventions.
Supported configurations include ESP8266 D1 mini, ESP32-C3 Super Mini, ESP8266 D1 and SparkFun Thing variants, ESP32, ESP32-S3, UNO R4 WiFi, UNO R3 with W5100, AI Thinker ESP32-CAM, and ODROID-GO. Select the correct board core, network client, and pins for your hardware. This list does not mean every board was physically retested with these tutorials.
IOSignal examples are on arduino.iosignal.net and device discovery and control (Remocon) examples on arduino.iosignal.net, with wiring. Arduino libraries have independent version numbers; see versions.
The receive buffer is 80 bytes by default. Its size is sent to the server on connect, and the server does not send this board any message larger than that (it is skipped). To receive long messages such as other devices' names and states, call io.setRxBuffer(size) before begin().
Board settings (ESP32, ESP8266)
From IOSignal Arduino 9.13.0, ESP32 and ESP8266 sketches using IOSignalConfig.h change their settings from a browser over USB, without rebuilding. The pages are arduino.iosignal.net/wifi and arduino.iosignal.net/wifi (desktop Chrome or Edge, Korean UI), and the "board settings" panel on each example page is the same. It is the standard Improv Wi-Fi Serial protocol plus IOSignal commands.
#include <IOSignal.h>
#include <IOSignalConfig.h>
IOSignalConfig config;
IOSignalSetting target(config, "target", "Target CID", "the-cid", IOSignalSetting::CID); // optional sketch setting
void setup() {
Serial.begin(115200);
config.begin(Serial, "My Device", "WIFI_SSID", "WIFI_PASS"); // placeholders: use the Wi-Fi stored on the chip
config.setServer("io.iosignal.net", 55488); // default server
if (config.key()) io.auth(config.key()); // device key set in the browser
io.begin(&client, config.host(), config.port());
}
void loop() {
config.loop(); // browser requests, Wi-Fi reconnect
if (config.connected()) io.loop();
}
| Item | Behavior |
|---|---|
| Wi-Fi | Stored on the chip and used at the next boot. A real SSID in the sketch wins at every boot. |
| Server (host:port) | The value set in the browser wins over the sketch; clearing it brings back the sketch value. |
Device key (id.key) | Same as the server. The key is never sent back from the board. "Connect anonymously" (9.14.1) connects without a key even when the sketch has one. |
| Sketch settings | Declare up to 8 text, CID, integer, on/off or choice settings (values up to 64 bytes) with IOSignalSetting and the page builds the fields. Code reads value(), toInt(), toBool() and applies changes in onChange(). |
- Settings are stored in Preferences (ESP32) or LittleFS (ESP8266). On other boards the header is empty.
- Most ESP examples use board settings: install the firmware from the example site in the browser, then enter Wi-Fi on the same screen.
- See the iosignal-arduino README for the full API.
Authentication revoked and library log
When the server sends AUTH_CLEAR (for example another connection with the same ID replaced this device), IOSignal Arduino 7.0.0 clears the credentials and stops in IO_STOP. It does not reconnect anonymously. The server's reason stays in io.lastReason, and onError is called with IO_AUTH_CLEAR. Call auth() and begin() again to reconnect. For the server's keepNew and keepOld policies, see duplicate logins.
void printLog(const char* message) {
Serial.println(message);
}
void setup() {
// ...
io.setLog(printLog);
}
With setLog you receive a line such as [IOSignal] AUTH_CLEAR: duplicate login. connection stopped. Without it the library prints nothing.
For an on-device check, use the esp32c3_duplicate_login (ESP32-C3 Super Mini) example. Logging in elsewhere with the same ID_KEY prints the messages above; on a keepOld server they print how many attempts were refused.