OpenWrt Forum Archive

Topic: Build for WNDR3700/WNDR3800

The content of this topic has been archived between 9 Jul 2013 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

eigma wrote:

Two things, one to gather more information, the other a possible fix.

1) Edit /lib/netifd/netifd-wireless.sh and insert this line at the beginning, before the NETIFD_MAIN_DIR line:

echo "$@" >>/tmp/netifd.log

Then run 'wifi reload radio0' and post the contents of /tmp/netifd.log.

Restore the netifd-wireless.sh to rom (rm /overlay/lib/netifd/netifd-wireless.sh).

"wifi reload radio0" dosn't seem to produce any file inside /tmp/

this is the log after a "wifi down" and "wifi up"

mac80211 setup radio0 {"config":{"macaddr":"c4:3d:c7:97:79:45","hwmode":"11ng","ht_capab":["SHORT-GI-40","TX-STBC","RX-STBC1","DSSS_CCK-40"],"htmode":"HT40-","country":"IT","channel":"6","txpower":20},"interfaces":{"0":{"bridge":"br-lan","config":{"mode":"ap","ssid":"mywpassidhere","encryption":"psk2","key":"mywpakeyhere","wps_pushbutton":true,"wps_pin":"mypinhere","network":["lan"]}},"1":{"config":{"mode":"ap","ssid":"MelaBacata","encryption":"wep-shared","key1":"s:pocasicurezza","hidden":true,"macfilter":"allow","maclist":["mymachere"],"network":["guest"]}}}}
mac80211 setup radio1 {"config":{"channel":"36","macaddr":"c4:3d:c7:97:79:47","hwmode":"11na","ht_capab":["SHORT-GI-40","TX-STBC","RX-STBC1","DSSS_CCK-40"],"txpower":17,"htmode":"HT40+","country":"IT"},"interfaces":{"0":{"bridge":"br-lan","config":{"mode":"ap","encryption":"psk2","wps_pushbutton":true,"ssid":"myradio1ssidhere","key":"mykeyhere","wps_pin":"mypinhere","network":["lan"]}}}}

everything seems correct to me.

2) Edit /lib/netifd/hostapd.sh, around line 236, after this line:

local wep_keyidx=0

Insert this line:

json_get_vars key

Then wifi reload and check the hostapd config.

seems to work now... i get the right hex value for the actual WEP key used in config even if the WPA SSID comes before in the config.

EDIT: tested both combinations and both seems to work fine now.

smile

(Last edited by Manp on 23 Dec 2013, 12:16)

Thnx eigma, seems to solve the wep issue smile

hnyman wrote:
Romulus wrote:

I notice also that my Windows machines get an IPV6 with a lease time of 1 hour, after that it says Expired.
Don't Windows machine renew their IPV6 leases, or don't I have the optimal DHCPv6 settings for Windows?

I have never bothered to investigate, but I see the same.

My first guess is that Windows7 is happy with the stateless RA and does not bother to maintain the stateful dhcpv6.

this still is the same for trunk, my windows7 client renews it ipv6 address, but "leasetime remaining" in LuCI remains as "expired". Any fix for this?

fmfranzeck wrote:
hnyman wrote:
Romulus wrote:

I notice also that my Windows machines get an IPV6 with a lease time of 1 hour, after that it says Expired.
Don't Windows machine renew their IPV6 leases, or don't I have the optimal DHCPv6 settings for Windows?

I have never bothered to investigate, but I see the same.

My first guess is that Windows7 is happy with the stateless RA and does not bother to maintain the stateful dhcpv6.

this still is the same for trunk, my windows7 client renews it ipv6 address, but "leasetime remaining" in LuCI remains as "expired". Any fix for this?

There are problems with static leases too.
For example there are two lines with the same address for every host, first is expired from the beginning and has "?" as hostname, while the second has the correct hostname, but remains expired after an hour.

It's the same on Windows 7 and 8/8.1 and there for a long time now.

(Last edited by ferob on 30 Dec 2013, 16:38)

#1
Build 39183 sets WPS pin code to the original value given by Netgear in the label at the router's bottom. I got interested in bug 14701 (https://dev.openwrt.org/ticket/14701), so I wrote a patch to fetch the original PIN value from the Art partition where it is stored. The value can be overridden in /etc/config/wireless with the 'wps_pin' option. Or if you want the Openwrt default 12345670, just comment my lines in a live router's /lib/netifd/hostapd.sh and uncomment the original 12345670 line.

--- trunk/package/network/services/hostapd/files/netifd.sh    (revision 39183)
+++ trunk/package/network/services/hostapd/files/netifd.sh    (working copy)
@@ -257,7 +257,11 @@
         set_default wps_device_type "6-0050F204-1"
         set_default wps_device_name "OpenWrt AP"
         set_default wps_manufacturer "openwrt.org"
-        set_default wps_pin "12345670"
+        # Set WPS label pin to match original Netgear value stored in art partition
+        # Value for wps_pin can be overridden by /etc/config/wireless
+        local PINdefault="$(dd if=/dev/mtdblock6 bs=1 skip=18 count=8 2>/dev/null)"
+        set_default wps_pin "$PINdefault"
+        #set_default wps_pin "12345670"
 
         wps_state=2
         [ -n "$wps_configured" ] && wps_state=1

#2
I have noticed that 6relayd may die during the boot process. And then LAN clients don't get ipv6 connectivity. I have filed two bugs about this, and the bug has apparently surfaced somewhere around 39150. Build 39061 from Dec 15 works, while 39155 from Dec 21 already shows the symptoms sometimes.
https://dev.openwrt.org/ticket/14710 and https://dev.openwrt.org/ticket/14658

#3
r39183 is the last build in two weeks. Next build in late January.

(Last edited by hnyman on 31 Dec 2013, 18:44)

Good New Year Eve!

hnyman wrote:

#1
Build 39183 sets WPS pin code to the original value given by Netgear in the label at the router's bottom. I got interested in bug 14701 (https://dev.openwrt.org/ticket/14701), so I wrote a patch to fetch the original PIN value from the Art partition where it is stored. The value can be overridden in /etc/config/wireless with the 'wps_pin' option. Or if you want the Openwrt default 12345670, just comment my lines in a live router's /lib/netifd/hostapd.sh and uncomment the original 12345670 line.

--- trunk/package/network/services/hostapd/files/netifd.sh    (revision 39183)
+++ trunk/package/network/services/hostapd/files/netifd.sh    (working copy)
@@ -257,7 +257,11 @@
         set_default wps_device_type "6-0050F204-1"
         set_default wps_device_name "OpenWrt AP"
         set_default wps_manufacturer "openwrt.org"
-        set_default wps_pin "12345670"
+        # Set WPS label pin to match original Netgear value stored in art partition
+        # Value for wps_pin can be overridden by /etc/config/wireless
+        local PINdefault="$(dd if=/dev/mtdblock6 bs=1 skip=18 count=8 2>/dev/null)"
+        set_default wps_pin "$PINdefault"
+        #set_default wps_pin "12345670"
 
         wps_state=2
         [ -n "$wps_configured" ] && wps_state=1

that's great news. i always considered the choice to hardcode a default pin as a possible security concern since someone who know an access point is running openwrt could gain access to the wireless network simply by trying the default pin.
of course that's only true if you don't set your own pin in /etc/config/wireless but since this particular setting isn't available in luci i think it's fair to assume most people won't bother.

your patch seems to me the most reasonable solution, thanks again!

btw, happy new year!

smile

(Last edited by Manp on 31 Dec 2013, 23:04)

Hi,

Maybe a stupid question, but does this build also work great with ipv4? My current provider doesn't offer ipv6 (yet), but they have annouced to implement it in 2014. :-)

Also happy new year!

Ankh wrote:

Maybe a stupid question, but does this build also work great with ipv4?

Naturally yes.

(Last edited by hnyman on 1 Jan 2014, 13:03)

hnyman wrote:

#2
I have noticed that 6relayd may die during the boot process. And then LAN clients don't get ipv6 connectivity. I have filed two bugs about this, and the bug has apparently surfaced somewhere around 39150. Build 39061 from Dec 15 works, while 39155 from Dec 21 already shows the symptoms sometimes.
https://dev.openwrt.org/ticket/14710 and https://dev.openwrt.org/ticket/14658

#3
r39183 is the last build in two weeks. Next build in late January.

I made one more build, as 39184 seems to fix the 6relayd issue.

r39185 is the last build in two weeks. Next build in late January.

@hnyman: is there a reason you didn't inlucde dnsmasq with ipv6 support?
You are using 6relayd instead of radvd. Because of overlapping features with dnsmasq(6)?

I am sure these are important design decissions I want to understand for my setup.

Thanks,
acema

6relayd is the current openwrt default in Openwrt trunk. So I am using it.

If you read this thread about a year ago, you would find that I used dnsmasq-dhcpv6 variant for awhile. But dropped it after the new default functionality was introduced. Same for radvd.

Dear hnyman,

I wanted to thank you for this fine release. I have been a follower of yours for the past year and never hit an issue (I follow the attitude/stable branch).

I would have a small request for your next compilation, could you include the two scheduler modules (kmod-sched + kmod-sched-core)? I would like to use HTB instead of HFSC and so far have been compiling my own images to get it. If you could also include ethtool that would be great. Also, having the Heartbeat LED module would be a cool addon.

If you are interested in my qos scripts (lightweight debloat + HFSC/FQ_CODEL), you can find them on my github:

http://github.com/zcecc22/qos-nxt

Best Regards,
zcecc22

Hello all - thank you hnyman for a great build!!!I am new to OpenWRT and to Linux but I am learning. I have a 3 questions:

First: I am receiving some "spam" in my system log, as follows:

Wed Jan  8 19:19:49 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:20:49 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:21:51 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:22:54 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:23:55 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:24:55 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()
Wed Jan  8 19:25:56 2014 user.notice firewall: Reloading firewall due to ifup of wan6 ()

As you see I a receive the messages quite frequently. I am running the following on a WNDR3800
Model    NETGEAR WNDR3800
Firmware Version    OpenWrt Barrier Breaker r39185 / LuCI Trunk (svn-r9946)
Kernel Version    3.10.24

I found info about the issue at https://forum.openwrt.org/viewtopic.php?id=46872 and
https://forum.openwrt.org/viewtopic.php?id=46872.
I applied what looked like a temp patch:
[ "$ACTION" != "ifupdate" ] || exit 0
But do not know how to apply the patch at the second link. I'm wondering if anyone else has noticed this and if so what they did about it.

Also, I had a high school kid from upstairs get into my router - I think - he was able to pull an IPv4 ip from the router which was configured with dd-WRT (BrainSlayer-V24-preSP2 - 4-15-2013-r21286). I found his lease listed in the attached devices section of dd-WRT.
I used the following settings: SSID turned off, it used a 63 character key, I used the MAC filter option to allow two clients, and turned the power down.
I thought switching to static IPv6 and IPv4 addresses for the LAN might help this issue but haven't figured out out to do this yet. Any suggestions?

And finally, is there a way to create an admin account other than root and disable the root account?

Thanks for your assistance!!!

@GethroC: none of those questions is related specifically to my build, and I have no idea what the dd-Wrt question does in this thread. Please ask especially the generic questions in other threads. This is not a general support thread.

Regarding the ipv6 log spam, there seems to be an issue that some users see. CyrusFF is the author of 6relayd and odhcp6c, and was also active in the thread you mentioned. He added in October a filter to drop RA renews less than 60 seconds apart, but your case just exceeds that filter, as the update intervals are 60-63 seconds. I added a request to change the limit from 60 to 65 seconds to that thread you already mentioned. https://forum.openwrt.org/viewtopic.php?pid=222877#p222877

@zcecc22: kmod-sched is already included in trunk I think. But I am not going to add new modules, as I have no need for them. At least in my usage, the cpu utilization / system load remains so low, that I doubt the heartbeat would offer any special effects. I try to keep this build simple, so you have to continue building your own if you want those :-(   (That goes especially for stable AA branch, as there is practically no development, so the build remain rather static.)

(Last edited by hnyman on 16 Jan 2014, 05:57)

Hmm.
wget support was one of the reasons why I started to use dropbox after the previous FTP site went down. But apparently I didn't test busybox wget :-(

I will check how much space the GNU wget (with https support) would take and I might include it in the next build. (It might not be not that much as the openssl library is already included.)

EDIT:
alternatively you could also install GNU wget from the snapshot package repository.
opkg update
opkg install wget

EDIT2:
It seems to increase the firmware size by 192 kB. I will include it in the build as also I would like to have the download capability readily there.

(Last edited by hnyman on 18 Jan 2014, 18:48)

Good news, thank you! wink

hnyman wrote:

@GethroC:
Regarding the ipv6 log spam, there seems to be an issue that some users see. CyrusFF is the author of 6relayd and odhcp6c, and was also active in the thread you mentioned. He added in October a filter to drop RA renews less than 60 seconds apart, but your case just exceeds that filter, as the update intervals are 60-63 seconds. I added a request to change the limit from 60 to 65 seconds to that thread you already mentioned. https://forum.openwrt.org/viewtopic.php?pid=222877#p222877

r39320 trunk:
- odhcp6c filter time for ISP RA spam has been increased 60-->70 seconds to avoid spam from ISPs with one-minute RA update cycle.
- GNU wget has been added

@hnyman: Any chance to get kmod-fs-hfsplus built in as a default package? I tried installing via opkg, but the packages don't work with the kernel and if ignoring dependencies I get: "hfsplus: Unknown symbol __blockdev_direct_IO (err 0)". This would be very useful, to allow the WNDR to act as a time machine target. It's possible to use a different fs, but then you can't plug the drive directly into the mac to do a restore. The ipk is just 54k, so it shouldn't add much required space.

@hnyman: increasing that timer won't really help. It will just reduce the reloads to happen every 70 seconds instead of 60.
However https://dev.openwrt.org/changeset/39332 should fix everything for all ISPs.

CyrusFF wrote:

@hnyman: increasing that timer won't really help. It will just reduce the reloads to happen every 70 seconds instead of 60.
However https://dev.openwrt.org/changeset/39332 should fix everything for all ISPs.

I noticed, and your fix should help also for similar ipv4 dhcp renewal spam (every 30 min for me). Nice.