OpenWrt Forum Archive

Topic: davidc502 1900ac 3200acm builds

The content of this topic has been archived between 26 Feb 2018 and 7 May 2018. Unfortunately there are posts – most likely complete pages – missing.

My 5G radio0 stopped working sad

Mode: Unknown
Wireless is disabled or not associated

iwinfo wlan0 info
No such wireless device: wlan0

I cant get it back to work... 2.4g is still working.
Allready restarted my router, changed settings, deleted and added everything again but it still doesn't come up for some reason.
Hopefully it's not broken... Any advice ?


edit: still have my old 88W8964.bin, can i just replace the newer one to test ?

(Last edited by Zorr0x on 11 Dec 2017, 15:15)

Spamtree wrote:
droa wrote:

Apologies if this has been asked before, and I hope someone can give me some pointers, specific to the 3200acm.
my 3200acm is running David's r5422.
I'd like to connect it to a managed switch downstream. One of the ethernet ports on the 3200 with multiple VLANs, will connect to one port of the switch. Does the 3200acm (Marvell) even support tagged and multiple vlans, especially in David's builds ?(my other broadcomm router, wrt350n on dd-wrt, was all set up that way, but just died, so am looking for that functionality in the 3200.)

Luci -> Network -> Switch

Similar to DD-wrt.

Thank you !
I did see that the option exists, just wasnt sure if the GUI works, and people use it successfully for creating tagged VLANs on the 3200. might as well create all vlans on the 3200, the way it works for others.
(on the 350n the dd-wrt gui didnt work, and there were nvram cmds that were required for stable tagging, hence the question)

(Last edited by droa on 11 Dec 2017, 17:42)

Zorr0x wrote:

r5422-9fe59abef8, After 2d 4h 49m 16s
Memory: Free 188196 kB / 513040 kB (36%)
Keeps shrinking...  Doesn't seem to be normal...??

edit: 2d 14h 42m 48s
Free 137084 kB / 513040 kB (26%)
Am I the only one with this issue ??

Using lastest driver btw...

I have the same issue with WRT1900ACS, but my seems to be related to PPPOE. Unfortunately I can not post links but there is abug opened (FS#833) in bugs.lede-project.org

vasko_openwrt wrote:

I have the same issue with WRT1900ACS, but my seems to be related to PPPOE.

I'm using pppoe as well.
Found it a little bit odd that no one mentioned this problem before.
Restarted today because of my radio problem, i was at ~20% free memory...

vasko_openwrt wrote:
Zorr0x wrote:

r5422-9fe59abef8, After 2d 4h 49m 16s
Memory: Free 188196 kB / 513040 kB (36%)
Keeps shrinking...  Doesn't seem to be normal...??

edit: 2d 14h 42m 48s
Free 137084 kB / 513040 kB (26%)
Am I the only one with this issue ??

Using lastest driver btw...

I have the same issue with WRT1900ACS, but my seems to be related to PPPOE. Unfortunately I can not post links but there is abug opened (FS#833) in bugs.lede-project.org

You can post a link - leave the https:// or http:// part from the link. Most browsers can figure out that it is a link or a person can copy and paste.

LEDE TORGUARD OPENVPN TUTORIAL - ADD Https:// in front of links below ( links =  BOLD TEXT )

Regards
Mike
OK - I decided to put this up on the TorGuard Forum as I could not find a tutorial anywhere with specific step by step instructions for getting Torguard OPENVPN working with OpenWrt/ Lede. In advance, I want to thank the excellent support team at TorGuard ( especially Mike & Andy ) for assisting me with getting my Lede/Openwrt VPN router up and running.
I use davidc502 firmware which is described as  Moderately Customized LEDE Development Builds found here - davidc502sis.dynamic-dns.net/releases/ and here - davidc502sis.dynamic-dns.net/snapshots/ -- davidc502's forum found here - forum.openwrt.org/viewtopic.php?id=64949&p=164b  - Dave's builds are for Linksys WRT1900AC v1 Linksys WRT1900AC v2 Linksys WRT1900ACS Linksys WRT3200ACM Linksys WRT1200AC models ONLY !!! One of the many benefits of using Dave's custom firmware is that it comes with many pre-installed and configured software packages - including OpenVpn and Dnscrypt - I use both in conjunction on my router. For full list of packages see Dave's configuration seed found here -   davidc502sis.dynamic-dns.net/releases/config.seed - However, the guide tutorial here will work on any and every OpenWrt/ Lede firmware based router. I also tested this with Lede stable firmware ( current version 17.01.4 ) found here - lede-project.org/downloads -
Anyway - here we go - this is Mike's detailed original answer to my inquiry concerning my request for assistance in setting up OpenVpn on OpenWrt /Lede. I have added a few edits in order to make this more comprehensible and easier to implement. This guide  will work Guaranteed if you follow instructions step by step.
Mike // Staff

Thank you, can you check if the steps below works ok for you

1) Then in Luci Gui  go to System > Software, do update first ( ssh command opkg update )
then search for openvpn and install openvpn-openssl and luci-app-openvpn. ( ssh command -  opkg install openvpn-openssl luci-app-openvpn )
These are necessary - Luci is GUI frontend for Openwrt - it comes pre-installed with davidc502's firmware. Also installed on Lede stable.

2) Here you Generate OpenVpn config on torguard.net/tgconf.php?action=vpn-openvpnconfig choosing openwrt.

3) Login using ftp client like winscp to the router (openwrt) and the config file downloaded from the tool to be uploaded to box and renamed as /etc/config/openvpn
To make this simpler - you can copy and paste the newly generated text file to a text file on your desktop and /or download config file to your desktop. Install nano ( preferred text editor ) -
opkg install nano - if you need to install nano -
(  if not already there / comes pre-installed in davidc502's builds )
to your router. SSH into router then type ( copy and paste ) -"  nano /etc/config/openvpn " ( without parenthesis )  - erase all contents of file ( Ctrl + k )  and replace ( copy and paste ) with contents of config file you copied and downloaded earlier.
Sample of my  /etc/config/openvpn config file -  adjust yours as you see fit but stick with config from torguard.net/tgconf.php?action=vpn-openvpnconfig as your basic guide -

config openvpn 'TorGuard_AES256GCM_SHA256'
        option client '1'
        option dev 'tun'
        option proto 'udp'
        option resolv_retry 'infinite'
        option nobind '1'
        option persist_key '1'
        option persist_tun '1'
        option ca '/etc/openvpn/torguard/ca.crt'
        option remote_cert_tls 'server'
        option tls_auth '/etc/openvpn/torguard/ta.key 1'
        option cipher 'AES-256-GCM'
        option comp_lzo 'adaptive'
        option verb '4'
        option fast_io '1'
        option auth_user_pass '/etc/openvpn/torguard/userpass.txt'
        option remote_random '0'
        option auth 'SHA256'
        option reneg_sec '0'
        option port '1195'
        list remote 'ny.east.usa.torguardvpnaccess.com'
        option sndbuf '393216'
        option rcvbuf '393216'
        option enabled '1'
        option keepalive '10 120'
        option auth_nocache '1'
        option tls_client '1'
        option setenv 'CLIENT_CERT 0'
        option tls_version_min '1.2'
        option tls_cipher 'TLS-DHE-RSA-WITH-AES-256-GCM-SHA384'
        option ncp_ciphers 'AES-256-GCM:AES-128-GCM'
        option tun_mtu '1500'
        option tun_mtu_extra '32'
        option ncp_disable '1'
        option engine 'dynamic'
        option mute_replay_warnings '1'
        option disable_occ '1'
        option keysize '256'
        option mssfix '1450'
        option script_security '2'
        option reneg_bytes '1073741824'
        option mute '20'
        option pull '1'
        option log '/tmp/openvpn.log'

Then hit Ctrl + o - you will be asked to write file - hit enter to save file  - then Ctrl + x to close file and go back into shell

4) create folder /etc/openvpn/torguard and add under it the ca.crt, ta.key from torguard.net/downloads/ta.key and torguard.net/downloads/ca.crt   and create new file userpass.txt where in it put on first line your vpn username and second you vpn password.

Create /etc/openvpn/torguard folder ( in ssh session into router - type - " mkdir /etc/openvpn/torguard "  ( without parenthesis )   - in order to proceed  -   opkg install wget ( if you need to install wget )
ssh into router use wget ( install wget if not already there / comes pre-installed in davidc502's builds ) to issue following commands in order to install necessary files to /etc/openvpn/torguard folder which you just created : type the following commands in shell

A - "  wget -P /etc/openvpn/torguard torguard.net/downloads/ta.key "  ( without parenthesis ) - copy and paste - (  ta.key is downloaded to /etc/openvpn/torguard folder )

B - " wget -P /etc/openvpn/torguard torguard.net/downloads/ca.crt "  ( without parenthesis ) - copy and paste - ( ca.crt is downloaded to /etc/openvpn/torguard folder )

C - type ( copy and paste ) " nano /etc/openvpn/torguard/userpass.txt "  ( without parenthesis )  - in new text  file type ( copy and paste ) in first line your TorGuard Vpn username and on second line your TorGuard  Vpn password  - Then hit Ctrl + o - you will be asked to write file - hit enter to save file  - then Ctrl + x to close file and go back into shell -   userpass.txt is now added under /etc/openvpn/torguard/ folder as well

Now - these commands are required from my past experience - still in SSH type ( copy and paste )
chmod 0777 /etc/openvpn/torguard/ta.key     chmod 0777 /etc/openvpn/torguard/ca.crt   chmod 0400 /etc/openvpn/torguard/userpass.txt

There are two alternative methods available in order to create the necessary openvpn network interface and complimentary firewall rules. The first one I will

feature is through the command line shell - using uci commands.

The second is simply done through the Luci Web GUI. Personally, I use the uci command line approach as I feel the firewall rules for the vpn connection are more

secure in nature using this method. For the sake of this tutorial, consider command line - uci - Scenario A - and Luci Web Gui method - Scenario B. Both will create

an interface and working firewall rules and in the end - and leave you with a working TorGuard OpenVpn configuration and subsequent connection. GUARANTEED !

Remember this is either A or B - not A AND B !!! - you can not use both. It is one or the other.

Scenario A -

TorGuard OpenVpn Network Interface Creation and Setup via command line - uci

uci set network.myvpnc=interface
uci set network.myvpnc.proto=none
uci set network.myvpnc.ifname=tun0
uci commit network

TorGuard OpenVpn Firewall Rules Setup via command line - uci

uci add firewall zone
uci set firewall.@zone[-1]=zone
uci set firewall.@zone[-1].name=myvpnc_fw
uci set firewall.@zone[-1].network=myvpnc
uci set firewall.@zone[-1].input=REJECT
uci set firewall.@zone[-1].output=ACCEPT
uci set firewall.@zone[-1].forward=REJECT
uci set firewall.@zone[-1].masq=1
uci set firewall.@zone[-1].mtu_fix=1
uci add firewall forwarding
uci set firewall.@forwarding[-1]=forwarding
uci set firewall.@forwarding[-1].src=lan
uci set firewall.@forwarding[-1].dest=myvpnc_fw
uci commit firewall
reboot


Scenario B -

TorGuard OpenVpn - Luci ( Web Gui ) Network Interface Creation and Setup and Firewall Rules Setup

1 ) Back on Luci ( Lede/OpenWrt Gui ). Go to Network > Interfaces and add new interface name the interface " MYVPN " - make sure the " Protocol of the new interface "  at top of page is set to  " Unmanaged " and at bottom of page select " Custom " and enter "  tun0 " ( tun number zero ) in the field next to custom radio button.

Click On Submit then Save and Save and Apply Settings

2 ) Go to Network > Firewall section, click add " new zone " and make it to " "accept " ( all three up top - accept all options )  input/output/forward/masquarde, ( check " masquerade " box under where you accepting all .
Then choose - enter check mark in box next to  interface VPN  ( Covered networks ).
Then in bottom box " Inter-Zone Forwarding " (  Allow forward to destination zones: ) = LAN and  then

( Allow forward from source zones: ) = LAN

This means click both radio buttons next to lan in last section on firewall " newzone " you just created.

Lastly, Click On Save and Save and Apply Settings -

3 ) Go to Services > Openvpn and start the VPN service.

All should be up and running after this. Support said they would post this in tutorials for Openwrt/Lede firmware. As I said, I just put this up to save folks time

if they run TorGuard VPN. By the way, it is an excellent VPN service.  Easier setup than PIA VPN - specifically on Lede/Openwrt. Again - thanks to TorGuard Support.

Let us know if you have any further questions.

Regards
Mike

LEDE - OPENWRT TORGUARD VPN SETUP

(Last edited by directnupe on 31 Dec 2017, 16:31)

Can anyone please tell me how to see which process is constantly consuming my free memory ?
It's really driving me crazy and i can't help myself. sad

@directnupe, thanks for this tutorial !
After i fixed my problems i will try to set up selective VPN with David's build.
I will definitely use your tutorial for the basic vpn setup.

For those seeing a decrease in free memory: it is due to the caching mechanism, freed upon request by any service that requires it.

nitroshift

I dont think a "logread -f >> /mnt/usb/logging.log &" would work in the case of a kernel panic. How would it work if the CPU got stuck or a driver crashes? It cant work. It would mostly just log everything until the kernel panic, and not give any helpful information for the important crash part. Ill give it a try, but I doubt to see anything useful when a crash happens. Would it even log kernel outputs?

(Last edited by makedir on 12 Dec 2017, 06:40)

nitroshift wrote:

For those seeing a decrease in free memory: it is due to the caching mechanism, freed upon request by any service that requires it.

Well what is caching so much ?
Free mem starts at 55-56% for me(after restart) and will go down all the time.
As far as i can tell i haven't got any stability problems so far but i rebooted at ~20% (after 2d20h)...
Isn't 55% a lil too high as a start value ?
Sorry but i really try to understand it... on other screenshots i always saw about 85% free mem with the same router.

@eduperez, thanks for the link and sorry for beeing so noobish wink

eduperez wrote:

See "unused memory is wasted memory".

Thats two different things. Of course unused memory is wasted memory... BUT, a router shouldnt see a increase in memory over time like this, especially not a linear increase. This is more a sign for a memory leak of some component running on the router. Mine has about 54MB after boot, and after a few days still 55MB. It is suddenly had like 150MB after a few days, this is bad and a sign for some part is not properly working or badly programmed.

Question for David: Do your builds btw have CPUIDLE disabled by default? For all 4 models?

(Last edited by makedir on 12 Dec 2017, 10:51)

To be honest, it does not look normal to me either, I've never seen it in another router/fw, but that's my first router with Lede firmware, so I have no idea what's normal here. Plus i don't know how to check what's causing the memory increase.
For now I will wait for a fresh new build and hopefully the problem will then be resolved and also bring back my radio0...

What I am trying to explain is that you should not worry about free memory, because Linux has been designed to use as much memory as possible: "unused memory is wasted memory", and given enough time, any well-functioning system will tend to end with near zero free memory.

If your system is low on free memory, because most of it is being used as cache, then your system is working as expected. When the need arises, that cache will be flushed, and more memory will be available for processes. Meanwhile, lots of files are being cached in memory, and your system is faster.

What you should worry about is used memory: if the amount of used memory increases over time without a justification, then there is some process leaking memory; and that is a bad thing. So far, people has only complained about free memory, not used memory.

@eduperez, I just see Total Available, Free and Buffered at the Overview Screen...
Where do i look for used memory ?

htop looks like this: https://imgur.com/6qmzy52

Zorr0x wrote:

@eduperez, I just see Total Available, Free and Buffered at the Overview Screen...
Where do i look for used memory ?

htop looks like this: https://imgur.com/6qmzy52

I think "free" is easier to understand; try it and post the results here, if in doubt.

Well I think i've finally fixed it by installing the old wifi driver...
The WDS driver was causing the constant memory leak as far as i can tell.

I've also fixed my radio0/5ghz problem by adding " option path 'platform/soc/soc.....' " in the wireless config.
But I'm not even sure if I need to add "platform" anymore as i've tested it when the WDS driver was still active. I'll just leave it there for now...

Wasn't a fun experience ! It seems that the WDS driver is buggy in terms of memory consumption. hmm

maybe you should report those findings then here: https://github.com/kaloz/mwlwifi/issues @Zorr0x Maybe you r memory leak comes from the driver tries to restart your radio0/5ghz card all the time and running into a problem? My config just looks like option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0' though.

(Last edited by makedir on 12 Dec 2017, 18:35)

Zorr0x wrote:

Well I think i've finally fixed it by installing the old wifi driver...
The WDS driver was causing the constant memory leak as far as i can tell.

I've also fixed my radio0/5ghz problem by adding " option path 'platform/soc/soc.....' " in the wireless config.
But I'm not even sure if I need to add "platform" anymore as i've tested it when the WDS driver was still active. I'll just leave it there for now...

Wasn't a fun experience ! It seems that the WDS driver is buggy in terms of memory consumption. hmm

Don't see any memory change with the new driver. You should post the issue at the link below so it can be fixed or evaluated.

https://github.com/kaloz/mwlwifi/issues/182

An update to the driver was just released today for testing.

(Last edited by Spamtree on 12 Dec 2017, 19:34)

makedir wrote:

maybe you should report those findings then here: https://github.com/kaloz/mwlwifi/issues @Zorr0x Maybe you r memory leak comes from the driver tries to restart your radio0/5ghz card all the time and running into a problem? My config just looks like option path 'soc/soc:pcie-controller/pci0000:00/0000:00:01.0/0000:01:00.0' though.

The first few days I had WiFi disabled and it happened as well, so I don't think that's the reason.

Regarding the report: At this point i don't know if i'm the only one with this (memory) problem as i don't see anyone reporting it. Maybe it's build specific or related to my config.

@Davidc502, Any reason why irqbalance (1.3.0) isn't integrated in your builds ? Does it not work well or is it even useless ?

makedir wrote:

I dont think a "logread -f >> /mnt/usb/logging.log &" would work in the case of a kernel panic. How would it work if the CPU got stuck or a driver crashes? It cant work. It would mostly just log everything until the kernel panic, and not give any helpful information for the important crash part. Ill give it a try, but I doubt to see anything useful when a crash happens. Would it even log kernel outputs?


99% of the time you will get what you need its just going to depend on why the kernel panic happened.  if its due to lack of space or the usb core panics then perhaps not.  The most reliable method will be a serial printer but thats kind of a pita.

In any case its better than nothing wink

r5501 has just been uploaded to the server. It contains the latest wifi driver commits from earlier today.

From: yuhhaurlin
Added code to support WDS AP for 88W8964
Upgrade 88W8964 firmware to 9.3.2.2
Added code to print out pci device node

The kernel has been bumped to 4.9.67.
There have been other package changes/updates/upgrades since the last build, read about them ->  https://github.com/lede-project/source/commits/master

I've noted in the changelog that odhcpd-ipv6only has been removed from the build as it kept failing to compile and killing the over-all build. I'll be happy to add it back later if someone requests the package. This package appears to be brand new, so there may be some more ironing out to be done with it.

This commit (https://github.com/kaloz/mwlwifi/commit … b4282d41a0) is also included?

davidc502 wrote:

r5501 has just been uploaded to the server. It contains the latest wifi driver commits from earlier today.

From: yuhhaurlin
Added code to support WDS AP for 88W8964
Upgrade 88W8964 firmware to 9.3.2.2
Added code to print out pci device node

The kernel has been bumped to 4.9.67.
There have been other package changes/updates/upgrades since the last build, read about them ->  https://github.com/lede-project/source/commits/master

I've noted in the changelog that odhcpd-ipv6only has been removed from the build as it kept failing to compile and killing the over-all build. I'll be happy to add it back later if someone requests the package. This package appears to be brand new, so there may be some more ironing out to be done with it.

S Pimenta wrote:

This commit (https://github.com/kaloz/mwlwifi/commit … b4282d41a0) is also included?

davidc502 wrote:

r5501 has just been uploaded to the server. It contains the latest wifi driver commits from earlier today.

From: yuhhaurlin
Added code to support WDS AP for 88W8964
Upgrade 88W8964 firmware to 9.3.2.2
Added code to print out pci device node

The kernel has been bumped to 4.9.67.
There have been other package changes/updates/upgrades since the last build, read about them ->  https://github.com/lede-project/source/commits/master

I've noted in the changelog that odhcpd-ipv6only has been removed from the build as it kept failing to compile and killing the over-all build. I'll be happy to add it back later if someone requests the package. This package appears to be brand new, so there may be some more ironing out to be done with it.

No, the commit was pushed shortly after the build was pushed to the server.