Re: [OpenWrt-Devel] [PATCH] Buffalo WLAE-AG300N wireless led support

2012-07-28 Thread Peter Naulls

On 07/27/2012 07:35 PM, LEO Airwarosu Yoichi Shinoda wrote:



On 2012/07/28, at 8:04, Peter Naulls wrote:


On 07/27/2012 04:00 PM, LEO Airwarosu Yoichi Shinoda wrote:


Folks,

Please ignore this particular (additional) patch.

I've started to learn how uci-defaults work.


Also, and unless I've missed some very recent patch, we're still sans
full support of all the LEDs on the AG300N.  Anyone want to have
a go?


Do you mean full support by something similar to those provided by the factory
firmware
(e.g.
http://www.cellularforless.com/resources/userguides/buffalo_Manual.pdf pp.8-9)?


No, this is different, but possibly, quite similar hardware internally - the
WZR-AG300N - I thought I had seen mention of that in this thread too, but
perhaps not.  I mention it for completeness.




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Buffalo WLAE-AG300N wireless led support

2012-07-27 Thread LEO Airwarosu Yoichi Shinoda


On 2012/07/28, at 8:04, Peter Naulls wrote:

> On 07/27/2012 04:00 PM, LEO Airwarosu Yoichi Shinoda wrote:
>> 
>> Folks,
>> 
>> Please ignore this particular (additional) patch.
>> 
>> I've started to learn how uci-defaults work.
> 
> Also, and unless I've missed some very recent patch, we're still sans
> full support of all the LEDs on the AG300N.  Anyone want to have
> a go?

Do you mean full support by something similar to those provided by the factory 
firmware
(e.g. http://www.cellularforless.com/resources/userguides/buffalo_Manual.pdf 
pp.8-9)?

--- shinoda



smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Buffalo WLAE-AG300N wireless led support

2012-07-27 Thread Peter Naulls

On 07/27/2012 04:00 PM, LEO Airwarosu Yoichi Shinoda wrote:


Folks,

Please ignore this particular (additional) patch.

I've started to learn how uci-defaults work.


Also, and unless I've missed some very recent patch, we're still sans
full support of all the LEDs on the AG300N.  Anyone want to have
a go?




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Buffalo WLAE-AG300N wireless led support

2012-07-27 Thread LEO Airwarosu Yoichi Shinoda

Folks,

Please ignore this particular (additional) patch.

I've started to learn how uci-defaults work.

--- shinoda

On 2012/07/26, at 0:36, LEO Airwarosu Yoichi Shinoda wrote:

> This is an additional patch for the WLAE-AG300N that makes
> wireless led to work.
> 
> On 2012/07/24, at 11:13, LEO Airwarosu Yoichi Shinoda wrote:
> 
>> Folks,
>> 
>> I also have a question regarding how to include a board dependent
>> base-file file in the source tree.
>> 
>> More specifically, the file is a hotplug script to get the wireless
>> led work on the buffalo's wlae-ag300n. The wireless led on this board
>> is not connected to the phy, but controlled independently by gpios.
>> The script sets up the ledtrig-netdev upon detection of an addition
>> of a wireless device on wlae-ag300n, and it is written so that it will
>> ignore other boards.
>> 
>> I wonder if there is a way to specify board-dependent base-file files
>> so that this script does not go into images for other boards, or
>> better yet, if there is a way to do this better.
> 
> 
> Signed-off-by: Yoichi Shinoda 
> 
> ===
> 300   
> target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
> ===
> --- /dev/null
> +++ 
> b/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
> @@ -0,0 +1,30 @@
> +#!/bin/sh
> +#
> +# Manipulate Buffalo WLAE-AG300N wireless led (green only)
> +#
> +# If the blinking led is annoying, set the ledmode to "link"
> +
> +ledmode="link tx rx"
> +
> +# Check if the device is wireless first, to prevent ar71xx.sh
> +# from being read.
> +
> +if [ -e /sys$DEVPATH/phy80211 ]; then
> + 
> + . /lib/ar71xx.sh
> +
> + if [ `ar71xx_board_name` != "wlae-ag300n" ]; then
> + exit 0
> + fi
> + 
> + leddev=/sys/class/leds/buffalo\:green\:wireless
> +
> + if [ $ACTION = "add" ]; then
> + echo netdev > $leddev/trigger
> + echo $DEVICENAME > $leddev/device_name
> + echo $ledmode > $leddev/mode
> + elif [ $ACTION = "remove" ]; then
> + echo none > $leddev/trigger
> + fi
> +fi
> +
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Buffalo WLAE-AG300N wireless led support

2012-07-25 Thread LEO Airwarosu Yoichi Shinoda
This is an additional patch for the WLAE-AG300N that makes
wireless led to work.

On 2012/07/24, at 11:13, LEO Airwarosu Yoichi Shinoda wrote:

> Folks,
> 
> I also have a question regarding how to include a board dependent
> base-file file in the source tree.
> 
> More specifically, the file is a hotplug script to get the wireless
> led work on the buffalo's wlae-ag300n. The wireless led on this board
> is not connected to the phy, but controlled independently by gpios.
> The script sets up the ledtrig-netdev upon detection of an addition
> of a wireless device on wlae-ag300n, and it is written so that it will
> ignore other boards.
> 
> I wonder if there is a way to specify board-dependent base-file files
> so that this script does not go into images for other boards, or
> better yet, if there is a way to do this better.


Signed-off-by: Yoichi Shinoda 

===
30  0   
target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
===
--- /dev/null
+++ 
b/target/linux/ar71xx/base-files/etc/hotplug.d/net/10-wlae-ag300n-wireless-led
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# Manipulate Buffalo WLAE-AG300N wireless led (green only)
+#
+# If the blinking led is annoying, set the ledmode to "link"
+
+ledmode="link tx rx"
+
+# Check if the device is wireless first, to prevent ar71xx.sh
+# from being read.
+
+if [ -e /sys$DEVPATH/phy80211 ]; then
+   
+   . /lib/ar71xx.sh
+
+   if [ `ar71xx_board_name` != "wlae-ag300n" ]; then
+   exit 0
+   fi
+   
+   leddev=/sys/class/leds/buffalo\:green\:wireless
+
+   if [ $ACTION = "add" ]; then
+   echo netdev > $leddev/trigger
+   echo $DEVICENAME > $leddev/device_name
+   echo $ledmode > $leddev/mode
+   elif [ $ACTION = "remove" ]; then
+   echo none > $leddev/trigger
+   fi
+fi
+


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel