acassis commented on a change in pull request #5295:
URL: https://github.com/apache/incubator-nuttx/pull/5295#discussion_r791681134



##########
File path: arch/sim/Kconfig
##########
@@ -422,28 +422,87 @@ endchoice
 
 endif
 
+menu "Simulated UART"
+
 config SIM_UART_NUMBER
-       int "The number of tty ports on sim platform, range is 0~4"
+       int "Number of simulated UART ports"
        default 0
+       range 0 4
+       ---help---
+               Under simulation, a NuttX port can be bound to a serial
+               port on the host machine. This way NuttX can access the
+               host's hardware directly.
+               
+               The NuttX and the host serial ports must have the same
+               name for this to work.
+               
+               The host's port is not necessary to be an actual h/w port.
+               You can create a "simulated" port in your host too,
+               by running:
+               
+                       socat PTY,link=/dev/ttySIM0 PTY,link=/dev/ttyNX0
+                       stty -F /dev/ttySIM0 raw
+                       stty -F /dev/ttyNX0 raw
+               
+               In this case NuttX will use the ttySIM0 port, and another
+               software may open and use the ttyNX0 port.
+               This way other softwares may communicate directly with
+               the simulation.

Review comment:
       @fjpanag I think the "--help--" here should also show how the users can 
use a physical port (i.e. /dev/ttyUSB0). Although you said "can be bound to a 
serial port on the host machine" and that the port don't need to be an actual 
h/w port it will be confuse to newcomers to realize they can use a physical 
port because all the default names are to /dev/ttySIM0. I suggest start showing 
that he could use the physical port before creating new virtual ports using 
socat

##########
File path: arch/sim/Kconfig
##########
@@ -422,28 +422,87 @@ endchoice
 
 endif
 
+menu "Simulated UART"
+
 config SIM_UART_NUMBER
-       int "The number of tty ports on sim platform, range is 0~4"
+       int "Number of simulated UART ports"
        default 0
+       range 0 4
+       ---help---
+               Under simulation, a NuttX port can be bound to a serial
+               port on the host machine. This way NuttX can access the
+               host's hardware directly.
+               
+               The NuttX and the host serial ports must have the same
+               name for this to work.
+               
+               The host's port is not necessary to be an actual h/w port.
+               You can create a "simulated" port in your host too,
+               by running:
+               
+                       socat PTY,link=/dev/ttySIM0 PTY,link=/dev/ttyNX0
+                       stty -F /dev/ttySIM0 raw
+                       stty -F /dev/ttyNX0 raw
+               
+               In this case NuttX will use the ttySIM0 port, and another
+               software may open and use the ttyNX0 port.
+               This way other softwares may communicate directly with
+               the simulation.

Review comment:
       @fjpanag I think the "--help--" here should also show how the users can 
use a physical port (i.e. /dev/ttyUSB0). Although you said "can be bound to a 
serial port on the host machine" and that the port doesn't need to be an actual 
h/w port it will be confuse to newcomers to realize they can use a physical 
port because all the default names are to /dev/ttySIM0. I suggest start showing 
that he could use the physical port before creating new virtual ports using 
socat




-- 
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]


Reply via email to