WE826 GPIO, etc.

ZBT Router Topics
Post Reply
jfrog
Posts: 3
Joined: Mon May 28, 2018 10:06 am

WE826 GPIO, etc.

Post by jfrog » Mon Jun 04, 2018 7:34 am

I'm wondering if anybody has any information on WE826 hardware, specifically GPIO ports and sensors (if any).
To be more specific:
- there are a few LEDs on the board - are they all software controlled? How can I access, for example, the "Internet" LED from the software, which GPIO line?
- does the board have a temperature sensor of any kind? If yes, how it can be accessed from the software?

User avatar
JimHelms
Site Admin
Posts: 274
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Contact:

Re: WE826 GPIO, etc.

Post by JimHelms » Sun Jun 10, 2018 6:53 pm

jfrog wrote:
Mon Jun 04, 2018 7:34 am
I'm wondering if anybody has any information on WE826 hardware, specifically GPIO ports and sensors (if any).
I have asked the manufacturer for this information.

User avatar
JimHelms
Site Admin
Posts: 274
Joined: Tue Dec 19, 2017 8:59 pm
Location: DFW Texas
Contact:

Re: WE826 GPIO, etc.

Post by JimHelms » Mon Jun 11, 2018 8:33 pm

There is no temperature sensor on the PCB.

All LED lights are controlled by software.

This is the contents of a document sent by the manufacturer:

Code: Select all

RESTE¶ÔÓ¦ (GPIO#1)
WPS¶ÔÓ¦   (GPIO#2)
wireless ACT ¶ÔÓ¦(GPIO#72)
WAN Port ¶ÔÓ¦(GPIO#40)
LAN1 Port LED-LAN4 Port LED·Ö±ð¶ÔÓ¦(GPIO#41),(GPIO#42),(GPIO#43),(GPIO#44)


jfrog
Posts: 3
Joined: Mon May 28, 2018 10:06 am

Re: WE826 GPIO, etc.

Post by jfrog » Wed Jun 13, 2018 11:14 am

thank you, Jim

I'll try to work with GPIO#40

Numbering is weird... This is what I see on my system:

Code: Select all

# gpiodetect 
gpiochip0 [10000600.gpio] (24 lines)
gpiochip1 [10000638.gpio] (16 lines)
gpiochip2 [10000688.gpio] (1 lines)
and here are the current assignments:

Code: Select all

# gpioinfo 
gpiochip0 - 24 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed      "reset"   input  active-high [used]
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed       unused   input  active-high 
	line  15:      unnamed       unused   input  active-high 
	line  16:      unnamed       unused   input  active-high 
	line  17:      unnamed       unused   input  active-high 
	line  18:      unnamed       unused   input  active-high 
	line  19:      unnamed       unused   input  active-high 
	line  20:      unnamed       unused   input  active-high 
	line  21:      unnamed       unused   input  active-high 
	line  22:      unnamed       unused   input  active-high 
	line  23:      unnamed       unused   input  active-high 
gpiochip1 - 16 lines:
	line   0:      unnamed       unused   input  active-high 
	line   1:      unnamed       unused   input  active-high 
	line   2:      unnamed       unused   input  active-high 
	line   3:      unnamed       unused   input  active-high 
	line   4:      unnamed       unused   input  active-high 
	line   5:      unnamed       unused   input  active-high 
	line   6:      unnamed       unused   input  active-high 
	line   7:      unnamed       unused   input  active-high 
	line   8:      unnamed       unused   input  active-high 
	line   9:      unnamed       unused   input  active-high 
	line  10:      unnamed       unused   input  active-high 
	line  11:      unnamed       unused   input  active-high 
	line  12:      unnamed       unused   input  active-high 
	line  13:      unnamed       unused   input  active-high 
	line  14:      unnamed "zbt-we826:green:power" output active-high [used]
	line  15:      unnamed "zbt-we826:green:usb" output active-high [used]
gpiochip2 - 1 lines:
	line   0:      unnamed "zbt-we826:green:wifi" output active-low [used]
So, WAN and LAN port LEDs are not visible and I cannot guess which one is #40.

brad.schwie
Posts: 1
Joined: Mon Oct 29, 2018 4:54 pm

Re: WE826 GPIO, etc.

Post by brad.schwie » Sat Nov 03, 2018 11:10 pm

jfrog, did you get the list of gpio lines by using this command?

echo N > /sys/class/gpio/export

I ordered a WE826 and should be receiving it soon. I was hoping to be able to power toggle the WE826's USB port, but reviewing the supported ROOter routers indicates the WE826 doesn't appear to support USB port power toggling. Based on jfrog's dump of the WE826's current assignments, line 15 of gpiochip1 appears to allow interaction with the USB LED, but what about the actual USB port?

Do the unnamed and unused lines have any control over other parts of the WE826's board? If there's control over the USB port, I'm hoping to use commands such as:

ON
root@OpenWrt:/# echo 1 >/sys/class/gpio/gpiochip1/15

OFF
root@OpenWrt:/# echo 0 >/sys/class/gpio/gpiochip1/15

Post Reply