Edgerouter X - can't enable POE

Hi, I went trough Ubiquiti EdgeRouter X (erx) - Enable PoE pass through and trough https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka#poe_out_on_edgerouter_x yet I can't enable PoE Passtrough on ETH4 when connected 12W 24V power adapter in ETH0 (UniFi® AP AC LITE - Ubiquiti)

I enabled and rebooted :

config gpio_switch 'poe_passthrough'
        option name 'PoE Passthrough'
        option gpio_pin '0'
        option value '1'

ls /sys/class/gpio/gpiochip*
/sys/class/gpio/gpiochip416:
base       device     label      ngpio      subsystem  uevent

/sys/class/gpio/gpiochip448:
base       device     label      ngpio      subsystem  uevent

/sys/class/gpio/gpiochip480:
base       device     label      ngpio      subsystem  uevent

Model
Ubiquiti EdgeRouter X
Architecture
MediaTek MT7621 ver:1 eco:3
Firmware Version
OpenWrt SNAPSHOT r3012+11364-0d1b329914 / LuCI Master git-20.246.48839-82d4384
Kernel Version
5.4.61

Am I missing anything please ? Eg. is some Kernel module required ?

update - fixed error on port

PoE in is on eth0 not eth1!

Yes, sorry, I mean eth0 - simply POE IN port, and can't active POE OUT port ...

I use this in my startup script to turn PoE on:

echo 0 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio0/direction
echo 1 > /sys/class/gpio/gpio0/value

I think the wiki changed since I set mine up.

Thank you - I have a feeling I'm missing something...

echo 0 > /sys/class/gpio/export

ash: write error: Invalid argument

Anyone please, don't tell me nobody is using POE Passthrough on EdgeRouter X ;-(

Maybe try and add the commands to /etc/rc.local or in Luci in system -> startup (before the exit line). And remove the switch config you added. Then reboot.


That is all I did and it's working since day 1. Remember that it is only passive PoE (24V)

I have an AP AC Lite working on the pass through port.

Thank you, however I do believe in your case, when you execute following command, you will get other output, then I do, correct ?

ls /sys/class/gpio/gpiochip*

Anyway, I will try local startup even I don't believe it will work as I get error when simply executing :

echo 0 > /sys/class/gpio/export

Yes I do get something different:

root@edgerouter:~# ls /sys/class/gpio/gpiochip*
/sys/class/gpio/gpiochip0:
base       device     label      ngpio      subsystem  uevent

/sys/class/gpio/gpiochip32:
base       device     label      ngpio      subsystem  uevent

/sys/class/gpio/gpiochip64:
base       device     label      ngpio      subsystem  uevent

I just noticed that you are on a snapshot build. The new kernel might have changed things.

1 Like

So I guess you can try:

echo 416 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio416/direction
echo 1 > /sys/class/gpio/gpio416/value
1 Like

Thank you @frauhottelmann :grinning: - what was working is actually following :

echo 480 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio480/direction
echo 1 > /sys/class/gpio/gpio480/value

I would not figure it out without your help, thank you !

Does it work to change option gpio_pin to 480 and let UCI do it instead of writing a script directly calling sysfs?

Yes, it does. :slight_smile:

config gpio_switch 'poe_passthrough'
option name 'PoE Passthrough'
option gpio_pin '480'
option value '1'

That would be the way to handle it going forward. This should be reported as a bug so the default configuration file can get changed.

Note that turning on the port power to a device which is not PoE or is not Ubiquiti 24 volt passive compatible is likely to cause hardware damage to the router, the device, or both. I've burned out an Edgerouter-X and a nice IP camera that way.

Thank you - there are two places to be updated - Wiki and source code - any idea how/where to report it, mostly for Wiki ? Or it's both via Issue on GitHub ?

I think we should add a note in the wiki. The section for the Edgerouter X SFP also has one. I don't know if a bug report makes sense, we are talking about snapshot here...

1 Like

I have added a note similar to the Edgerouter X SFP in the Wiki.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.