mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Allow to use DNS.local as upload port for OTA // Issue #382
This commit is contained in:
@ -66,9 +66,8 @@ Uploading files to file system SPIFFS
|
||||
2. Run target ``uploadfs`` via :option:`platformio run --target` command.
|
||||
|
||||
To upload SPIFFS image using OTA update please specify ``upload_port`` /
|
||||
``--upload-port`` as IP address. For the details please follow to
|
||||
:ref:`platform_espressif_ota`. For example, ``platformio run -t uploadfs
|
||||
--upload_port 192.168.0.255``.
|
||||
``--upload-port`` as IP address or DNS name (``*.local``). For the details
|
||||
please follow to :ref:`platform_espressif_ota`.
|
||||
|
||||
By default, will be used default LD Script for the board where is specified
|
||||
SPIFFS offsets (start, end, page, block). You can override it using
|
||||
@ -89,7 +88,7 @@ There are 2 options:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
platformio run --target upload --upload-port IP_ADDRESS_HERE
|
||||
platformio run --target upload --upload-port IP_ADDRESS_HERE or DNS_NAME.local
|
||||
|
||||
* Specify ``upload_port`` option in :ref:`projectconf`
|
||||
|
||||
@ -97,7 +96,12 @@ There are 2 options:
|
||||
|
||||
[env:myenv]
|
||||
...
|
||||
upload_port = IP_ADDRESS_HERE
|
||||
upload_port = IP_ADDRESS_HERE or DNS_NAME.local
|
||||
|
||||
For example,
|
||||
|
||||
* ``platformio run -t upload --upload-port 192.168.0.255``
|
||||
* ``platformio run -t upload --upload-port myesp8266.local``
|
||||
|
||||
Authentication and upload options
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (2, 7, "0.dev10")
|
||||
VERSION = (2, 7, "0.dev11")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -231,7 +231,9 @@ if "FRAMEWORK" in env:
|
||||
|
||||
# Handle uploading via OTA
|
||||
try:
|
||||
if env.get("UPLOAD_PORT") and socket.inet_aton(env.get("UPLOAD_PORT")):
|
||||
if (env.get("UPLOAD_PORT") and (
|
||||
env.get("UPLOAD_PORT").endswith(".local") or
|
||||
socket.inet_aton(env.get("UPLOAD_PORT")))):
|
||||
env.Replace(
|
||||
UPLOADCMD="$UPLOADOTACMD"
|
||||
)
|
||||
|
Reference in New Issue
Block a user