3cky / mbusd

Open-source Modbus TCP to Modbus RTU (RS-232/485) gateway.
BSD 3-Clause "New" or "Revised" License
565 stars 216 forks source link

/dev/ttyUSB0 is starting like /dev/ttyS0 #82

Open dar3khudy opened 2 years ago

dar3khudy commented 2 years ago

I'm using it with USB to RS485 converter which is present like /dev/ttyUSB0, but when I'm starting mbusd it is opening ttyS0 (in my case it is different port!) sudo mbusd -d /dev/ttyUSB0 -s 9600 -m 8N1 -t -P 5002 07 Jan 2022 10:54:35 mbusd-0.5.1 started... 07 Jan 2022 10:54:35 tty: trying to open /dev/ttyS0 (speed 9600 mode 8N1) I have fixed it by remove ttyS0 and symbolic linc it to USB0 but it is not like should be :( When I added this port to /etc/mbusd/ttyUSB0 and started it like a service then everythig was fine.

wax911 commented 2 years ago

Aren't you suppose to use -p /dev/ttyUSB0 since -p is the param for the device? 🤔