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.

Sorry, posts 801 to 806 are missing from our archive.

Thanks jow!!!!!!!!!! and hnyman.
Will try tomorrow hopefully. Will report back in the bug 13781 and also here smile
thanks!

In the new 39132 build I have added a few busybox config options back to menuconfig, from which they were removed by devs in 39106. Users of the firmware should see no difference, but if somebody is building a private build and need additional options, you might take a look at the busybox config file. (package/utils/busybox/Config.in)

I'm trying to install kmod-bridge package, which does not work sad

Installing kmod-bridge (3.3.8-1) to root...
Downloading http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/packages/kmod-bridge_3.3.8-1_ar71xx.ipk.

Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-bridge:
 *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) *     kernel (= 3.3.8-1-d6597ebf6203328d3519ea3c3371a493) * 
 * opkg_install_cmd: Cannot install package kmod-bridge.
burning daylight wrote:

I'm trying to install kmod-bridge package, which does not work sad

There is a kernel module checksum validation. Trying to install add-on modules from repository to private builds will practically always produce an error.

You can use opkg option "force-depends", but the router may get bricked, if the module is incompatible.
http://wiki.openwrt.org/doc/techref/opkg#options

hnyman wrote:

You can use opkg option "force-depends", but the router may get bricked, if the module is incompatible.

hnyman wrote:

Note: As I have been building my version with standard kernel options, the Attitude Adjustment 12.09 and trunk snapshot modules should be compatible with my builds, in case somebody wishes to add modules to my build.

Thanks!
Does this mean, that chases to brick router are in fact very low? If I brick it, is it _completely_ bricked or I will be able to re-flash it again?

burning daylight wrote:

Does this mean, that chases to brick router are in fact very low? If I brick it, is it _completely_ bricked or I will be able to re-flash it again?

Yes, the risk is really low.
And yes, WNDR3700 family has a good built-in recovery mode in the bootloader, so even if Openwrt itself would not work, you can always reflash it using the TFTP method. I have done that dozen times in the past 3 years. Wiki has good advice: http://wiki.openwrt.org/toh/netgear/wndr3700#recovery.flash.in.failsafe.mode

hnyman wrote:

I have uploaded r39101 with dnsmasq fixes made by jow.

Thankyou jow and hnyman.

This has fixed the DHCP issues with UCI and my guest network not getting a DHCP Range.
Thankyou so much!!!

I've got 1024kb set in my syslog size.
But I'm only getting a few pages out of it .............strange.....

searching to see if i can fix it.

beatmag wrote:

I've got 1024kb set in my syslog size.
But I'm only getting a few pages out of it .............strange.....

searching to see if i can fix it.

You can't. As far as I know, the option has currently no impact...
Devs have hardcode the log size to 16 kB, but I have doubled it to 32 kB. Larger than that seems to cause trouble. See https://dev.openwrt.org/ticket/14227

(Last edited by hnyman on 19 Dec 2013, 12:00)

hnyman wrote:
beatmag wrote:

I've got 1024kb set in my syslog size.
But I'm only getting a few pages out of it .............strange.....

searching to see if i can fix it.

You can't. As far as I know, the option has currently no impact...
Devs have hardcode the log size to 16 kB, but I have doubled it to 32 kB. Larger than that seems to cause trouble. See https://dev.openwrt.org/ticket/14227

oh what a strange bug.
thanks for the info.
i will keep an eye on the bug.

in terms of wifi stability and performance.......... would barrier breaker current build be alot better than attitude adjustment?

did you create a tool or script that just writes straight to the log to watch it blow up quicker?
i might try that see if i can find anything.

(Last edited by beatmag on 19 Dec 2013, 13:43)

beatmag wrote:

did you create a tool or script that just writes straight to the log to watch it blow up quicker?
i might try that see if i can find anything.

I am not sure if "writing to log" is the problem, or if the "logread" code is the problem. (logread may hang, but "logread -l" may work at the same time, as I wrote to the bug comments.)

In any case, the hardcoded log size in my build is now 32 kB, and if you want a larger one, you have to compile it by yourself.

Wifi in BB trunk has seen lots of improvements compared to AA.

(Last edited by hnyman on 19 Dec 2013, 14:35)

i'm having another strange problem with Barrier Breaker r39101, if i set wireless security to WEP-Shared Key i'm completely unable to connect to the wireless network. i tried multiple devices and they all trow similar errors. basically the wireless network is seen as unprotected, and the client don't ask for a password but just says it's impossible to connect.

once i switch to wpa2 i'm able to connect just fine. if i switch back to WEP-Shared Key it stops connecting.

i tried both with only one ssid with WEP-Shared Key security and with multiple ssid one with WPA2 and one with WEP-Shared Key on radio0 and the one with WEP-Shared Key security always fails to connect.

not sure what to think, it used to work just fine (i used the WEP-Shared Key protected SSID to connect the Nintendo DS)

EDIT:
this config:

/etc/config/wireless

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option network 'guest'
    option ssid 'guest'
    option encryption 'wep-shared'
    option key '1'
    option key1 's:pocasicurezza'

generates this:
/var/run/hostapd-phy0.conf

interface=wlan0
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
wep_default_key=
auth_algs=2
wpa=0
ssid=guest
bssid=c4:3d:c7:97:79:45

looks like there's something wrong to me. wep_default_key= should, i guess, contain my wep key, instead it's empty.


EDIT2:
everyting works fine on Attitude r39137

config gets generated with the right wep key

/var/run/hostapd-phy0.conf

interface=wlan0
ctrl_interface=/var/run/hostapd-phy0
disassoc_low_ack=1
preamble=1
wep_key0=706f63617369637572657a7a61
wep_default_key=0
auth_algs=2
wpa=0
ssid=OpenWrt
bridge=br-lan
wmm_enabled=1
bssid=c4:3d:c7:97:79:45
ignore_broadcast_ssid=0

(Last edited by Manp on 21 Dec 2013, 16:17)

Some kmod kernel module related errors seem to have popped by due to 39118, but they are most likely harmless log spam caused by qos-scripts. See https://dev.openwrt.org/ticket/14659

Additionally, I lost clients' ipv6 functionality with 39154, but it works again with 39155. As I see that check-in having no relevance for wired ipv6, I guess there may be some error condition that may occasionally materialise and may cause 6relayd to get killed.  See https://dev.openwrt.org/ticket/14658

@Manp:
Like said earlier, my build has the standard wifi components, so there should be nothing build-specific. If there are WEP related errors, you might file a bug about them. (Comparing to Attitude does not help much as that has so old wifi code. You should try to see what is the newest trunk build where it still worked, so that a regression window could be defined.)

EDIT: apparently there really is a WEP bug due to new netifd/wifi integration and a patch has been proposed: https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/023034.html

(Last edited by hnyman on 22 Dec 2013, 13:16)

hnyman wrote:

@Manp:
Like said earlier, my build has the standard wifi components, so there should be nothing build-specific. If there are WEP related errors, you might file a bug about them. (Comparing to Attitude does not help much as that has so old wifi code. You should try to see what is the newest trunk build where it still worked, so that a regression window could be defined.)

EDIT: apparently there really is a WEP bug due to new netifd/wifi integration and a patch has been proposed: https://lists.openwrt.org/pipermail/openwrt-devel/2013-December/023034.html

i was looking for someone who could confirm it was a bug, since i was unable to find anyone else with the same problem. which you actually did smile

now, can you implement that patch in your build or should we wait until it's added to trunk?

as always thanks for the answer btw smile

Manp wrote:

now, can you implement that patch in your build or should we wait until it's added to trunk?

I might add it to my build if you first test that it works for you.
In the live system the file to be edited is "/lib/netifd/hostapd.sh". 4 lines need to be edited in it. You might edit it by hand, as it is just a shell script...

However, I have made a patched copy of the script and stored in the WEP-patch folder at Dropbox. Direct link: https://db.tt/yW9gbFm6
Replace /lib/netifd/hostapd.sh with that and try WEP again.  (The original /lib/netifd/hostapd.sh will always be available in your system as /rom/lib/netifd/hostapd.sh in case you want to revert to it.)

seems to work, but only if the WEP protected SSID comes before the other WPA SSIDs inside the configuration file.
as in wlan0=wep and wlan0-1=wpa.

if for whatever reason (editing the config file or from luci) i set wlan0=wpa and wlan0-1=wep i get this in system log:

Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): Configuration file: /var/run/hostapd-phy0.conf
Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): Using interface wlan0 with hwaddr c4:3d:c7:97:79:45 and ssid "MelaG"
Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): Could not set WEP encryption.
Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): Interface initialization failed
Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): wlan0: Unable to setup interface.
Sat Dec 21 23:21:41 2013 daemon.notice netifd: radio0 (11600): Device setup failed: HOSTAPD_START_FAILED

just to be more clear, this configuration:

config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr 'c4:3d:c7:97:79:45'
    option hwmode '11ng'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option htmode 'HT40-'
    option country 'IT'
    option channel '6'
    option txpower '20'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'MelaBacata'
    option network 'guest'
    option hidden '1'
    option encryption 'wep-shared'
    option key '1'
    option key1 's:pocasicurezza'

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'wpassid'
    option encryption 'psk2'
    option key 'mykeyhere'
    option wps_pushbutton '1'
    option wps_pin 'mypinhere'

works just fine, while this one:

config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr 'c4:3d:c7:97:79:45'
    option hwmode '11ng'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option htmode 'HT40-'
    option country 'IT'
    option channel '6'
    option txpower '20'

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'wpassid'
    option encryption 'psk2'
    option key 'mykeyhere'
    option wps_pushbutton '1'
    option wps_pin 'mypinhere'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'MelaBacata'
    option network 'guest'
    option hidden '1'
    option encryption 'wep-shared'
    option key '1'
    option key1 's:pocasicurezza'

always fails to bring up any wireless interface on radio0.

also, this problem doesn't seem to be related to the script since the hostapd-phy0.conf that the fixed script (the patched one) generates contains apparently no errors.

is seems to be something like this: https://dev.openwrt.org/ticket/11279
but not quite the same since it completely fails to even start hostapd on radio0.

btw, thanks for the help smile

(Last edited by Manp on 22 Dec 2013, 18:37)

I have only tested my patch on a radio0-WEP, radio1-WEP configuration. Unfortunately I cannot change the configuration of my router right now as it's in active use.

Can you compare the generated hostapd config files (-phy0.conf and -phy1.conf) for the working and broken cases? Is there a difference in the generated config? Otherwise it might just be the order in which hostapd is started, and then it might be a hostapd or mac80211 bug.

Edit: also please post the configs.

(Last edited by eigma on 22 Dec 2013, 20:39)

eigma wrote:

I have only tested my patch on a radio0-WEP, radio1-WEP configuration. Unfortunately I cannot change the configuration of my router right now as it's in active use.

Can you compare the generated hostapd config files (-phy0.conf and -phy1.conf) for the working and broken cases? Is there a difference in the generated config? Otherwise it might just be the order in which hostapd is started, and then it might be a hostapd or mac80211 bug.

Edit: also please post the configs.

config that works:

/etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr 'c4:3d:c7:97:79:45'
    option hwmode '11ng'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option htmode 'HT40-'
    option country 'IT'
    option channel '6'
    option txpower '20'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'MelaBacata'
    option network 'guest'
    option encryption 'wep-shared'
    option key '1'
    option key1 's:pocasicurezza'
    option hidden '1'
    option macfilter 'allow'
    list maclist 'mymachere'

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'mywpassidhere'
    option encryption 'psk2'
    option key 'mywpakeyhere'
    option wps_pushbutton '1'
    option wps_pin 'mypinhere'

config wifi-device 'radio1'
    option type 'mac80211'
    option channel '36'
    option macaddr 'c4:3d:c7:97:79:47'
    option hwmode '11na'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option txpower '17'
    option htmode 'HT40+'
    option country 'IT'

config wifi-iface
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option encryption 'psk2'
    option wps_pushbutton '1'
    option ssid 'mywpassidhere'
    option key 'mykeyhere'
    option wps_pin 'mypinhere'

/var/run/hostapd-phy0.conf

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=IT
ieee80211d=1
hw_mode=g
channel=6

ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

interface=wlan0
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=1
wep_key0=706f63617369637572657a7a61
wep_default_key=0
auth_algs=2
wpa=0
ssid=MelaBacata
macaddr_acl=1
accept_mac_file=/var/run/hostapd-wlan0.maclist
bssid=c4:3d:c7:97:79:45


bss=wlan0-1
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
wpa_passphrase=mywpakeyhere
auth_algs=1
wpa=2
wpa_pairwise=CCMP
eap_server=1
ap_pin=mypinhere
wps_state=2
ap_setup_locked=0
device_type=6-0050F204-1
device_name=OpenWrt AP
manufacturer=openwrt.org
config_methods=push_button
ssid=mywpassidhere
bridge=br-lan
okc=0
disable_pmksa_caching=1
bssid=c6:3d:c7:97:79:45

config that fails:
/etc/config/wireless

config wifi-device 'radio0'
    option type 'mac80211'
    option macaddr 'c4:3d:c7:97:79:45'
    option hwmode '11ng'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option htmode 'HT40-'
    option country 'IT'
    option channel '6'
    option txpower '20'

config wifi-iface
    option device 'radio0'
    option network 'lan'
    option mode 'ap'
    option ssid 'mywpassidhere'
    option encryption 'psk2'
    option key 'mywpakeyhere'
    option wps_pushbutton '1'
    option wps_pin 'mypinhere'

config wifi-iface
    option device 'radio0'
    option mode 'ap'
    option ssid 'MelaBacata'
    option network 'guest'
    option encryption 'wep-shared'
    option key '1'
    option key1 's:pocasicurezza'
    option hidden '1'
    option macfilter 'allow'
    list maclist 'mymachere'

config wifi-device 'radio1'
    option type 'mac80211'
    option channel '36'
    option macaddr 'c4:3d:c7:97:79:47'
    option hwmode '11na'
    list ht_capab 'SHORT-GI-40'
    list ht_capab 'TX-STBC'
    list ht_capab 'RX-STBC1'
    list ht_capab 'DSSS_CCK-40'
    option txpower '17'
    option htmode 'HT40+'
    option country 'IT'

config wifi-iface
    option device 'radio1'
    option network 'lan'
    option mode 'ap'
    option encryption 'psk2'
    option wps_pushbutton '1'
    option ssid 'myradio1ssidhere'
    option key 'mykeyhere'
    option wps_pin 'mypinhere'

/var/run/hostapd-phy0.conf

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=IT
ieee80211d=1
hw_mode=g
channel=6

ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

interface=wlan0
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
wpa_passphrase=mywpakeyhere
auth_algs=1
wpa=2
wpa_pairwise=CCMP
eap_server=1
ap_pin=mypinhere
wps_state=2
ap_setup_locked=0
device_type=6-0050F204-1
device_name=OpenWrt AP
manufacturer=openwrt.org
config_methods=push_button
ssid=mywpassidhere
bridge=br-lan
okc=0
disable_pmksa_caching=1
bssid=c4:3d:c7:97:79:45


bss=wlan0-1
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=1
wep_key0=6d797770616b657968657265
wep_default_key=0
auth_algs=2
wpa=0
ssid=MelaBacata
macaddr_acl=1
accept_mac_file=/var/run/hostapd-wlan0-1.maclist
bssid=c6:3d:c7:97:79:45

i think there's a bug here. as you can see in the working and broken case there are two different values for the wep_key0 value, but the wep key is the same in both cases.

in the working case wep_key0=706f63617369637572657a7a61 which transates to "pocasicurezza" which is my actual wep key

in the broken case wep_key0=6d797770616b657968657265 which translates to "mywpakeyhere"! so in the broken case the script is actually using the wpa key from the wpa protected interface to generate the wep key for the wep protected interface which result in an invalid wep key!

if i change my wpa key so the script generates a valid wep key from it then it works in both cases, so the bug is certainly somewhere in the script that generates the hostapd-phyX.conf file.

hope this makes sense smile

(Last edited by Manp on 23 Dec 2013, 03:02)

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).

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.

(Last edited by eigma on 23 Dec 2013, 05:18)