Copyright 2017. All rights reserved. Advantech Co. Ltd.
Page 37
/sys/class/gpio/gpiochip310/label
INT3452:02
/sys/class/gpio/gpiochip357/label
INT3452:01
/sys/class/gpio/gpiochip434/label
INT3452:00
*Please note gpio numbers like 259 depends on kernel and hardware platform, thus it
could be different.
Step 3
: Expose the GPIO pins and set it to output mode
# echo 259 > /sys/class/gpio/export
# echo 260 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio259/direction
# echo out > /sys/class/gpio/gpio260/direction
Step 4
: Control LEDs
# echo 0 > /sys/class/gpio/gpio259/value (red light on)
# echo 0 > /sys/class/gpio/gpio260/value (green light on)
# echo 1 > /sys/class/gpio/gpio259/value (red light off)
# echo 1 > /sys/class/gpio/gpio260/value (green light off)
# echo 0 > /sys/class/gpio/gpio259/value
|
echo 0 > /sys/class/gpio/gpio260/value
(red & green lights on ----orange light)
3.8
lseth
The Advantech provided script lseth will auto scan all Ethernet devices on the platform then
extract Ethernet-specific info, e.g. device name, PFA, MAC, IP address as well as the link
status. It helps users to figure out the mapping between physical ports and Ethernet devices.
Use the
‘lseth’
command (default option is ‘
-sw’
) to get Ethernet devices info:
*Please note that the following command outputs in this section are platform dependent.
#lseth
[2018.07.16 09:14:33] [INFO] lseth g4 (2015-11-18 14:12:08)
OS:Linux 4.15.0-23-generic x86_64 2018-07-16 09:14:33
Detect System Ethernet Device Number :5
eth0_1 0000:01:00.0 c4:00:ad:a1:11:9a xx.xx.xx.xx Unknown!
eth0_2 0000:02:00.0 c4:00:ad:a1:11:9b xx.xx.xx.xx Unknown!
eth0_3 0000:03:00.0 c4:00:ad:a1:11:9c xx.xx.xx.xx Unknown!
eth0_4 0000:04:00.0 c4:00:ad:a1:11:9d 172.17.10.134 1000Mb/s