$ echo 102 > /sys/class/gpio/export
$ echo 103 > /sys/class/gpio/export
$ echo 253 > /sys/class/gpio/export
$ echo out > /sys/class/gpio/gpio102/direction
$ echo out > /sys/class/gpio/gpio103/direction
$ echo out > /sys/class/gpio/gpio253/direction
RS485 RX
$ echo 0 > /sys/class/gpio/gpio102/value
$ echo 1 > /sys/class/gpio/gpio103/value
$ echo 0 > /sys/class/gpio/gpio253/value
RS485 TX
$ echo 0 > /sys/class/gpio/gpio102/value
$ echo 1 > /sys/class/gpio/gpio103/value
$ echo 1 > /sys/class/gpio/gpio253/value
Notice:
1. JCOM2 is using the same way as JCOM1 but the GPIO number is different.
2. RS485 is not auto direction.
3. Please follow below table to set up M0 & M1 for Loopback、RS232 and RS422, don’t need to set up flow.
2023103003