How to switch the EC942’s serial port mode (RS-232/RS-485/RS-422)?

How to switch the EC942’s serial port mode (RS-232/RS-485/RS-422)?

Use the ih_uart_ctl command: 1. COM1 corresponds to /dev/ttyS3 (port_num=0), COM2 to /dev/ttyS4 (port_num=1). 2. To view current mode: sudo ih_uart_ctl port_num=0. 3. To switch mode (e.g., COM1 to RS-485): sudo ih_uart_ctl port_num=0 uart_mode=1 (0=RS-232, 1=RS-485, 2=RS-422).