On Thu, Jan 31, 2019 at 06:30:24PM +0500, Muhammad Bilal wrote:
> Is it possible in QEMU to loopback UART devices? Like if I have two UARTS
> and I can redirect one to other. Like I connect both serial ports of target
> with each other via NULL modem?
Did you try forwarding both ports to a PTY and then tying the PTY
devices with socat on the host?
$ qemu -serial pty -serial pty ...
qemu: -serial pty: char device redirected to /dev/pts/10 (label serial0)
qemu: -serial pty: char device redirected to /dev/pts/11 (label serial1)
$ socat /dev/pts/10 /dev/pts/11
I have used pty redirection and socat in the past, but I haven't tried
your particular use case. Just giving a possible direction to look into.