I have a device that can only be controlled via RS232, and I have a USB-to-serial adapter. Prior to setting up Proxmox, I successfully used this setup to issue commands (and read the results) via shell commands on my Home Assistant OS VM running within a VirtualBox VM in Windows. There is an application (in this case, Home Assistant) that normally sends the shell commands, but I can mimic the interaction with a pair of terminals.
Since I moved to Proxmox, however, I can't read the output from the RS232 device. The USB device is passed through successfully to the VM by Proxmox, it shows up as expected in the VM's logs and attaches to ttyUSB0, and I can even send commands to it...but I cannot receive.
That is, I cannot receive output until I physically disconnect the USB cable from the computer. Then, I suddenly get a flood of output, like it's been receiving my commands and something along the way has been buffering the output, and the buffer doesn't clear/send until it is physically unplugged for some reason.
For example, both of these commands should result in output:
But on another terminal running
, there's nothing...until I physically unplug the USB cable, then it all dumps:
Those are two separate outputs for the two commands above, but neither shows until I unplug the USB cable.
I've tried fiddling with various stty parameters (which control settings for the serial interface), to no avail. The only thing that's changed in this whole setup between when it was working and not working is that Proxmox became my virtualization layer instead of Windows+VirtualBox, so I'm hoping someone here can steer me in the right direction.
Running Proxmox VE 7.4-3.
Since I moved to Proxmox, however, I can't read the output from the RS232 device. The USB device is passed through successfully to the VM by Proxmox, it shows up as expected in the VM's logs and attaches to ttyUSB0, and I can even send commands to it...but I cannot receive.
That is, I cannot receive output until I physically disconnect the USB cable from the computer. Then, I suddenly get a flood of output, like it's been receiving my commands and something along the way has been buffering the output, and the buffer doesn't clear/send until it is physically unplugged for some reason.
For example, both of these commands should result in output:
Code:
stty -F /dev/ttyUSB0 raw;
echo -e -n ">GetVideo\r\n" > /dev/ttyUSB0
echo -e -n ">SetVideo 02\r\n" > /dev/ttyUSB0
But on another terminal running
Code:
tail -f /dev/ttyUSB0
Code:
02
<Video 02
Those are two separate outputs for the two commands above, but neither shows until I unplug the USB cable.
I've tried fiddling with various stty parameters (which control settings for the serial interface), to no avail. The only thing that's changed in this whole setup between when it was working and not working is that Proxmox became my virtualization layer instead of Windows+VirtualBox, so I'm hoping someone here can steer me in the right direction.
Running Proxmox VE 7.4-3.