Hide last authors
Xiaoling 19.2 1 **Table of Contents:**
2
Edwin Chen 18.1 3 (((
Xiaoling 19.2 4 {{toc/}}
5
6
Edwin Chen 18.1 7 )))
8
9
Xiaoling 24.24 10
Xiaoling 19.2 11 = 1.  Products LEDs Mapping =
Edwin Chen 1.1 12
Xiaoling 21.3 13
Edwin Chen 11.1 14 {{velocity}}
Edwin Chen 10.1 15 $xwiki.ssfx.use("js/xwiki/table/table.css")
16 $xwiki.jsfx.use("js/xwiki/table/tablefilterNsort.js", true)
17 {{/velocity}}
Edwin Chen 1.1 18
Xiaoling 21.2 19
Xiaoling 24.30 20 (% border="1" class="doOddEven filterable grid sortable" id="tableid" style="background-color:#eaeaea; height:25px; width:1384px" %)
21 (% class="sortHeader" %)|=(% style="width: 69px;background-color:#D9E2F3" %)Model|=(% style="width: 75px;background-color:#D9E2F3" %)OS|=(% style="width: 130px;background-color:#D9E2F3" %)Global LED|=(% style="width: 94px;background-color:#D9E2F3" %)PWR LED|=(% style="width: 129px;background-color:#D9E2F3" %)LAN LED|=(% style="width: 130px;background-color:#D9E2F3" %)WAN LED|=(% style="width: 129px;background-color:#D9E2F3" %)WIFI LED|=(% style="width: 123px;background-color:#D9E2F3" %)SENSOR LED|=(% style="width: 248px; background-color: rgb(217, 226, 243);" %)(((
Xiaoling 24.27 22 4G control (Second +3.3v)
Xiaoling 24.30 23 )))|=(% style="width: 250px; background-color: rgb(217, 226, 243);" %)(((
Xiaoling 24.27 24 USB POWER (+5v) Control
Edwin Chen 17.1 25 )))
Xiaoling 24.6 26 |(% style="width:69px" %)LPS8|(% style="width:75px" %)Openwrt|(% style="width:130px" %)(((
Xiaoling 14.2 27 GPIO28(BLUE),
Edwin Chen 1.1 28
Xiaoling 14.2 29 GPIO21(RED),
30
Xiaoling 15.2 31 GPIO22(GREEN(% style="background-color:transparent" %))
Xiaoling 23.1 32 )))|(% style="width:94px" %)(((
Xiaoling 14.2 33
34
35 +3.3v
Xiaoling 24.30 36 )))|(% style="width:129px" %) |(% style="width:130px" %)GPIO17(RED)|(% style="width:129px" %) |(% style="width:123px" %) |(% style="width:248px" %) |(% style="width:250px" %)
Edwin Chen 17.1 37 |(% style="width:69px" %)LPS8N|(% style="width:75px" %)Openwrt|(% style="width:130px" %)(((
Xiaoling 14.2 38 GPIO28(BLUE),
39
40 GPIO21(RED),
41
Xiaoling 15.2 42 GPIO22(GREEN(% style="background-color:transparent" %))
Xiaoling 23.1 43 )))|(% style="width:94px" %)(((
Xiaoling 14.2 44
45
46 +3.3v
Xiaoling 23.1 47 )))|(% style="width:129px" %) |(% style="width:130px" %)GPIO17(RED)|(% style="width:129px" %)(((
Xiaoling 14.2 48 GPIO16(BLUE),
49
50 GPIO26(RED),
51
Xiaoling 15.2 52 GPIO27(GREEN(% style="background-color:transparent" %))
Xiaoling 24.30 53 )))|(% style="width:123px" %) |(% style="width:248px" %)(((
Xiaoling 15.2 54
Xiaoling 14.2 55
Xiaoling 15.2 56 GPIO15
Xiaoling 24.30 57 )))|(% style="width:250px" %)
58 |(% style="width:69px" %)LG308|(% style="width:75px" %)Openwrt|(% style="width:130px" %)GPIO28(RED)|(% style="width:94px" %)+3.3v|(% style="width:129px" %)GPIO13(RED) |(% style="width:130px" %)GPIO17(RED)|(% style="width:129px" %)GPIO0(RED)|(% style="width:123px" %) |(% style="width:248px" %)GPIO15 |(% style="width:250px" %)GPIO1
59 |(% style="width:69px" %)DLOS8|(% style="width:75px" %)Openwrt|(% style="width:130px" %)GPIO28(GREEN)|(% style="width:94px" %)+3.3v|(% style="width:129px" %) |(% style="width:130px" %)GPIO17(GREEN)|(% style="width:129px" %)GPIO0(GREEN)|(% style="width:123px" %) |(% style="width:248px" %)GPIO15 |(% style="width:250px" %)GPIO1
Edwin Chen 17.1 60 |(% style="width:69px" %)(((
61 HP0C
62
63 LPS8V2
64 )))|(% style="width:75px" %)Armbian|(% style="width:130px" %)(((
Xiaoling 15.2 65 PA8(GREEN),
Xiaoling 14.2 66
Xiaoling 15.2 67 PA9(RED(% style="background-color:transparent" %))
Xiaoling 23.1 68 )))|(% style="width:94px" %)+3.3v|(% style="width:129px" %)(((
Xiaoling 15.2 69 EPHY-LINK-LED(GREEN),
Xiaoling 14.2 70
Xiaoling 15.2 71 PA17(BLUE)
Xiaoling 23.1 72 )))|(% style="width:130px" %) |(% style="width:129px" %)(((
Xiaoling 15.2 73
Xiaoling 14.2 74
Xiaoling 15.2 75 PA7(RED(% style="background-color:transparent" %))
Xiaoling 24.30 76 )))|(% style="width:123px" %) |(% style="width:248px" %) |(% style="width:250px" %)
77 |(% style="width:69px" %)HP0A|(% style="width:75px" %)Armbian|(% style="width:130px" %)PA8(GREEN)|(% style="width:94px" %)+3.3v|(% style="width:129px" %)EPHY-LINK-LED|(% style="width:130px" %)PA9(RED)|(% style="width:129px" %)PA7(RED)|(% style="width:123px" %) |(% style="width:248px" %)PA17|(% style="width:250px" %)
78 |(% style="width:69px" %)IBB|(% style="width:75px" %)Openwrt|(% style="width:130px" %)GPIO28(GREEN)|(% style="width:94px" %)+3.3v|(% style="width:129px" %)GPIO13(GREEN)|(% style="width:130px" %)GPIO17(GREEN)|(% style="width:129px" %)GPIO0(GREEN)|(% style="width:123px" %)SENSOR_LED|(% style="width:248px" %) |(% style="width:250px" %)GPIO1
79 |(% style="width:69px" %)LIG16|(% style="width:75px" %)Openwrt|(% style="width:130px" %)GPIO28(RED)|(% style="width:94px" %)+3.3v|(% style="width:129px" %)GPIO22(GREEN)|(% style="width:130px" %)GPIO17(GREEN)|(% style="width:129px" %)GPIO0(GREEN)|(% style="width:123px" %)GPIO21(GREEN)|(% style="width:248px" %) |(% style="width:250px" %)
80 |(% style="width:69px" %)MS14N|(% style="width:75px" %)Openwrt|(% style="width:130px" %)GPIO28(GREEN)|(% style="width:94px" %)+3.3v|(% style="width:129px" %)GPIO13(GREEN)|(% style="width:130px" %)GPIO17(GREEN)|(% style="width:129px" %)GPIO0(GREEN)|(% style="width:123px" %)SENSOR_LED|(% style="width:248px" %) |(% style="width:250px" %)GPIO1
Xiaoling 15.2 81
Xiaoling 24.3 82
Xiaoling 24.31 83
Xiaoling 19.2 84 = 2.  Control LEDs & GPIOs =
85
86 == 2.1  OpenWrt Base OS ==
87
88
Edwin Chen 6.1 89 (% class="box infomessage" id="HControlanGeneralGPIO:" %)
90 (((
Edwin Chen 8.1 91 **Control a General GPIO:**
Edwin Chen 1.1 92
Edwin Chen 1.2 93 **echo 18 > /sys/class/gpio/export**     ~/~/ Export gpio 18 so we can use it
94 **echo "high" > /sys/class/gpio/gpio18/direction**   ~/~/  Set direction to out and
95 set level to high. Use "low" to set direction to output and level to low
96
97 **echo 0 > /sys/class/gpio/gpio18/value**    ~/~/ Set output to 0 or 1
98 **echo "in" > /sys/class/gpio/gpio18/direction**  ~/~/ Set GPIO18 as input
99
100 **cat  /sys/class/gpio/gpio18/value**  ~/~/ Get GPIO18 value if set input
101 )))
102
Edwin Chen 9.1 103 (% class="box infomessage" %)
104 (((
105 **Control a GPIO already exported as SYSTEM LEDs .**
106 **echo 1 > /sys/class/leds/dragino2\:red\:system/brightness**  ~/~/ Turn On LED dragino2:red:system
107 **echo 0 > /sys/class/leds/dragino2\:red\:system/brightness**  ~/~/ Turn off LED dragino2:red:system
108 )))
109
Edwin Chen 19.1 110 Reference: [[http:~~/~~/www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO#gpio-sysfs>>url:http://www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO#gpio-sysfs]]
Edwin Chen 9.1 111
Edwin Chen 19.1 112
Xiaoling 19.2 113 == 2.2  Armbian Base OS ==
Edwin Chen 19.1 114
115
Xiaoling 21.3 116
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0