About mDNS
Section titled “About mDNS”ESP3D uses mDNS (DNS-SD) for network discovery: the board can be reached as hostname.local and the services it provides can be found by any mDNS browser.
On Windows it needs the bonjour service, on Linux avahi.
It needs MDNS_FEATURE in configuration.h. It works without HTTP, any active network service (Telnet, WebSocket, etc.) is enough.
mDNS is only started in station mode (WiFi client or Ethernet), not in access point mode.
To find your board from a computer, a phone or a tablet, see mDNS Discovery.
Its state is reported by [ESP420] as MDNS, and [ESP450] lists the other ESP3D boards (_esp3d._tcp services) on the network.
Registered services
Section titled “Registered services”| Service | Port | Condition |
|---|---|---|
_esp3d._tcp | main port | always |
_http._tcp | HTTP port | HTTP_FEATURE |
_ftp._tcp | FTP control port | FTP_FEATURE |
_telnet._tcp | Telnet port | TELNET_FEATURE |
_webdav._tcp | WebDAV port | WEBDAV_FEATURE |
_websocket._tcp | WebSocket port | WS_DATA_FEATURE |
_device-info._tcp | main port | always (see ESP8266 limitation) |
The main port is the port of the first active service in this order: HTTP, FTP, Telnet, WebDAV, WebSocket. If none is active, 8080 is used, because the ESP mDNS stack does not accept port 0.
_esp3d._tcp TXT records
Section titled “_esp3d._tcp TXT records”| Key | Value |
|---|---|
firmware | ESP3D or ESP3DLib |
version | e.g. 3.1.1 |
_websocket._tcp TXT records
Section titled “_websocket._tcp TXT records”| Key | Value |
|---|---|
uri | / |
subprotocol | arduino |
_device-info._tcp TXT records
Section titled “_device-info._tcp TXT records”This service describes the board and its features, it is not a real TCP endpoint, its port is the main port.
Always present (ESP32)
Section titled “Always present (ESP32)”| Key | Value |
|---|---|
name | hostname |
board | e.g. ESP32, ESP32-S3 |
chip | e.g. ESP32-S3 |
fw | ESP3D or ESP3DLib |
ver | e.g. 3.1.1 |
target | marlin, grbl, smoothieware, repetier, unknown |
sdk | e.g. v5.1.2 |
core | Arduino core version |
flash | e.g. 4.00 MB |
auth | enabled or disabled |
log | e.g. serial0/debug, telnet/verbose, none |
auth and log are always present, so a missing authentication is visible and communication issues can be diagnosed without physical access to the board.
Present only if the feature is in the firmware
Section titled “Present only if the feature is in the firmware”| Key | Value | Feature |
|---|---|---|
psram | e.g. 8.00 MB | ESP32 with BOARD_HAS_PSRAM |
fs | e.g. 1.44 MB | FILESYSTEM_FEATURE |
notification | telegram, email, pushover, ifttt, homeassistant, whatsapp, none | NOTIFICATION_FEATURE |
camera | e.g. ESP32 Cam, ESP Eye, M5Stack | CAMERA_DEVICE |
bt | hostname/AA:BB:CC:DD:EE:FF | BLUETOOTH_FEATURE |
sensor | DHT11, DHT22, ANALOG, BMP280, BME280 | SENSOR_DEVICE |
sd-update | ON or OFF | SD_UPDATE_FEATURE |
web-update | enabled | WEB_UPDATE_FEATURE |
time | ntp or manual | TIMESTAMP_FEATURE |
sd | SPI, SDIO, SPI-SdFat | SD_DEVICE |
lua | enabled | LUA_INTERPRETER_FEATURE |
usb | enabled | USB_SERIAL_FEATURE |
usb-cdc | enabled | USB_CDC_CLIENT_FEATURE |
ssdp | enabled | SSDP_FEATURE |
ESP8266 limitation
Section titled “ESP8266 limitation”On ESP8266, _device-info._tcp has only one record: board = ESP82XX.
The ESP8266 has about 40-50 KB of free memory at runtime, and many TXT records make the mDNS stack crash when it parses the first incoming mDNS packet after boot.
Example
Section titled “Example”On Linux:
avahi-browse -rt _device-info._tcpOn Windows / macOS (with bonjour):
dns-sd -B _esp3d._tcp