forked from platformio/platformio-core
Docs for PIO Remote, PIO Account; other improvements for docs
This commit is contained in:
@ -117,6 +117,7 @@ Contents
|
|||||||
:caption: PlatformIO Plus
|
:caption: PlatformIO Plus
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
|
|
||||||
|
plus/pio-remote
|
||||||
plus/unit-testing
|
plus/unit-testing
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
@ -124,7 +125,6 @@ Contents
|
|||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
|
||||||
Quickstart <librarymanager/index>
|
Quickstart <librarymanager/index>
|
||||||
User Guide <userguide/lib/index.rst>
|
|
||||||
librarymanager/ldf
|
librarymanager/ldf
|
||||||
librarymanager/config
|
librarymanager/config
|
||||||
librarymanager/creating
|
librarymanager/creating
|
||||||
|
@ -63,3 +63,11 @@ possible values.
|
|||||||
Rebuild C/C++ Project Index (Autocomplete, Linter)``
|
Rebuild C/C++ Project Index (Autocomplete, Linter)``
|
||||||
|
|
||||||
.. image:: ../_static/platformio-demo-lib.gif
|
.. image:: ../_static/platformio-demo-lib.gif
|
||||||
|
|
||||||
|
User Guide (CLI)
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
|
platformio lib <../userguide/lib/index>
|
||||||
|
93
docs/plus/pio-remote.rst
Normal file
93
docs/plus/pio-remote.rst
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. |PIORemote| replace:: **PIO Remote™**
|
||||||
|
.. |PIOCloud| replace:: PlatformIO Cloud
|
||||||
|
|
||||||
|
.. _pio_remote:
|
||||||
|
|
||||||
|
PIO Remote™
|
||||||
|
===========
|
||||||
|
|
||||||
|
**Your devices are always with you!**
|
||||||
|
|
||||||
|
.. versionadded:: 3.2 (`PlatformIO Plus <https://pioplus.com>`__)
|
||||||
|
|
||||||
|
|PIORemote| allows you to work remotely with devices from
|
||||||
|
*Anywhere In The World*. No matter where are you now! Run small and
|
||||||
|
cross-platform :ref:`pio_remote_agent` on a host machine and you will be able to
|
||||||
|
list active devices (wireless + wired), to upload firmware **Over-The-Air (OTA)**,
|
||||||
|
to process remote unit tests, or to start remote debugging session via OTA
|
||||||
|
Serial Port Monitor.
|
||||||
|
|
||||||
|
Using PIO Remote™ you can share your devices with friends or team. In
|
||||||
|
combination with Cloud IDE, you can create awesome things at any time when
|
||||||
|
inspiration comes to you.
|
||||||
|
|
||||||
|
You should have :ref:`cmd_account` to work with |PIORemote|.
|
||||||
|
A registration is **FREE**.
|
||||||
|
|
||||||
|
Features
|
||||||
|
--------
|
||||||
|
|
||||||
|
* :ref:`OTA Device Manager <cmd_remote_device>`
|
||||||
|
* :ref:`OTA Firmware Uploading <cmd_remote_run>`
|
||||||
|
* Continuous Deployment
|
||||||
|
* Continuous Delivery
|
||||||
|
* Remote Unit Testing
|
||||||
|
|
||||||
|
Technology
|
||||||
|
----------
|
||||||
|
|
||||||
|
|PIORemote| is an own `PlatformIO Plus <https://pioplus.com/>`__ technology for
|
||||||
|
**Over-The-Air (OTA)** remote operations without external dependencies to
|
||||||
|
operation system or its software based on `client-server architecture <https://en.wikipedia.org/wiki/Client–server_model>`_.
|
||||||
|
The Server component (|PIOCloud|) plays a role of coupling link between
|
||||||
|
:ref:`pio_remote_agent` and client (end-developer, continuous integration
|
||||||
|
system, etc.).
|
||||||
|
When you start :ref:`pio_remote_agent`, it connects over the Internet with
|
||||||
|
|PIOCloud| and listen for the actions/commands which you can send in Client
|
||||||
|
role from anywhere in the world.
|
||||||
|
|
||||||
|
|PIORemote| is multi-agents and multi-clients system. A single agent can be
|
||||||
|
shared with multiple clients, where different clients can use the same agent.
|
||||||
|
This approach allows to work with distributed hardware located in the different
|
||||||
|
places, networks, etc.
|
||||||
|
|
||||||
|
This technology allows to work with remote devices in generic form as you
|
||||||
|
do that with local devices using PlatformIO ecosystem. The only one difference
|
||||||
|
is a prefix "remote" before each generic PlatformIO command. For example,
|
||||||
|
listing of local and remote devices will look like :ref:`cmd_device_list` and
|
||||||
|
:ref:`cmd_remote_device_list`.
|
||||||
|
|
||||||
|
.. _pio_remote_agent:
|
||||||
|
|
||||||
|
|PIORemote| Agent
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Start |PIORemote| Agent on a local host machine and work remotely with
|
||||||
|
your devices **WITHOUT** extra software, services, SSH, VPN, tunneling or
|
||||||
|
opening incoming network ports.
|
||||||
|
|
||||||
|
|PIORemote| supports wired and wireless devices. Wired devices should be
|
||||||
|
connected physically to host machine where |PIORemote| Agent is started,
|
||||||
|
where wireless devices should be visible for |PIORemote| Agent to provide
|
||||||
|
network operations Over-The-Air.
|
||||||
|
|
||||||
|
User Guide (CLI)
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
|
platformio remote <../userguide/remote/index>
|
||||||
|
|
||||||
|
|
@ -159,8 +159,8 @@ Workflow
|
|||||||
|
|
||||||
.. _unit_testing_api:
|
.. _unit_testing_api:
|
||||||
|
|
||||||
Test API
|
API
|
||||||
--------
|
---
|
||||||
|
|
||||||
The summary of `Unity Test API <https://github.com/ThrowTheSwitch/Unity#unity-test-api>`_:
|
The summary of `Unity Test API <https://github.com/ThrowTheSwitch/Unity#unity-test-api>`_:
|
||||||
|
|
||||||
@ -241,6 +241,18 @@ The summary of `Unity Test API <https://github.com/ThrowTheSwitch/Unity#unity-te
|
|||||||
|
|
||||||
- ``TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)``
|
- ``TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)``
|
||||||
|
|
||||||
|
|
||||||
|
User Guide (CLI)
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 3
|
||||||
|
|
||||||
|
platformio test <../userguide/cmd_test>
|
||||||
|
|
||||||
|
--------------
|
||||||
|
|
||||||
|
|
||||||
Test "Blink" Project
|
Test "Blink" Project
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Allows you to reset password for :ref:`userguide_account` using E-Mail that
|
Allows you to reset password for :ref:`cmd_account` using E-Mail that
|
||||||
was specified for registration.
|
was specified for registration.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
|
@ -27,7 +27,7 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Log in to :ref:`userguide_account`.
|
Log in to :ref:`cmd_account`.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
@ -27,4 +27,4 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Log out of :ref:`userguide_account`.
|
Log out of :ref:`cmd_account`.
|
||||||
|
@ -27,4 +27,4 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Change password for :ref:`userguide_account`.
|
Change password for :ref:`cmd_account`.
|
||||||
|
@ -27,7 +27,7 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Log in to :ref:`userguide_account`.
|
Log in to :ref:`cmd_account`.
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
.. _userguide_account:
|
.. _cmd_account:
|
||||||
|
|
||||||
PIO Account
|
PIO Account
|
||||||
===========
|
===========
|
||||||
@ -17,8 +17,11 @@ PIO Account
|
|||||||
Having **PIO Account** allows you to use extra professional features from
|
Having **PIO Account** allows you to use extra professional features from
|
||||||
`PlatformIO Plus <https://pioplus.com/>`__:
|
`PlatformIO Plus <https://pioplus.com/>`__:
|
||||||
|
|
||||||
|
* :ref:`pio_remote`
|
||||||
* :ref:`unit_testing`
|
* :ref:`unit_testing`
|
||||||
|
|
||||||
|
A registration is **FREE**.
|
||||||
|
|
||||||
To print all available commands and options use:
|
To print all available commands and options use:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -12,12 +12,14 @@
|
|||||||
.. _cmd_device:
|
.. _cmd_device:
|
||||||
|
|
||||||
platformio device
|
platformio device
|
||||||
======================
|
=================
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
|
.. _cmd_device_list:
|
||||||
|
|
||||||
platformio device list
|
platformio device list
|
||||||
---------------------------
|
----------------------
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
~~~~~
|
~~~~~
|
||||||
@ -81,7 +83,7 @@ Examples
|
|||||||
.. _cmd_device_monitor:
|
.. _cmd_device_monitor:
|
||||||
|
|
||||||
platformio device monitor
|
platformio device monitor
|
||||||
------------------------------
|
-------------------------
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
~~~~~
|
~~~~~
|
||||||
|
@ -41,7 +41,7 @@ Options
|
|||||||
Process specified environments.
|
Process specified environments.
|
||||||
|
|
||||||
You can also specify which environments should be processed by default using
|
You can also specify which environments should be processed by default using
|
||||||
:ref:`projectconf_pio_env_default`.
|
:ref:`projectconf_pio_env_default` option from :ref:`projectconf`.
|
||||||
|
|
||||||
|
|
||||||
.. option::
|
.. option::
|
||||||
@ -49,12 +49,13 @@ You can also specify which environments should be processed by default using
|
|||||||
|
|
||||||
Process specified targets.
|
Process specified targets.
|
||||||
|
|
||||||
Pre-built targets:
|
Built-in targets:
|
||||||
|
|
||||||
* ``clean`` delete compiled object files, libraries and firmware/program binaries
|
* ``clean`` delete compiled object files, libraries and firmware/program binaries
|
||||||
* ``upload`` firmware "auto-uploading" for embedded platforms
|
* ``upload`` firmware "auto-uploading" for embedded platforms
|
||||||
* ``program`` firmware "auto-uploading" for embedded platforms using external
|
* ``program`` firmware "auto-uploading" for embedded platforms using external
|
||||||
programmer (available only for :ref:`platform_atmelavr`)
|
programmer (available only for :ref:`platform_atmelavr`)
|
||||||
|
* ``buildfs`` :ref:`platform_espressif_uploadfs`
|
||||||
* ``uploadfs`` :ref:`platform_espressif_uploadfs`
|
* ``uploadfs`` :ref:`platform_espressif_uploadfs`
|
||||||
* ``envdump`` dump current build environment
|
* ``envdump`` dump current build environment
|
||||||
* ``size`` print the size of the sections in a firmware/program
|
* ``size`` print the size of the sections in a firmware/program
|
||||||
@ -62,7 +63,7 @@ Pre-built targets:
|
|||||||
.. option::
|
.. option::
|
||||||
--upload-port
|
--upload-port
|
||||||
|
|
||||||
Upload port of embedded board. To print all available ports use
|
Custom upload port of embedded board. To print all available ports use
|
||||||
:ref:`cmd_device` command.
|
:ref:`cmd_device` command.
|
||||||
|
|
||||||
If upload port is not specified, PlatformIO will try to detect it automatically.
|
If upload port is not specified, PlatformIO will try to detect it automatically.
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
.. _userguide:
|
.. _userguide:
|
||||||
|
|
||||||
User Guide
|
User Guide (CLI)
|
||||||
==========
|
================
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
@ -63,7 +63,9 @@ Commands
|
|||||||
cmd_ci
|
cmd_ci
|
||||||
cmd_device
|
cmd_device
|
||||||
cmd_init
|
cmd_init
|
||||||
|
platformio lib <lib/index>
|
||||||
platformio platform <platforms/index>
|
platformio platform <platforms/index>
|
||||||
|
platformio remote <remote/index>
|
||||||
cmd_run
|
cmd_run
|
||||||
cmd_settings
|
cmd_settings
|
||||||
cmd_test
|
cmd_test
|
||||||
|
100
docs/userguide/remote/cmd_agent.rst
Normal file
100
docs/userguide/remote/cmd_agent.rst
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. _cmd_remote_agent:
|
||||||
|
|
||||||
|
platformio remote agent
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Start :ref:`pio_remote_agent` on a local host machine and work remotely with
|
||||||
|
your devices **WITHOUT** extra software, services, SSH, VPN, tunneling or
|
||||||
|
opening incoming network ports.
|
||||||
|
|
||||||
|
:ref:`pio_remote` supports wired and wireless devices. Wired devices should be
|
||||||
|
connected physically to host machine where :ref:`pio_remote_agent` is started,
|
||||||
|
where wireless devices should be visible for :ref:`pio_remote_agent` to provide
|
||||||
|
network operations Over-The-Air.
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
platformio remote agent list
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Usage
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
platformio remote agent list
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
List active :ref:`pio_remote_agent` s started using own :ref:`cmd_account`
|
||||||
|
or shared with you by other PlatformIO developers.
|
||||||
|
|
||||||
|
Example
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
> platformio remote agent list
|
||||||
|
|
||||||
|
PlatformIO Plus (https://pioplus.com) v0.3.1
|
||||||
|
|
||||||
|
innomac.local
|
||||||
|
-------------
|
||||||
|
ID: 98853d930......788d77375e7
|
||||||
|
Started: 2016-10-26 16:32:56
|
||||||
|
|
||||||
|
------------
|
||||||
|
|
||||||
|
.. _cmd_remote_agent_start:
|
||||||
|
|
||||||
|
platformio remote agent start
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Usage
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
platformio remote agent start [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
Start :ref:`pio_remote_agent` and work remotely with your devices from
|
||||||
|
anywhere in the world. This command can be run as daemon or added to
|
||||||
|
autostart list of your OS.
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. program:: platformio remote agent start
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-n, --name
|
||||||
|
|
||||||
|
Agent name/alias. By default, machine's ``hostname`` will be used.
|
||||||
|
You can use this name later for :ref:`cmd_remote_device` and :ref:`cmd_remote_run`
|
||||||
|
commands. Good names are home, office, lab or etc.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-s, --share
|
||||||
|
|
||||||
|
Share your agent/devices with other PlatformIO developers who have
|
||||||
|
:ref:`cmd_account`: friends, co-workers, team, etc.
|
||||||
|
|
||||||
|
The valid value for ``--share`` option is E-Mail address that was used for
|
||||||
|
:ref:`cmd_account_register` command.
|
296
docs/userguide/remote/cmd_device.rst
Normal file
296
docs/userguide/remote/cmd_device.rst
Normal file
@ -0,0 +1,296 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. _cmd_remote_device:
|
||||||
|
|
||||||
|
platformio remote device
|
||||||
|
========================
|
||||||
|
|
||||||
|
**Over-The-Air (OTA) Device Manager. Monitor remote device or list existing.**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
.. _cmd_remote_device_list:
|
||||||
|
|
||||||
|
platformio remote device list
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Usage
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
platformio remote device list [OPTIONS]
|
||||||
|
|
||||||
|
# List devices from the specified agents. Multiple agents are allowed.
|
||||||
|
platformio remote --agent NAME device list [OPTIONS]
|
||||||
|
|
||||||
|
Description
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
List `Serial Ports <http://en.wikipedia.org/wiki/Serial_port>`_ on remote
|
||||||
|
machines where :ref:`pio_remote_agent` is started.
|
||||||
|
|
||||||
|
You can list devices from the specified remote machines using ``--agent NAME``
|
||||||
|
option between "remote" & "device" sub-commands. For example, you have run
|
||||||
|
:option:`platformio remote agent start --name` command with "home" and "office"
|
||||||
|
options:
|
||||||
|
|
||||||
|
* ``platformio remote agent start --name home``
|
||||||
|
* ``platformio remote agent start --name office``
|
||||||
|
|
||||||
|
Now, to list devices from office machine please use
|
||||||
|
``platformio remote --agent office device list``.
|
||||||
|
|
||||||
|
Multiple agents are allowed (
|
||||||
|
``platformio remote --agent lab1 --agent lab3 device ...``).
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. program:: platformio remote device list
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--json-output
|
||||||
|
|
||||||
|
Return the output in `JSON <http://en.wikipedia.org/wiki/JSON>`_ format
|
||||||
|
|
||||||
|
|
||||||
|
Example
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
> platformio remote device list
|
||||||
|
|
||||||
|
PlatformIO Plus (https://pioplus.com) v0.3.1
|
||||||
|
|
||||||
|
Agent innomac.local
|
||||||
|
===================
|
||||||
|
/dev/cu.Bluetooth-Incoming-Port
|
||||||
|
-------------------------------
|
||||||
|
Hardware ID: n/a
|
||||||
|
Description: n/a
|
||||||
|
/dev/cu.obd2ecu-SPPDev
|
||||||
|
----------------------
|
||||||
|
Hardware ID: n/a
|
||||||
|
Description: n/a
|
||||||
|
/dev/cu.usbmodemFA1431
|
||||||
|
----------------------
|
||||||
|
Hardware ID: USB VID:PID=2A03:0043 SER=75435353038351015271 LOCATION=250-1.4.3
|
||||||
|
Description: Arduino Uno
|
||||||
|
/dev/cu.usbserial-A6004003
|
||||||
|
--------------------------
|
||||||
|
Hardware ID: USB VID:PID=0403:6001 SER=A6004003 LOCATION=253-1.3.1
|
||||||
|
Description: FT232R USB UART - FT232R USB UART
|
||||||
|
/dev/cu.SLAB_USBtoUART
|
||||||
|
----------------------
|
||||||
|
Hardware ID: USB VID:PID=10C4:EA60 SER=0001 LOCATION=253-1.3.2
|
||||||
|
Description: CP2102 USB to UART Bridge Controller - CP2102 USB to UART Bridge Controller
|
||||||
|
/dev/cu.usbmodem589561
|
||||||
|
----------------------
|
||||||
|
Hardware ID: USB VID:PID=16C0:0483 SER=589560 LOCATION=250-1.4.1
|
||||||
|
Description: USB Serial
|
||||||
|
|
||||||
|
|
||||||
|
.. _cmd_remote_device_monitor:
|
||||||
|
|
||||||
|
platformio remote device monitor
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Usage
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
platformio remote device monitor [OPTIONS]
|
||||||
|
|
||||||
|
# Connect to a specified agent
|
||||||
|
platformio remote --agent NAME device monitor [OPTIONS]
|
||||||
|
platformio remote -a NAME device monitor [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
~~~~~~~~~~~
|
||||||
|
|
||||||
|
Connect to remote device Over-The-Air (OTA) and receive or send data in
|
||||||
|
real time. :ref:`pio_remote_agent` should be started before.
|
||||||
|
|
||||||
|
To control *monitor* please use these "hot keys":
|
||||||
|
|
||||||
|
* ``Ctrl+C`` Quit
|
||||||
|
* ``Ctrl+T`` Menu
|
||||||
|
* ``Ctrl+T followed by Ctrl+H`` Help
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. program:: platformio remote device monitor
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-p, --port
|
||||||
|
|
||||||
|
Port, a number or a device name
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-b, --baud
|
||||||
|
|
||||||
|
Set baud rate, default ``9600``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--parity
|
||||||
|
|
||||||
|
Set parity (*None, Even, Odd, Space, Mark*), one of
|
||||||
|
[``N``, ``E``, ``O``, ``S``, ``M``], default ``N``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--rtscts
|
||||||
|
|
||||||
|
Enable ``RTS/CTS`` flow control, default ``Off``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--xonxoff
|
||||||
|
|
||||||
|
Enable software flow control, default ``Off``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--rts
|
||||||
|
|
||||||
|
Set initial ``RTS`` line state, default ``0``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--dtr
|
||||||
|
|
||||||
|
Set initial ``DTR`` line state, default ``0``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--encoding
|
||||||
|
|
||||||
|
Set the encoding for the serial port (e.g. ``hexlify``, ``Latin1``, ``UTF-8``),
|
||||||
|
default ``UTF-8``.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-f, --filter
|
||||||
|
|
||||||
|
Add text transformation. Available filters:
|
||||||
|
|
||||||
|
* ``colorize`` Apply different colors for received and echo
|
||||||
|
* ``debug`` Print what is sent and received
|
||||||
|
* ``default`` Remove typical terminal control codes from input
|
||||||
|
* ``direct`` Do-nothing: forward all data unchanged
|
||||||
|
* ``nocontrol`` Remove all control codes, incl. CR+LF
|
||||||
|
* ``printable`` Show decimal code for all non-ASCII characters and replace
|
||||||
|
most control codes
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--eol
|
||||||
|
|
||||||
|
End of line mode (``CR``, ``LF`` or ``CRLF``), default ``CRLF``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--raw
|
||||||
|
|
||||||
|
Do not apply any encodings/transformations
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--exit-char
|
||||||
|
|
||||||
|
ASCII code of special character that is used to exit the application,
|
||||||
|
default ``3`` (DEC, ``Ctrl+C``).
|
||||||
|
|
||||||
|
For example, to use ``Ctrl+]`` run
|
||||||
|
``platformio remote device monitor --exit-char 29``.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--menu-char
|
||||||
|
|
||||||
|
ASCII code of special character that is used to control miniterm (menu),
|
||||||
|
default ``20`` (DEC)
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
---quiet
|
||||||
|
|
||||||
|
Diagnostics: suppress non-error messages, default ``Off``
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--echo
|
||||||
|
|
||||||
|
Enable local echo, default ``Off``
|
||||||
|
|
||||||
|
Examples
|
||||||
|
~~~~~~~~
|
||||||
|
|
||||||
|
1. Show available options for *monitor*
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
> platformio remote device monitor --help
|
||||||
|
|
||||||
|
Usage: platformio remote device monitor [OPTIONS]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-p, --port TEXT Port, a number or a device name
|
||||||
|
-b, --baud INTEGER Set baud rate, default=9600
|
||||||
|
--parity [N|E|O|S|M] Set parity, default=N
|
||||||
|
--rtscts Enable RTS/CTS flow control, default=Off
|
||||||
|
--xonxoff Enable software flow control, default=Off
|
||||||
|
--rts [0|1] Set initial RTS line state, default=0
|
||||||
|
--dtr [0|1] Set initial DTR line state, default=0
|
||||||
|
--echo Enable local echo, default=Off
|
||||||
|
--encoding TEXT Set the encoding for the serial port (e.g. hexlify,
|
||||||
|
Latin1, UTF-8), default: UTF-8
|
||||||
|
-f, --filter TEXT Add text transformation
|
||||||
|
--eol [CR|LF|CRLF] End of line mode, default=CRLF
|
||||||
|
--raw Do not apply any encodings/transformations
|
||||||
|
--exit-char INTEGER ASCII code of special character that is used to exit
|
||||||
|
the application, default=29 (DEC)
|
||||||
|
--menu-char INTEGER ASCII code of special character that is used to
|
||||||
|
control miniterm (menu), default=20 (DEC)
|
||||||
|
--quiet Diagnostics: suppress non-error messages, default=Off
|
||||||
|
-h, --help Show this message and exit.
|
||||||
|
|
||||||
|
2. Communicate with serial device and print help inside terminal
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
> platformio remote device monitor
|
||||||
|
|
||||||
|
--- Available ports:
|
||||||
|
--- /dev/cu.Bluetooth-Incoming-Port n/a
|
||||||
|
--- /dev/cu.Bluetooth-Modem n/a
|
||||||
|
--- /dev/cu.SLAB_USBtoUART CP2102 USB to UART Bridge Controller
|
||||||
|
--- /dev/cu.obd2ecu-SPPDev n/a
|
||||||
|
Enter port name:/dev/cu.SLAB_USBtoUART
|
||||||
|
--- Miniterm on /dev/cu.SLAB_USBtoUART: 9600,8,N,1 ---
|
||||||
|
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
|
||||||
|
Hello PlatformIO!
|
||||||
|
---
|
||||||
|
--- Ctrl+] Exit program
|
||||||
|
--- Ctrl+T Menu escape key, followed by:
|
||||||
|
--- Menu keys:
|
||||||
|
--- Ctrl+T Send the menu character itself to remote
|
||||||
|
--- Ctrl+] Send the exit character itself to remote
|
||||||
|
--- Ctrl+I Show info
|
||||||
|
--- Ctrl+U Upload file (prompt will be shown)
|
||||||
|
--- Toggles:
|
||||||
|
--- Ctrl+R RTS Ctrl+E local echo
|
||||||
|
--- Ctrl+D DTR Ctrl+B BREAK
|
||||||
|
--- Ctrl+L line feed Ctrl+A Cycle repr mode
|
||||||
|
---
|
||||||
|
--- Port settings (Ctrl+T followed by the following):
|
||||||
|
--- p change port
|
||||||
|
--- 7 8 set data bits
|
||||||
|
--- n e o s m change parity (None, Even, Odd, Space, Mark)
|
||||||
|
--- 1 2 3 set stop bits (1, 2, 1.5)
|
||||||
|
--- b change baud rate
|
||||||
|
--- x X disable/enable software flow control
|
||||||
|
--- r R disable/enable hardware flow control
|
||||||
|
--- exit ---
|
199
docs/userguide/remote/cmd_run.rst
Normal file
199
docs/userguide/remote/cmd_run.rst
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. _cmd_remote_run:
|
||||||
|
|
||||||
|
platformio remote run
|
||||||
|
=====================
|
||||||
|
|
||||||
|
**Over-The-Air (OTA) Firmware Uploading**
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
platformio remote run [OPTIONS]
|
||||||
|
|
||||||
|
# process environments using specified PIO Remote Agent
|
||||||
|
platformio remote --agent NAME run [OPTIONS]
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Process remotely environments which are defined in :ref:`projectconf` file.
|
||||||
|
By default, :ref:`pio_remote` builds project on the local machine and deploy
|
||||||
|
final firmware Over-The-Air (OTA) to remote device.
|
||||||
|
|
||||||
|
If you need to build project on remote machine, please use
|
||||||
|
:option:`platformio remote run --build-remotely` option. In this case,
|
||||||
|
:ref:`pio_remote` will automatically deploy your project to remote machine,
|
||||||
|
install required toolchains, frameworks, SDKs, etc and build/upload firmware.
|
||||||
|
|
||||||
|
|
||||||
|
Options
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. program:: platformio remote run
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-e, --environment
|
||||||
|
|
||||||
|
Process specified environments.
|
||||||
|
|
||||||
|
You can also specify which environments should be processed by default using
|
||||||
|
:ref:`projectconf_pio_env_default` option from :ref:`projectconf`.
|
||||||
|
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-t, --target
|
||||||
|
|
||||||
|
Process specified targets.
|
||||||
|
|
||||||
|
Built-in targets:
|
||||||
|
|
||||||
|
* ``clean`` delete compiled object files, libraries and firmware/program binaries
|
||||||
|
* ``upload`` firmware "auto-uploading" for embedded platforms
|
||||||
|
* ``program`` firmware "auto-uploading" for embedded platforms using external
|
||||||
|
programmer (available only for :ref:`platform_atmelavr`)
|
||||||
|
* ``buildfs`` :ref:`platform_espressif_uploadfs`
|
||||||
|
* ``uploadfs`` :ref:`platform_espressif_uploadfs`
|
||||||
|
* ``envdump`` dump current build environment
|
||||||
|
* ``size`` print the size of the sections in a firmware/program
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--upload-port
|
||||||
|
|
||||||
|
Custom upload port of embedded board. To print all available ports use
|
||||||
|
:ref:`cmd_remote_device` command.
|
||||||
|
|
||||||
|
If upload port is not specified, PlatformIO will try to detect it automatically.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-d, --project-dir
|
||||||
|
|
||||||
|
Specify the path to project directory. By default, ``--project-dir`` is equal
|
||||||
|
to current working directory (``CWD``).
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-v, --verbose
|
||||||
|
|
||||||
|
Shows detailed information when processing environments.
|
||||||
|
|
||||||
|
This option can be set globally using :ref:`setting_force_verbose` setting
|
||||||
|
or by environment variable :envvar:`PLATFORMIO_SETTING_FORCE_VERBOSE`.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--disable-auto-clean
|
||||||
|
|
||||||
|
Disable auto-clean of :ref:`projectconf_pio_envs_dir` when :ref:`projectconf`
|
||||||
|
or :ref:`projectconf_pio_src_dir` (project structure) have been modified.
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
-r, --build-remotely
|
||||||
|
|
||||||
|
By default, :ref:`pio_remote` builds project on the local machine and deploy
|
||||||
|
final firmware Over-The-Air (OTA) to remote device.
|
||||||
|
|
||||||
|
If you need to build project on remote machine, please use
|
||||||
|
:option:`platformio remote run --build-remotely` option. In this case,
|
||||||
|
:ref:`pio_remote` will automatically deploy your project to remote machine,
|
||||||
|
install required toolchains, frameworks, SDKs, etc and build/upload firmware.
|
||||||
|
|
||||||
|
Example
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. code::
|
||||||
|
|
||||||
|
> platformio remote run --environment uno --target upload
|
||||||
|
|
||||||
|
PlatformIO Plus (https://pioplus.com) v0.3.1
|
||||||
|
Building project locally
|
||||||
|
[Wed Oct 26 16:35:09 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
Verbose mode can be enabled via `-v, --verbose` option
|
||||||
|
Collected 25 compatible libraries
|
||||||
|
Looking for dependencies...
|
||||||
|
Project does not have dependencies
|
||||||
|
Compiling .pioenvs/uno/src/main.o
|
||||||
|
Archiving .pioenvs/uno/libFrameworkArduinoVariant.a
|
||||||
|
Indexing .pioenvs/uno/libFrameworkArduinoVariant.a
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/CDC.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial0.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial1.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial2.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/HardwareSerial3.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/IPAddress.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/PluggableUSB.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/Print.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/Stream.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/Tone.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/USBCore.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/WInterrupts.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/WMath.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/WString.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/_wiring_pulse.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/abi.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/hooks.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/main.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/new.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/wiring.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/wiring_analog.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/wiring_digital.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/wiring_pulse.o
|
||||||
|
Compiling .pioenvs/uno/FrameworkArduino/wiring_shift.o
|
||||||
|
Archiving .pioenvs/uno/libFrameworkArduino.a
|
||||||
|
Indexing .pioenvs/uno/libFrameworkArduino.a
|
||||||
|
Linking .pioenvs/uno/firmware.elf
|
||||||
|
Checking program size
|
||||||
|
Building .pioenvs/uno/firmware.hex
|
||||||
|
text data bss dec hex filename
|
||||||
|
2574 48 168 2790 ae6 .pioenvs/uno/firmware.elf
|
||||||
|
========================= [SUCCESS] Took 10.01 seconds =======================
|
||||||
|
================================== [SUMMARY] =================================
|
||||||
|
Environment nodemcuv2 [SKIP]
|
||||||
|
Environment uno_pic32 [SKIP]
|
||||||
|
Environment teensy31 [SKIP]
|
||||||
|
Environment uno [SUCCESS]
|
||||||
|
========================= [SUCCESS] Took 10.01 seconds ========================
|
||||||
|
Uploading firmware remotely
|
||||||
|
[Wed Oct 26 19:35:20 2016] Processing uno (platform: atmelavr, board: uno, framework: arduino)
|
||||||
|
----------------------------------------------------------------------------------------------
|
||||||
|
Verbose mode can be enabled via `-v, --verbose` option
|
||||||
|
Looking for upload port...
|
||||||
|
Auto-detected: /dev/cu.usbmodemFA1431
|
||||||
|
Uploading .pioenvs/uno/firmware.hex
|
||||||
|
avrdude: AVR device initialized and ready to accept instructions
|
||||||
|
Reading | ################################################## | 100% 0.00s
|
||||||
|
avrdude: Device signature = 0x1e950f
|
||||||
|
avrdude: reading input file ".pioenvs/uno/firmware.hex"
|
||||||
|
avrdude: writing flash (2622 bytes):
|
||||||
|
Writing | ################################################## | 100% 0.43s
|
||||||
|
avrdude: 2622 bytes of flash written
|
||||||
|
avrdude: verifying flash memory against .pioenvs/uno/firmware.hex:
|
||||||
|
avrdude: load data flash data from input file .pioenvs/uno/firmware.hex:
|
||||||
|
avrdude: input file .pioenvs/uno/firmware.hex contains 2622 bytes
|
||||||
|
avrdude: reading on-chip flash data:
|
||||||
|
Reading | ################################################## | 100% 0.34s
|
||||||
|
avrdude: verifying ...
|
||||||
|
avrdude: 2622 bytes of flash verified
|
||||||
|
avrdude done. Thank you.
|
||||||
|
========================= [SUCCESS] Took 3.04 seconds =======================
|
||||||
|
========================= [SUMMARY] =========================================
|
||||||
|
Environment nodemcuv2 [SKIP]
|
||||||
|
Environment uno_pic32 [SKIP]
|
||||||
|
Environment teensy31 [SKIP]
|
||||||
|
Environment uno [SUCCESS]
|
||||||
|
========================= [SUCCESS] Took 3.04 seconds ========================
|
47
docs/userguide/remote/index.rst
Normal file
47
docs/userguide/remote/index.rst
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. _userguide_remote:
|
||||||
|
|
||||||
|
PIO Remote™ CLI
|
||||||
|
===============
|
||||||
|
|
||||||
|
:ref:`pio_remote` allows you to work remotely with devices from
|
||||||
|
*Anywhere In The World*. No matter where are you now! Run small and
|
||||||
|
cross-platform :ref:`pio_remote_agent` on a host machine and you will be able to
|
||||||
|
list active devices (wireless + wired), to upload firmware **Over-The-Air (OTA)**,
|
||||||
|
to process remote unit tests, or to start remote debugging session via OTA
|
||||||
|
Serial Port Monitor.
|
||||||
|
|
||||||
|
Using :ref:`pio_remote` you can share your devices with friends or team. In
|
||||||
|
combination with Cloud IDE, you can create awesome things at any time when
|
||||||
|
inspiration comes to you.
|
||||||
|
|
||||||
|
You should have :ref:`cmd_account` to work with :ref:`pio_remote`.
|
||||||
|
A registration is **FREE**.
|
||||||
|
|
||||||
|
For detailed information please follow to :ref:`pio_remote` page.
|
||||||
|
|
||||||
|
To print all available commands and options use:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
pio remote --help
|
||||||
|
platformio remote --help
|
||||||
|
platformio remote COMMAND --help
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
cmd_agent
|
||||||
|
cmd_device
|
||||||
|
cmd_run
|
@ -69,6 +69,7 @@ def remote_agent_list():
|
|||||||
@click.option("-s", "--silent", is_flag=True)
|
@click.option("-s", "--silent", is_flag=True)
|
||||||
@click.option("-v", "--verbose", is_flag=True)
|
@click.option("-v", "--verbose", is_flag=True)
|
||||||
@click.option("-r", "--build-remotely", is_flag=True)
|
@click.option("-r", "--build-remotely", is_flag=True)
|
||||||
|
@click.option("--disable-auto-clean", is_flag=True)
|
||||||
def remote_run(**kwargs):
|
def remote_run(**kwargs):
|
||||||
pioplus_call(sys.argv[1:])
|
pioplus_call(sys.argv[1:])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user