acassis commented on code in PR #17461:
URL: https://github.com/apache/nuttx/pull/17461#discussion_r2603574859
##########
Documentation/platforms/sim/sim/boards/sim/index.rst:
##########
@@ -1859,6 +1859,30 @@ This is a configuration with sim usbhost support.
Run sim usbhost with root mode, run sim usbdev or plug-in cdcacm usb device.
Then you can use ``/dev/ttyACM`` to transfer data.
+ Here we will demonstrate an example of interaction between sim usbhost and
+ sim usbdev. Build two executable files using the configurations
``sim:usbdev``
+ and ``sim:usbhost`` respectively.
+
+ Run two executable files with root mode. Then, run CDCACM in usbdev.
+
+ .. code:: console
+
+ $ conn 1
+
+ Enter commands to read CDCACM on the usbhost:
+
+ .. code:: console
+
+ $ cat /dev/ttyACM0 &
+
+ Enter commands to write CDCACM on the usbdev:
+
+ .. code:: console
+
+ $ echo hello > /dev/ttyACM0
Review Comment:
```suggestion
nsh> echo hello > /dev/ttyACM0
##########
Documentation/platforms/sim/sim/boards/sim/index.rst:
##########
@@ -1859,6 +1859,30 @@ This is a configuration with sim usbhost support.
Run sim usbhost with root mode, run sim usbdev or plug-in cdcacm usb device.
Then you can use ``/dev/ttyACM`` to transfer data.
+ Here we will demonstrate an example of interaction between sim usbhost and
+ sim usbdev. Build two executable files using the configurations
``sim:usbdev``
+ and ``sim:usbhost`` respectively.
+
+ Run two executable files with root mode. Then, run CDCACM in usbdev.
+
+ .. code:: console
+
+ $ conn 1
+
+ Enter commands to read CDCACM on the usbhost:
+
+ .. code:: console
+
+ $ cat /dev/ttyACM0 &
Review Comment:
```suggestion
nsh> cat /dev/ttyACM0 &
##########
Documentation/platforms/sim/sim/boards/sim/index.rst:
##########
@@ -1859,6 +1859,30 @@ This is a configuration with sim usbhost support.
Run sim usbhost with root mode, run sim usbdev or plug-in cdcacm usb device.
Then you can use ``/dev/ttyACM`` to transfer data.
+ Here we will demonstrate an example of interaction between sim usbhost and
+ sim usbdev. Build two executable files using the configurations
``sim:usbdev``
+ and ``sim:usbhost`` respectively.
+
+ Run two executable files with root mode. Then, run CDCACM in usbdev.
Review Comment:
```suggestion
Run each executable files as root in different terminals.
Terminal 1 (run nuttx binary from sim:usbhost) :
.. code:: console
$ sudo ./nuttx
Terminal 2 (run nuttx binary from sim:usbdev) :
.. code:: console
$ sudo ./nuttx
Then, run CDCACM in usbdev.
##########
Documentation/platforms/sim/sim/boards/sim/index.rst:
##########
@@ -1859,6 +1859,30 @@ This is a configuration with sim usbhost support.
Run sim usbhost with root mode, run sim usbdev or plug-in cdcacm usb device.
Then you can use ``/dev/ttyACM`` to transfer data.
+ Here we will demonstrate an example of interaction between sim usbhost and
+ sim usbdev. Build two executable files using the configurations
``sim:usbdev``
+ and ``sim:usbhost`` respectively.
+
+ Run two executable files with root mode. Then, run CDCACM in usbdev.
+
+ .. code:: console
+
+ $ conn 1
Review Comment:
```suggestion
nsh> conn 1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]