Using virtual-serial port with socat + stm32flash
RaulTrombin opened this issue · 0 comments
RaulTrombin commented
Hello, I'm using the espHome to communicate with a device using the serial port, specially a STM32 device.
I'm able to listen the RX/TX with screen:
socat -v -d -d pty,raw,echo=0 tcp:192.168.2.105:1234
then
screen /dev/ttys005 115200
And it seems to work very nice here, I`m able read all the msgs, except sometimes it seems to lag a bit.
Now I'm tryng to use it with stm32flash:
sudo stm32flash -b 115200 /dev/ttys005
socat debug:
https://pastebin.com/baxDTWL2
Could someone give a tip if I can improve and make it work for this purpose?
YAML settings:
external_components:
- source: github://oxan/esphome-stream-server
logger:
baud_rate: 0
uart:
id: uart_bus
tx_pin: GPIO1
rx_pin: GPIO3
baud_rate: 115200
rx_buffer_size: 4096
stream_server:
uart_id: uart_bus
port: 1234
custom_component:
- lambda: |-
auto stream_server = new StreamServerComponent(id(uart_bus));
return {stream_server};