Discussion:
[OpenWrt-Devel] weak signal MyNet n600
omggo
2013-12-14 07:48:54 UTC
Permalink
Hi all,

I'm currently using the latest trunk (r39047) with the "MyNet n600" and
have noticed that the wifi signal on the is lower than the official
firmware and will never reach 100% even with the device right next to the
router.

At about 2m away from the device the signal strength is about 45% on the
2.4ghz band and 85% on the 5ghz.

the iw info of both interfaces gives me this output for the antennas:
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3

it looks like the devices has 4 antennas on the board:
Loading Image...

Device info:
http://wiki.openwrt.org/toh/wd/n600

could it be that openwrt is not using all of these antennas?
Steven Haigh
2013-12-14 12:24:22 UTC
Permalink
Post by omggo
Hi all,
I'm currently using the latest trunk (r39047) with the "MyNet n600" and
have noticed that the wifi signal on the is lower than the official
firmware and will never reach 100% even with the device right next to
the router.
At about 2m away from the device the signal strength is about 45% on the
2.4ghz band and 85% on the 5ghz.
Available Antennas: TX 0x3 RX 0x3
Configured Antennas: TX 0x3 RX 0x3
As far as I know, this is a binary addition. 0x1 = left, 0x2 = right,
0x3 = left & right. I could be wrong, but I'm pretty sure this is how it
works.
Post by omggo
http://wiki.openwrt.org/_media/media/media/toh/wd/n600-pcb.jpg
Hey - its my photo :D
Post by omggo
http://wiki.openwrt.org/toh/wd/n600
And the wiki page I wrote ;)
Post by omggo
could it be that openwrt is not using all of these antennas?
I don't think that's the case. I almost see the same thing - but I think
its just a calibration thing - not an actual performance / real thing.
The noise floor will never move from -99dB either. iirc, the percentage
is based on the signal / noise floor relationship.
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Felix Fietkau
2013-12-14 14:49:49 UTC
Permalink
Post by omggo
Hi all,
I'm currently using the latest trunk (r39047) with the "MyNet n600" and
have noticed that the wifi signal on the is lower than the official
firmware and will never reach 100% even with the device right next to
the router.
At about 2m away from the device the signal strength is about 45% on the
2.4ghz band and 85% on the 5ghz.
Signal strength values in % are meaningless. Please post the signal
strength in dBm instead.

- Felix
omggo
2013-12-15 03:10:33 UTC
Permalink
about 2m away = 44% - Signal: -79 dBm, Noise: -95dBm
right next to device = 82% - Signal -52 dBm, Noise: -95dBm
Post by Felix Fietkau
Post by omggo
Hi all,
I'm currently using the latest trunk (r39047) with the "MyNet n600" and
have noticed that the wifi signal on the is lower than the official
firmware and will never reach 100% even with the device right next to
the router.
At about 2m away from the device the signal strength is about 45% on the
2.4ghz band and 85% on the 5ghz.
Signal strength values in % are meaningless. Please post the signal
strength in dBm instead.
- Felix
Chirag Chhatriwala
2014-01-04 05:39:52 UTC
Permalink
Post by omggo
about 2m away = 44% - Signal: -79 dBm, Noise: -95dBm
right next to device = 82% - Signal -52 dBm, Noise: -95dBm
Post by Felix Fietkau
Post by omggo
Hi all,
I'm currently using the latest trunk (r39047) with the "MyNet n600" and
have noticed that the wifi signal on the is lower than the official
firmware and will never reach 100% even with the device right next to
the router.
At about 2m away from the device the signal strength is about 45% on the
2.4ghz band and 85% on the 5ghz.
Signal strength values in % are meaningless. Please post the signal
strength in dBm instead.
- Felix
I think there is something wrong in the configuration as well.

Similar problem exhibited on the N750, which is nearly similar to N600 with
a different 802.11an chip.
My problem however, isn't that the device doesn't output enough power. I
see it just as strong as my other WiFi router through inSSIDer.

The problem I'm having is that the router doesn't properly see other
devices for their transmit power. For instance, my laptop which has
802.11bg WiFi card connects to the WD My Net N750 and sees great signal
when it is sitting next to the router. inSSIDer shows the router
broadcasting at about -20dbm sitting next to it. Same for when the laptop
connects to the Buffalo WZR-HP-AG300H or a Netgear WNDR3700v2.

However, there is a huge difference in what My Net N750 "sees" as the
laptop's WiFi signal strength, versus what my other two routers see the
laptop's broadcast/signal strength.

For example, the N750 while sitting next to the laptop, sees the laptop as
having a signal strength of -53dbm. Both my other routers see the laptop
broadcasting between -20dm ~ -30dbm depending on the antenna orientation.

There is definitely something weird going on with the way these My Net
Routers see signal strengths of 802.11bgn devices. Generally, the signal
strength is same on both ends (laptop and router). If inSSIDer shows the
router at about -30dbm, the router also sees the client device at about
-30dbm (give or take a few dBm's). Both the Buffalo WZR-HP-AG300H and
Netgear WNDR3700v2 show exhibit this behavior. The WD My Net N750 sees a
"huge signal drop" on 802.11bgn devices. I am guessing something similar is
happening on the WD My Net N600.

Fortunately, the 801.11an devices which connect to the My Net N750 don't
exhibit this problem.

Hope that we can get to the bottom of this issue.

Regards,
Chirag
Felix Kaechele
2014-01-07 22:20:32 UTC
Permalink
Please test these two patches. They should fix the weak signal problem.

I'd be especially interested in having the N600 one tested as I don't own a
N600 and I changed the GPIO code a bit.
Please check if all LEDs light up correctly (I added the yellow LAN LEDs also).

Felix Kaechele (2):
ar71xx: Fix WD My Net N600 GPIO definitions
ar71xx: Fix WD My Net N750 weak signal issue

.../ar71xx/files/arch/mips/ath79/mach-mynet-n600.c | 66 ++++++++++++++++------
.../ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 +-
2 files changed, 50 insertions(+), 20 deletions(-)
--
1.8.4.2
Felix Kaechele
2014-01-07 22:20:34 UTC
Permalink
The LNAs need to be enabled by setting their respective GPIO to high even
though the original firmware's setting sets them to low on initialization.

Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".

Signed-off-by: Felix Kaechele <***@fedoraproject.org>
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");

mynet_n750_get_mac("wlan24mac=", tmpmac);
--
1.8.4.2
Steven Haigh
2014-01-08 02:29:52 UTC
Permalink
Post by Felix Kaechele
The LNAs need to be enabled by setting their respective GPIO to high even
though the original firmware's setting sets them to low on initialization.
Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");
mynet_n750_get_mac("wlan24mac=", tmpmac);
Out of interest, would this also apply to the N600? I have this device
and I've always thought it was 'deaf' as well....
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Weedy
2014-01-08 03:44:38 UTC
Permalink
Post by Steven Haigh
Post by Felix Kaechele
The LNAs need to be enabled by setting their respective GPIO to high even
though the original firmware's setting sets them to low on
initialization.
Post by Steven Haigh
Post by Felix Kaechele
Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
Post by Steven Haigh
Post by Felix Kaechele
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");
mynet_n750_get_mac("wlan24mac=", tmpmac);
Out of interest, would this also apply to the N600? I have this device
and I've always thought it was 'deaf' as well....
The patch is two lines. Try it and tell us.
Post by Steven Haigh
--
Steven Haigh
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Steven Haigh
2014-01-08 05:42:32 UTC
Permalink
Post by Felix Kaechele
Post by Steven Haigh
Post by Felix Kaechele
The LNAs need to be enabled by setting their respective GPIO to high
even
Post by Steven Haigh
Post by Felix Kaechele
though the original firmware's setting sets them to low on
initialization.
Post by Steven Haigh
Post by Felix Kaechele
Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
Post by Steven Haigh
Post by Felix Kaechele
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");
mynet_n750_get_mac("wlan24mac=", tmpmac);
Out of interest, would this also apply to the N600? I have this device
and I've always thought it was 'deaf' as well....
The patch is two lines. Try it and tell us.
Well, I actually noticed that in the n600 [PATCH 1/2] has this already -
I've applied PATCH 1/2 and building now... Will advise.
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Chirag Chhatriwala
2014-01-08 17:11:41 UTC
Permalink
Confirmed working on the WD MyNet N750.
Now the device is no longer "deaf".

This device broadcast stronger WiFi than any of my other routers.
Kudos to Felix for adding support for this device.
Post by Steven Haigh
Post by Felix Kaechele
Post by Steven Haigh
Post by Felix Kaechele
The LNAs need to be enabled by setting their respective GPIO to high
even
Post by Steven Haigh
Post by Felix Kaechele
though the original firmware's setting sets them to low on
initialization.
Post by Steven Haigh
Post by Felix Kaechele
Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
Post by Steven Haigh
Post by Felix Kaechele
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");
mynet_n750_get_mac("wlan24mac=", tmpmac);
Out of interest, would this also apply to the N600? I have this device
and I've always thought it was 'deaf' as well....
The patch is two lines. Try it and tell us.
Well, I actually noticed that in the n600 [PATCH 1/2] has this already -
I've applied PATCH 1/2 and building now... Will advise.
--
Steven Haigh
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Steven Haigh
2014-01-09 13:30:28 UTC
Permalink
Post by Chirag Chhatriwala
Confirmed working on the WD MyNet N750.
Now the device is no longer "deaf".
This device broadcast stronger WiFi than any of my other routers.
Kudos to Felix for adding support for this device.
For what its worth, I've created binaries for both the N600 and N750
with these patches included.

They can be downloaded from:
http://openwrt.crc.id.au/ar71xx/
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Steven Haigh
2014-01-08 05:42:32 UTC
Permalink
Post by Felix Kaechele
Post by Steven Haigh
Post by Felix Kaechele
The LNAs need to be enabled by setting their respective GPIO to high
even
Post by Steven Haigh
Post by Felix Kaechele
though the original firmware's setting sets them to low on
initialization.
Post by Steven Haigh
Post by Felix Kaechele
Obviously the LNAs are then later initialized by the driver on the OEM
firmware. Without this fix the device is mostly "deaf".
---
target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
Post by Steven Haigh
Post by Felix Kaechele
index a44a7e0..737bec2 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n750.c
@@ -179,10 +179,10 @@ static void __init mynet_n750_setup(void)
* board/ar7240/db12x/alpha_gpio.c
*/
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA0,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA0");
gpio_request_one(MYNET_N750_GPIO_EXTERNAL_LNA1,
- GPIOF_OUT_INIT_LOW | GPIOF_EXPORT_DIR_FIXED,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
"External LNA1");
mynet_n750_get_mac("wlan24mac=", tmpmac);
Out of interest, would this also apply to the N600? I have this device
and I've always thought it was 'deaf' as well....
The patch is two lines. Try it and tell us.
Well, I actually noticed that in the n600 [PATCH 1/2] has this already -
I've applied PATCH 1/2 and building now... Will advise.
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Felix Kaechele
2014-01-07 22:20:33 UTC
Permalink
This post might be inappropriate. Click to display it.
Steven Haigh
2014-01-08 06:06:39 UTC
Permalink
Post by Felix Kaechele
This also fixes the weak signal that can be observed on the router
Tested-by: Steven Haigh <***@crc.id.au>

Works as advertised.
Post by Felix Kaechele
---
.../ar71xx/files/arch/mips/ath79/mach-mynet-n600.c | 66 ++++++++++++++++------
1 file changed, 48 insertions(+), 18 deletions(-)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
index 476cff8..861528e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
@@ -34,14 +34,22 @@
#define MYNET_N600_GPIO_LED_INTERNET 12
#define MYNET_N600_GPIO_LED_WPS 13
-#define MYNET_N600_GPIO_LED_LAN1 4
-#define MYNET_N600_GPIO_LED_LAN2 3
-#define MYNET_N600_GPIO_LED_LAN3 2
-#define MYNET_N600_GPIO_LED_LAN4 1
+#define MYNET_N600_GPIO_LED_LAN1_GREEN 4
+#define MYNET_N600_GPIO_LED_LAN2_GREEN 3
+#define MYNET_N600_GPIO_LED_LAN3_GREEN 2
+#define MYNET_N600_GPIO_LED_LAN4_GREEN 1
+
+#define MYNET_N600_GPIO_LED_LAN1_YELLOW 22
+#define MYNET_N600_GPIO_LED_LAN2_YELLOW 21
+#define MYNET_N600_GPIO_LED_LAN3_YELLOW 20
+#define MYNET_N600_GPIO_LED_LAN4_YELLOW 19
#define MYNET_N600_GPIO_BTN_RESET 16
#define MYNET_N600_GPIO_BTN_WPS 17
+#define MYNET_N600_GPIO_EXTERNAL_LNA0 14
+#define MYNET_N600_GPIO_EXTERNAL_LNA1 15
+
#define MYNET_N600_KEYS_POLL_INTERVAL 20 /* msecs */
#define MYNET_N600_KEYS_DEBOUNCE_INTERVAL (3 * MYNET_N600_KEYS_POLL_INTERVAL)
@@ -76,22 +84,42 @@ static struct gpio_led mynet_n600_leds_gpio[] __initdata = {
},
{
.name = "wd:green:lan1",
- .gpio = MYNET_N600_GPIO_LED_LAN1,
+ .gpio = MYNET_N600_GPIO_LED_LAN1_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan2",
- .gpio = MYNET_N600_GPIO_LED_LAN2,
+ .gpio = MYNET_N600_GPIO_LED_LAN2_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan3",
- .gpio = MYNET_N600_GPIO_LED_LAN3,
+ .gpio = MYNET_N600_GPIO_LED_LAN3_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan4",
- .gpio = MYNET_N600_GPIO_LED_LAN4,
+ .gpio = MYNET_N600_GPIO_LED_LAN4_GREEN,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan1",
+ .gpio = MYNET_N600_GPIO_LED_LAN1_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan2",
+ .gpio = MYNET_N600_GPIO_LED_LAN2_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan3",
+ .gpio = MYNET_N600_GPIO_LED_LAN3_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan4",
+ .gpio = MYNET_N600_GPIO_LED_LAN4_YELLOW,
.active_low = 1,
},
};
@@ -135,16 +163,6 @@ static void __init mynet_n600_setup(void)
ath79_register_m25p80(NULL);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN1,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN2,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN3,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN4,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_INTERNET,
- AR934X_GPIO_OUT_GPIO);
ath79_register_leds_gpio(-1, ARRAY_SIZE(mynet_n600_leds_gpio),
mynet_n600_leds_gpio);
@@ -152,6 +170,18 @@ static void __init mynet_n600_setup(void)
ARRAY_SIZE(mynet_n600_gpio_keys),
mynet_n600_gpio_keys);
+ /*
+ * Control signal for external LNAs 0 and 1
+ * board/ar7240/db12x/alpha_gpio.c
+ */
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA0,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA0");
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA1,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA1");
+
mynet_n600_get_mac("wlan24mac=", tmpmac);
ath79_register_wmac(art + MYNET_N600_WMAC_CALDATA_OFFSET, tmpmac);
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Steven Haigh
2014-01-08 06:06:39 UTC
Permalink
Post by Felix Kaechele
This also fixes the weak signal that can be observed on the router
Tested-by: Steven Haigh <***@crc.id.au>

Works as advertised.
Post by Felix Kaechele
---
.../ar71xx/files/arch/mips/ath79/mach-mynet-n600.c | 66 ++++++++++++++++------
1 file changed, 48 insertions(+), 18 deletions(-)
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
index 476cff8..861528e 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
@@ -34,14 +34,22 @@
#define MYNET_N600_GPIO_LED_INTERNET 12
#define MYNET_N600_GPIO_LED_WPS 13
-#define MYNET_N600_GPIO_LED_LAN1 4
-#define MYNET_N600_GPIO_LED_LAN2 3
-#define MYNET_N600_GPIO_LED_LAN3 2
-#define MYNET_N600_GPIO_LED_LAN4 1
+#define MYNET_N600_GPIO_LED_LAN1_GREEN 4
+#define MYNET_N600_GPIO_LED_LAN2_GREEN 3
+#define MYNET_N600_GPIO_LED_LAN3_GREEN 2
+#define MYNET_N600_GPIO_LED_LAN4_GREEN 1
+
+#define MYNET_N600_GPIO_LED_LAN1_YELLOW 22
+#define MYNET_N600_GPIO_LED_LAN2_YELLOW 21
+#define MYNET_N600_GPIO_LED_LAN3_YELLOW 20
+#define MYNET_N600_GPIO_LED_LAN4_YELLOW 19
#define MYNET_N600_GPIO_BTN_RESET 16
#define MYNET_N600_GPIO_BTN_WPS 17
+#define MYNET_N600_GPIO_EXTERNAL_LNA0 14
+#define MYNET_N600_GPIO_EXTERNAL_LNA1 15
+
#define MYNET_N600_KEYS_POLL_INTERVAL 20 /* msecs */
#define MYNET_N600_KEYS_DEBOUNCE_INTERVAL (3 * MYNET_N600_KEYS_POLL_INTERVAL)
@@ -76,22 +84,42 @@ static struct gpio_led mynet_n600_leds_gpio[] __initdata = {
},
{
.name = "wd:green:lan1",
- .gpio = MYNET_N600_GPIO_LED_LAN1,
+ .gpio = MYNET_N600_GPIO_LED_LAN1_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan2",
- .gpio = MYNET_N600_GPIO_LED_LAN2,
+ .gpio = MYNET_N600_GPIO_LED_LAN2_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan3",
- .gpio = MYNET_N600_GPIO_LED_LAN3,
+ .gpio = MYNET_N600_GPIO_LED_LAN3_GREEN,
.active_low = 1,
},
{
.name = "wd:green:lan4",
- .gpio = MYNET_N600_GPIO_LED_LAN4,
+ .gpio = MYNET_N600_GPIO_LED_LAN4_GREEN,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan1",
+ .gpio = MYNET_N600_GPIO_LED_LAN1_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan2",
+ .gpio = MYNET_N600_GPIO_LED_LAN2_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan3",
+ .gpio = MYNET_N600_GPIO_LED_LAN3_YELLOW,
+ .active_low = 1,
+ },
+ {
+ .name = "wd:yellow:lan4",
+ .gpio = MYNET_N600_GPIO_LED_LAN4_YELLOW,
.active_low = 1,
},
};
@@ -135,16 +163,6 @@ static void __init mynet_n600_setup(void)
ath79_register_m25p80(NULL);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN1,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN2,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN3,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_LAN4,
- AR934X_GPIO_OUT_GPIO);
- ath79_gpio_output_select(MYNET_N600_GPIO_LED_INTERNET,
- AR934X_GPIO_OUT_GPIO);
ath79_register_leds_gpio(-1, ARRAY_SIZE(mynet_n600_leds_gpio),
mynet_n600_leds_gpio);
@@ -152,6 +170,18 @@ static void __init mynet_n600_setup(void)
ARRAY_SIZE(mynet_n600_gpio_keys),
mynet_n600_gpio_keys);
+ /*
+ * Control signal for external LNAs 0 and 1
+ * board/ar7240/db12x/alpha_gpio.c
+ */
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA0,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA0");
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA1,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA1");
+
mynet_n600_get_mac("wlan24mac=", tmpmac);
ath79_register_wmac(art + MYNET_N600_WMAC_CALDATA_OFFSET, tmpmac);
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
omggo
2014-01-18 02:29:08 UTC
Permalink
Thanks for the patches. The signal patch worked but the LEDs are still off.
I tried system upgrade and factory restore. The only LEDs that are on is
the blue power led and the green LAN LEDs on the back of the device under
the cables.
Post by Felix Kaechele
Please test these two patches. They should fix the weak signal problem.
I'd be especially interested in having the N600 one tested as I don't own a
N600 and I changed the GPIO code a bit.
Please check if all LEDs light up correctly (I added the yellow LAN LEDs also).
ar71xx: Fix WD My Net N600 GPIO definitions
ar71xx: Fix WD My Net N750 weak signal issue
.../ar71xx/files/arch/mips/ath79/mach-mynet-n600.c | 66
++++++++++++++++------
.../ar71xx/files/arch/mips/ath79/mach-mynet-n750.c | 4 +-
2 files changed, 50 insertions(+), 20 deletions(-)
--
1.8.4.2
_______________________________________________
openwrt-devel mailing list
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Steven Haigh
2014-01-18 03:39:33 UTC
Permalink
Post by omggo
Thanks for the patches. The signal patch worked but the LEDs are still
off. I tried system upgrade and factory restore. The only LEDs that are
on is the blue power led and the green LAN LEDs on the back of the
device under the cables.
You need to configure them first...

Also, does anyone notice some (lots) instability when using the svn
version of openwrt where these patches were rewritten? I was getting
1Mbit connect speeds at 10 metres... I had to revert and apply these
patches to get a usable eevice again.
--
Steven Haigh

Email: ***@crc.id.au
Web: https://www.crc.id.au
Phone: (03) 9001 6090 - 0412 935 897
Fax: (03) 8338 0299
Loading...