OpenWrt Forum Archive

Topic: WPN824N opensource

The content of this topic has been archived between 6 Feb 2018 and 27 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

hotplug triggering still does not work for me, with your last build.

We need a better way to debug. 

Is the GPIO button test script suppose to give a "Resource busy" error if the button is defined?  The test script is still working for me to see the status/values of the 3 buttons.

I would expect those GPIOs to output a "resource busy error" when trying to export them. I've put some debug messages into essential code locations, dmesg will show them (please post here). The GPIO and button code has been updated to the latest patchset. Let's see how it goes.
openwrt-ar71xx-generic-wpn824n-squashfs-sysupgrade.bin  b2486072cbec33e81531d6c1ec9ba7b130537bd2eb9bee5174e1119ac99dfab7

Ok, that fixed something.

WLS button on back makes the Blue LED on front turn on and off.
RST button makes the box reboot.

I didn't notice any changes when using the WPS button but I assume it's just not obvious.

This is the only thing relevant I found in the dmesg.

[   13.220282] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[   13.227479] ath: phy0: Enable LNA combining
[   13.231687] ath: phy0: eeprom contains invalid mac address: ff:ff:ff:ff:ff:ff
[   13.238907] ath: phy0: random mac address will be used: d2:5f:cd:c7:d6:c8
[   13.247236] ath: EEPROM regdomain: 0x0
[   13.247255] ath: EEPROM indicates default country code should be used
[   13.247270] ath: doing EEPROM country->regdmn map search
[   13.247301] ath: country maps to regdmn code: 0x3a
[   13.247318] ath: Country alpha2 being used: US
[   13.247333] ath: Regpair used: 0x3a
[   13.261506] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   13.267966] AR928x: initiating buttons
[   13.271780] AR928x: processing button named wps, code=529, number=6
[   13.278141] AR928x: processing button named reset, code=408, number=7
[   13.284626] AR928x: processing button named rfkill, code=247, number=8
[   13.291513] gpio_keys_polled_probe: starting
[   13.295850] gpio_keys_button_probe: starting
[   13.300140] gpio_keys_button_probe: Allocating memory for 3 buttons
[   13.306463] gpio_keys_button_probe: requesting GPIO 58 for button
[   13.312595] gpio_keys_button_probe: setting direction to input for GPIO 58
[   13.319515] gpio_keys_button_probe: requesting GPIO 59 for button
[   13.325654] gpio_keys_button_probe: setting direction to input for GPIO 59
[   13.332564] gpio_keys_button_probe: requesting GPIO 60 for button
[   13.338704] gpio_keys_button_probe: setting direction to input for GPIO 60
[   13.345653] AR928x: buttons initiated

Edit: Also your post #83 test script works now generating:

Fri Jan 29 18:05:17 2016 user.notice root: button was rfkill and action was pressed
Fri Jan 29 18:05:17 2016 user.notice root: button was rfkill and action was released
Fri Jan 29 18:05:34 2016 user.notice root: button was reset and action was pressed
Fri Jan 29 18:05:35 2016 user.notice root: button was reset and action was released
Fri Jan 29 18:05:44 2016 user.notice root: button was wps and action was pressed
Fri Jan 29 18:05:44 2016 user.notice root: button was wps and action was released

I think I had to disable the other scripts first.


Other test script shows the expected "Resource busy now"

# ./button.sh 
sh: write error: Resource busy
sh: write error: Resource busy
[GPIO54] value 1
[GPIO55] value 1
[GPIO56] value 1
sh: write error: Resource busy
sh: write error: Resource busy
sh: write error: Resource busy
sh: write error: Resource busy
sh: write error: Resource busy
sh: write error: Resource busy
[GPIO63] value 1

(Last edited by marked on 29 Jan 2016, 19:09)

Nice, so we can finally close this topic. I will send out that last patch, as soon as the GPIO and button patches for the AR928x have been accepted.
Is anybody interested to have support for this router in Chaos Calmer? There was a maintenance release 15.05.1 to be released one or two weeks ago, but there seems to be some delay. I don't know if we can still make it in time - maybe if I ask very politely ;-) But I need to have positive test results on the images I put in post #94.

I'll run version 94.

Remind me, is the TTL serial port still enabled?

I am not aware of the serial port being disabled. Even when I disabled some functions to get access to the LED GPIOs, I just disabled some RTS/CTS functionality, which isn't used normally, when using the Tx/Rx/GND header.

I encountered some odd behavior with version 94.

1. Access to port 80 is blocked so Luci is not available
2. SSH root account is not accessible, i.e., can't login without password
3. Telnet access is enabled (this may or may not have been the case previously but seems like a security hole)

I confirm #1, #2, and #3 for version 94.

#2 I've seen in recent build numbers too.  I'm not sure what dropbear is doing, but I know there's no root password set, but it keeps asking for a password when trying to use ssh.  I didn't try #1 and #3 on other builds.

After telneting in and setting the root password I was able to login over SSH.

These issues are probably to be expected. I just did a minimal build, Luci would need to be explicitly selected.
Also, until sometime during the past year, it was normal to access the router via telnet, until a root password was set. Then OpenWrt would disable telnet and enable ssh.

Sure not show stoppers.  But I do recall some of these builds used ssh without password for first login.  This is why it was confusing and seems like a bug.

OK, other than that, everything else works as expected? LEDs light up on their events (like network connection/activity); WAN receives its address via DHCP; LAN and WLAN bridge traffic to each other, are accessible on 192.168.1.1 and provide DHCP addresses; no issues in the bootlog? I would expect it to be fine, just want to double check.
Buttons don't work, yet - still waiting for that patch to get into trunk.

It's hard to test some of the features without being able to configure the router. For example, my router had wifi turned off when I flashed the new image and I am not entirely certain how to turn it on without Luci. So I can't tell if the wifi light is working correctly.

No problem, the first section of the wireless wiki page gets you started.

By the way: you can also install additional packages (except kmod-packages) from the official OpenWrt build server via opkg. So, Luci should be possible.

Tried installing luci but got

root@OpenWrt:~# opkg install luci
Installing luci (git-15.248.30277-3836b45-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/luci/luci_git-15.248.30277-3836b45-1_all.ipk.
Installing uhttpd (2015-08-17-f91788b809d9726126e9cf4384fedbbb0c5b8a73) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/uhttpd_2015-08-17-f91788b809d9726126e9cf4384fedbbb0c5b8a73_ar71xx.ipk.
Installing uhttpd-mod-ubus (2015-08-17-f91788b809d9726126e9cf4384fedbbb0c5b8a73) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/uhttpd-mod-ubus_2015-08-17-f91788b809d9726126e9cf4384fedbbb0c5b8a73_ar71xx.ipk.
Installing luci-mod-admin-full (git-15.248.30277-3836b45-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/luci/luci-mod-admin-full_git-15.248.30277-3836b45-1_ar71xx.ipk.
Installing luci-base (git-15.248.30277-3836b45-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/luci/luci-base_git-15.248.30277-3836b45-1_ar71xx.ipk.
Installing lua (5.1.5-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05/ar71xx/generic/packages/base/lua_5.1.5-1_ar71xx.ipk.
Configuring luci-base.
Configuring luci-mod-admin-full.
Configuring uhttpd.
ln: /etc/rc.d/S50uhttpd: No space left on device
Configuring uhttpd-mod-ubus.
Collected errors:
 * wfopen: //usr/lib/opkg/info/lua.control: No space left on device.
 * wfopen: //usr/lib/opkg/info/lua.postinst: No space left on device.
 * wfopen: //usr/lib/opkg/info/lua.prerm: No space left on device.
 * wfopen: /usr/bin/lua: No space left on device.
 * set_flags_from_control: Failed to open //usr/lib/opkg/info/lua.control: No such file or directory.
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/lua.list: No space left on device.
 * opkg_install_pkg: Failed to extract data files for lua. Package debris may remain!
 * opkg_install_cmd: Cannot install package luci.
 * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: No space left on device.

I tried removing luci and got

root@OpenWrt:~# opkg remove luci
No packages removed.

Is the package manager borked now?

MBS wrote:

Is anybody interested to have support for this router in Chaos Calmer? There was a maintenance release 15.05.1 to be released one or two weeks ago, but there seems to be some delay. I don't know if we can still make it in time - maybe if I ask very politely ;-) But I need to have positive test results on the images I put in post #94.

I would be very interested in this. Has there been enough testing for this to happen?

I've found no problems with #94, been running it for a month now.  More stable than the rest of my network.

(Last edited by marked on 6 Mar 2016, 19:23)

Netgear sold the router with two different firmware.   
NA means North America, blank is outside North America.

I only tested the NA version.  If dgenin tested the NA too, then technically nobody tested the outside NA version.

The difference between those two versions is just inside the header block, which is only checked by the stock firmware to make sure it is for the right device. Other than that, they are the same.

Is there any reason for the factory named *.img and the sysupgrade named *.bin?

Simple answer: it's a Netgear thing. It's been a while since I dug into this (and now too lazy to get that deep into the topic again), so I would guess that the original firmware would check for the file extension. Basically, I just used existing functions for Netgear routers, and it automagically creates the different firmware files. The .bin files are just openwrt-specific.

Good news, everyone: full button support is now in trunk, so in a few days you should be able to download such firmware images.