Hardware ID
Display a hardware ID on the WebSerial Pro terminal to identify individual devices on your network.
WebSerial Pro feature. This functionality is available only in the commercial edition of WebSerial.The hardware ID is displayed at the bottom of the WebSerial Pro terminal. It helps you identify a specific device when several devices on your network run WebSerial Pro.

Set the hardware ID
Call setID() in setup():
WebSerial.setID("my_device_001");Prop
Type
If you do not set an ID before calling begin(), WebSerial Pro generates one from the chip ID:
| Board | Default ID |
|---|---|
| ESP8266 | ESP8266- followed by the chip ID in hexadecimal |
| ESP32 | ESP32- followed by a chip ID derived from the eFuse MAC address, in decimal |
Example
#include <WebSerialPro.h>
// ...
void setup() {
// ...
// Set the hardware ID
WebSerial.setID("my_device_001");
WebSerial.begin(&server);
server.begin();
}
void loop() {
// ...
WebSerial.loop();
}Best practices
- Use an ID that is unique for each device.
- Avoid special characters and spaces, which can cause problems in network communication or file names.
- Keep a record of the IDs assigned to your devices.
- Set the ID during initialization, in
setup(), before any network communication takes place.