AIR-020-RS-485

From ESS-WIKI
Revision as of 09:55, 23 May 2023 by Liszt.kao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

調整COM的dip switch皆是調整_SW1那組
COM1 : COM1_SW1
COM2 : COM2_SW2
Jetson air020 board com.jpg RTENOTITLE
Xavier-NX

COM1 : /dev/ttyTHS1
COM2 : /dev/ttyTHS0
[硬體控制]
COM2 -> COM1
COM1_SW1 ON-ON-ON-ON, COM2_SW1 ON-ON-ON-OFF

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS0

COM1 -> COM2
COM1_SW1 ON-ON-ON-OFF, COM2_SW1 ON-ON-ON-ON

stty -F /dev/ttyTHS0 speed 115200
stty -F /dev/ttyTHS1 speed 115200
cat /dev/ttyTHS0 &
echo "1234" > /dev/ttyTHS1

[軟體控制]
COM1_SW1/COM2_SW1 ON-ON-OFF-OFF
COM2 -> COM1

echo 478 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio478/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS0 speed 115200
cat /dev/ttyTHS1 &
echo 1 > /sys/class/gpio/gpio478/value
echo "1234" > /dev/ttyTHS0
echo 0 > /sys/class/gpio/gpio478/value

COM1 -> COM2

echo 428 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio428/direction
stty -F /dev/ttyTHS0 speed 115200
stty -F /dev/ttyTHS1 speed 115200
cat /dev/ttyTHS0 &
echo 1 > /sys/class/gpio/gpio428/value
echo "1234" > /dev/ttyTHS1
echo 0 > /sys/class/gpio/gpio428/value

TX2-NX

COM1 : /dev/ttyTH1
COM2 : /dev/ttyTH2
[硬體控制]
COM2 -> COM1
COM1_SW1 ON-ON-ON-ON, COM2_SW1 ON-ON-ON-OFF

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS2

COM1 -> COM2
COM1_SW1 ON-ON-ON-OFF, COM2_SW1 ON-ON-ON-ON

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS2 &
echo "1234" > /dev/ttyTHS1

[軟體控制]
COM1_SW1/COM2_SW1 ON-ON-OFF-OFF COM1 -> COM2

echo 474 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio474/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS1 &
echo 1 > /sys/class/gpio/gpio474/value
echo "1234" > /dev/ttyTHS2
echo 0 > /sys/class/gpio/gpio474/value

COM2 -> COM1

echo 284 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio284/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS2 &
echo 1 > /sys/class/gpio/gpio284/value
echo "1234" > /dev/ttyTHS1
echo 0 > /sys/class/gpio/gpio284/value

Nano
[硬體控制]
COM1 -> COM2
COM1_SW1 ON-ON-ON-OFF, COM2_SW1 ON-ON-ON-ON

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS2

COM2 -> COM1
COM1_SW1 ON-ON-ON-OFF, COM2_SW1 ON-ON-ON-ON

stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS2 &
echo "1234" > /dev/ttyTHS1

[軟體控制]
COM1_SW1/COM2_SW1 ON-ON-OFF-OFF
COM1 -> COM2

echo 27 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio27/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS2 &
echo 1 > /sys/class/gpio/gpio27/value
echo "1234" > /dev/ttyTHS1
echo 0 > /sys/class/gpio/gpio27/value

COM2 -> COM1

echo 50 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio50/direction
stty -F /dev/ttyTHS1 speed 115200
stty -F /dev/ttyTHS2 speed 115200
cat /dev/ttyTHS1 &
echo 1 > /sys/class/gpio/gpio50/value
echo "1234" > /dev/ttyTHS2
echo 0 > /sys/class/gpio/gpio50/value

[RS-232]
Xavier-NX
COM2

stty -F /dev/ttyTHS0 speed 115200 raw -echo
cat /dev/ttyTHS0 &
echo "1234" > /dev/ttyTHS0

COM1

stty -F /dev/ttyTHS1 speed 115200 raw -echo
cat /dev/ttyTHS1 &
echo "1234" > /dev/ttyTHS1