Yes, this case is also in the initial design but we never used this before. Glad to see it work for you.
On Thu, Nov 4, 2021 at 6:19 PM Fotis Panagiotopoulos <f.j.pa...@gmail.com> wrote: > > No, The emulated UART is designed to work with the real UART on host. > Oh, now I understand how it works! > > In my case, however, I also wanted a "simulated" UART, not a physical one. > So I run: > > socat PTY,link=/dev/ttySIM0 PTY,link=/dev/ttyNX > > and indeed our software was perfectly capable of communicating with the > simulation. > Both softwares now run unaltered, both "thinking" of talking to each other > through a UART, as in a the real-world case. > Perfect! > > Needless to say that this is a killer feature of NuttX. > It opens up a huge array of possibilities for testing (especially automated > / CI), and development without the strict need of hardware. > > Thank you all! > > > Στις Τετ, 3 Νοε 2021 στις 3:36 μ.μ., ο/η Alan Carvalho de Assis < > acas...@gmail.com> έγραψε: > > > On 11/3/21, Xiang Xiao <xiaoxiang781...@gmail.com> wrote: > > > On Wed, Nov 3, 2021 at 8:06 PM Tomasz CEDRO <to...@cedro.info> wrote: > > > > > >> On Wed, Nov 3, 2021 at 11:37 AM Fotis Panagiotopoulos wrote: > > >> > I am working on a new NuttX-based firmware. > > >> > On this application a hardware board will be able to communicate > > >> > through > > >> > UART with a Linux system. > > >> > > > >> > There is still some testing and development to be done on this Linux > > >> > program, so I thought that this is a great use for the simulator. > > >> > Instead > > >> > of passing actual hardware boards to every developer, they can > > >> > start-off > > >> > with a simulator app for the first steps. > > >> > > >> This sounds like a very useful feature! I have no experience yet in > > >> this area but sounds like local or network socket could be useful here > > >> to pipe UART from/to the simulator? :-) > > >> > > > > > > You can get the network capability with: > > > 1.Through tap device > > > incubator-nuttx/NETWORK-LINUX.txt at master · apache/incubator-nuttx > > > (github.com) > > > < > > > https://github.com/apache/incubator-nuttx/blob/master/boards/sim/sim/sim/NETWORK-LINUX.txt > > > > > > 2.Through VPN > > > incubator-nuttx/NETWORK-VPNKIT.txt at master · > apache/incubator-nuttx > > > (github.com) > > > < > > > https://github.com/apache/incubator-nuttx/blob/master/boards/sim/sim/sim/NETWORK-VPNKIT.txt > > > > > > 3.Through usrsock > > > All possible option is documented here: > > > incubator-nuttx/Kconfig at master · apache/incubator-nuttx (github.com > ) > > > < > > > https://github.com/apache/incubator-nuttx/blob/master/arch/sim/Kconfig#L137-L177 > > > > > > > > > You can even simulate the functional audio/display/touchscreen and > > SMP/AMP > > > with sim. > > > > > > > Also from any board running NuttX with network support you can use > > FIFO e netcat to get data directly from your application output this > > say: > > > > nsh> mkfifo /dev/fifo > > nsh> myapp > /dev/fifo & > > nsh> netcat 192.168.0.15 10123 /dev/fifo > > > > > > > https://acassis.wordpress.com/2021/03/04/using-fifo-on-nuttx-to-send-data-from-your-board-to-computer/ > > > > Then in your computer (IP 192.168.0.15 in this example) you just run: > > > > $ nc -l 10123 > > > > BR, > > > > Alan > > >