Even with my limited knowledge of programming and openwrt source
structure, I managed to define a new poe gpio device identical to the
ones controlling leds. Enabling poe passthrough is as simple as:

echo 1 > ubnt\:poe/brightness

disabling it:

echo 0 > ubnt\:poe/brightness

Maybe a developer could improve it by defining a specific poe device
for the poe passthrough.
Here is the patch for revision 19525. Tried and working on a Nanostation M5.

Signed-off-by: Xavier Martinez <xavier.martinez.ll...@gmail.com>

---

Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c    (revision 19525)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c    (working copy)
@@ -37,6 +37,7 @@
 #define UBNT_M_GPIO_LED_L3    11
 #define UBNT_M_GPIO_LED_L4    7
 #define UBNT_M_GPIO_BTN_RESET    12
+#define UBNT_M_GPIO_POE        8

 #define UBNT_BUTTONS_POLL_INTERVAL    20

@@ -97,6 +98,10 @@
         .name        = "ubnt:green:link4",
         .gpio        = UBNT_M_GPIO_LED_L4,
         .active_low    = 0,
+    }, {
+        .name        = "ubnt:poe",
+        .gpio        = UBNT_M_GPIO_POE,
+        .active_low    = 0,
     }
 };




2010/1/31 Xavier Martinez <xavier.martinez.ll...@gmail.com>
>
> Looking at AirMax software, I think that gpio pin 8 must be set to enable the 
> poe passthrough. I compiled gpioctrl with the openwrt but when I try:
>
> gpioctrl dirout 8
>
> I get the following error:
>
> Error whilst opening /dev/gpio
>
> It seems that is not recognising the gpio devices... Any ideas on this?
>
> Thanks
>
>
>>
>> Date: Sat, 30 Jan 2010 02:14:36 +0100
>> From: Xavier Martinez <xavier.martinez.ll...@gmail.com>
>> To: openwrt-devel@lists.openwrt.org
>> Subject: [OpenWrt-Devel] nanostation 5m poe passthrough
>> Message-ID:
>>        <d8b6e5e41001291714o30777a3dkf7393e40b3c3c...@mail.gmail.com>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> Hi,
>>
>> I'm testing Ubiquiti Nanostation 5M for using them in our
>> OLSR-under-openwrt-based mesh network. I've compiled and uploaded the latest
>> trunk 19374 and everything worked fine, even OLSR. Congratulations to all
>> developers for such a universal and updated firmware which is openwrt.
>> However, it would very interesting (and help saving a lot of CAT5 cable) to
>> enable the PoE passthrough feature included in this piece of hardware. Any
>> success on this issue?
>>
>> Thanks
>>
>> xavier_martinez
>>
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to