Description
Describe the request
(not really sure whether this is a bug or an enhancement proposal, preemptive sorry :)
While researching this issue with esp8266/Arduino
esp8266/Arduino#7759
I have noticed that our platform.txt sets mDNS 'board' value to {build.board}
when sending out _arduino._tcp
data.
https://github.com/esp8266/Arduino/blob/a2982f96a49f40197a56207d6a6a0a4a34fcf90a/platform.txt#L134
https://github.com/esp8266/Arduino/blob/a2982f96a49f40197a56207d6a6a0a4a34fcf90a/libraries/ESP8266mDNS/src/LEAmDNS.cpp#L1261
In case of d1_mini
it is ESP8266_WEMOS_D1MINI
https://github.com/esp8266/Arduino/blob/a2982f96a49f40197a56207d6a6a0a4a34fcf90a/boards.txt#L3848-L3849
Neither current stable IDE or arduino-cli board list output anything like the 'nice esp32 board name' described in the issue. While poking around the discovery code and board options of the tool, I have noticed arduino-cli board details
and the 'Identifying Properties' entry that seem to describe everything needed to detect the board. Replacing -DARDUINO_BOARD="{build.board}"
with -DARDUINO_BOARD="{_id}"
fixed our issue.
Shouldn't the arduino-cli discovery code check {build.board}
instead? Or, perhaps, check both strings? Or we just used the wrong value all this time?
Can we get some documentation for mDNS identification process and expected key-values?
(search only finds this entry on pluggable discovery spec - https://arduino.github.io/arduino-cli/0.25/pluggable-discovery-specification/#board-identification)
Only example I have found so far is
https://github.com/arduino-libraries/WiFi101OTA/blob/master/src/WiFi101OTA.cpp
Which simply hard-codes board ID string inside of the source, by using ARDUINO_...
board flag
Describe the current behavior
With d1_mini
board, board list shows
Port Protocol Type Board Name FQBN Core
10.10.10.5 network Network Port Unknown
Instead of the expected
Port Protocol Type Board Name FQBN Core
10.10.10.5 network Network Port LOLIN(WEMOS) D1 R2 & mini esp8266com:esp8266:d1_mini esp8266com:esp8266
Arduino CLI version
arduino-cli.exe Version: git-snapshot Commit: 63b53c0 Date: 2022-07-12T02:29:55Z
Operating system
Windows
Operating system version
11
Additional context
No response
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the nightly build
- My request contains all necessary details