Chadster766 / McDebian

Linksys WRT3200ACM, WRT1900AC, WRT1900ACS, WRT1200AC and WRT32X Router Debian Implementation
98 stars 14 forks source link

[Discussion] updates status #45

Closed popoviciri closed 5 years ago

popoviciri commented 6 years ago

Hi Chad, Do you plan a kernel and wifi driver update for McDebian? Latest wifi drivers seem much better than what you used in the last commit. Maybe a better question is: do you still work on this project? Thanks! Regards, radu

Chadster766 commented 6 years ago

Hi @popoviciri

Yes I'm still working on this project.

I've been waiting for the mwlwifi driver and firmware to fix major issues that started after release 10.3.4.0-20170606 which was only completed Feb 26, 2018 (last week).

Also the long term Linux kernel 4.14.x had a rash of bad updates. I could tell this by the kernel development change log have many "revert" comments and compilation of 4.14.x warnings and errors with some modules used. I was also concerned with the kernel beta release of PTI (page table isolation) because it was under active development and was also being fixed with each kernel version release.

My monitoring of the kernel develop seems to indicate the kernel 4.14.24 is a good stable release. I'm going to try this one.

Debian Stretch uses kernel 4.14 and my next release is planned to be Stretch. I've discontinued development of the Jessie version because it's obsolete. Not that current McDebian Jessie and it's kernel aren't an excellent combination but it's time to move on.

Another issue that needed resolving was the WRT models that had different nand like Winbond would fail to boot any open source firmware. Feb 15, 2018 (approx. 2 weeks ago) a DTS file update was released for this issue.

Thanks for creating this discussion it's encouraged me to get developing on a new McDebian release sooner rather than later.

popoviciri commented 6 years ago

This is great news! Thank you very much! I did see the latest mwlwifi driver update, but just a couple of hours ago yuhhaurlin committed 10.3.4.0-20180305. Good to see changes, means bugs are being fixed. Regarding the latest and greatest (kernel 4.14.24 and Winbond nand patches), I hope they'll work without the issues you had previously. Unfortunately I am just an user so I cannot help with compiling and bug chasing. But I can test on my wrt1900ACSv1; let me know if that's of any use. Thanks again! Cheers!

sfrost commented 6 years ago

Hi there!

Just wanted to bump this after 3 months and see if you have any update on getting a stretch-based release done..?

Thanks!

Storagebay commented 6 years ago

Good Point !!!

Its bin a long time now (no offense !)

@Chadster766 I'm following this project for over a year now, i've tried many of your firmwares, and root filesystems. I own a Linksys WRT1900AC V1, if i can help you by testing a new build let me know, time to give something in return !

+1 (for a super project !!!)

Chadster766 commented 6 years ago

Thanks I have been very busy and haven't had time to work on this. I've kind of been waiting for a new long term kernel release because it would have the latest DSA fixes.

I will see if I can get some information together so others can help with development.

Storagebay commented 6 years ago

That 'll be great !!! what i said earlier, i am a huge fan of this project, its super clean and its doing what it is build for. Even for beginners its easy to understand !!!

You are a PRO !!!

Thanx

Op di 19 jun. 2018 om 18:10 schreef Chad McCue notifications@github.com:

Thanks I have been very busy and haven't had time to work on this. I've kind of been waiting for a new long term kernel release because it would have the latest DSA fixes.

I will see if I can get some information together so others can help with development.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Chadster766/McDebian/issues/45#issuecomment-398456075, or mute the thread https://github.com/notifications/unsubscribe-auth/Aifj7jKjSakcfUFn2f8tmiot9kVjcsCfks5t-SJ1gaJpZM4SbQQz .

Chadster766 commented 6 years ago

I've committed the .config I used for kernel 4.14.51 and the WRT dts files.

The firmware and stretch rootfs are uploading to my webserver now. Once done I will post links in this discussion for beta testing and additional development.

Chadster766 commented 6 years ago

Firmware:

wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/firmwares/McDebian-Stretch-Firmwares_4.14.51.tar.gz

Root File System:

wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/rootfs/mcdebian-stretch-router-WRT-1900-1200-3200-Kernel_4_14_51-base.gz

To enable IPv6 in this beta release you need to enable radvd:

systemctl enable radvd

Then uncomment the IPv6 config lines in:

vim /etc/default/isc-dhcp-server

After that reboot the router.

Chadster766 commented 6 years ago

Some issues I've noticed are:

  1. With DSA the network interfaces file is complex and I don't like having to specify locally administrated mac addresses but I did this because interfaces should have unique mac addresses IMO.
  2. The network.service fails after boot but it doesn't seem to effect the operation of the router.
  3. I haven't figured out a way to get AP mode working with DSA.
  4. For the WRT1900AC V1 in my previous 4.9.x and Debian Stretch testing the sensors package worked but not the fancontrol package. I haven't tested this with this upgraded Stretch rootfs. (apt-get upgrade)
  5. I'm not sure if its DSA or Debian Stretch but ifup will fail to bring up some interfaces if the interfaces are not perfectly set as "auto" or "allow-hotplug". Also eth0 and eth1 have to be in the interfaces file but IMO they really shouldn't be an active interface since they are DSA CPU and Programmable Switch ports.
  6. One more thing. If you change something in the interfaces file it could cause over a minute delay in startup with "Waiting for interfaces" or something to that effect.
Chadster766 commented 6 years ago

I've completed more QA and development which resolved some of the issues:

~~1. With DSA the network interfaces file is complex and I don't like having to specify locally administrated mac addresses but I did this because interfaces should have unique mac addresses IMO.

  1. The network.service fails after boot but it doesn't seem to effect the operation of the router.~~
  2. I haven't figured out a way to get AP mode working with DSA.
  3. For the WRT1900AC V1 in my previous 4.9.x and Debian Stretch testing the sensors package worked but not the fancontrol package. I haven't tested this with this upgraded Stretch rootfs. (apt-get upgrade) ~~5. I'm not sure if its DSA or Debian Stretch but ifup will fail to bring up some interfaces if the interfaces are not perfectly set as "auto" or "allow-hotplug". Also eth0 and eth1 have to be in the interfaces file but IMO they really shouldn't be an active interface since they are DSA CPU and Programmable Switch ports.
  4. One more thing. If you change something in the interfaces file it could cause over a minute delay in startup with "Waiting for interfaces" or something to that effect.~~
ValCher1961 commented 6 years ago

Hi @Chadster766! I have encountered the instability of uplifting the WAN interface, I think it is a problem of Debian Stretch. Just like you, I've introduced a delay and re-initialization of the interface.

Chadster766 commented 6 years ago

Hi @ValCher1961,

I implemented ifplugd for wan and some revamped network scripts. They made a big difference in startup. Check them out in my commit last night.

Do know how to get fancontrol to detect the WRT1900AC V1 pmw fan in 4.9.x?

ValCher1961 commented 6 years ago

Yes, I will test at the weekend your ifplug for interfaces.

Oh, I'm sorry, I don't already have wrt1900ac v1, I think you can help @jbsky. He seems to be supporting him.

Chadster766 commented 6 years ago

Ok thanks

Chadster766 commented 6 years ago

I figured out fancontrol with the WRT1900AC V1 and 4.9.x.

The Debian fancontrol package configuration executable /usr/sbin/pwmconfig was looking for an file starting with fan when it's currently starting with temp. The below command resolves the issue and is implemented in the McDebian rootfs.

sed -i s/"fan\[1-9\]"/temp[1-9]/ /usr/sbin/pwmconfig

Also the network startup script now enables and starts fancontrol with a base config if a WRT1900AC V1 is detected.

I will upload the changed rootfs shortly.

Chadster766 commented 6 years ago

I've completed more QA and development which resolved some of the issues:

~~1. With DSA the network interfaces file is complex and I don't like having to specify locally administrated mac addresses but I did this because interfaces should have unique mac addresses IMO.

  1. The network.service fails after boot but it doesn't seem to effect the operation of the router.~~
  2. I haven't figured out a way to get AP mode working with DSA. ~~4. For the WRT1900AC V1 in my previous 4.9.x and Debian Stretch testing the sensors package worked but not the fancontrol package. I haven't tested this with this upgraded Stretch rootfs. (apt-get upgrade)
  3. I'm not sure if its DSA or Debian Stretch but ifup will fail to bring up some interfaces if the interfaces are not perfectly set as "auto" or "allow-hotplug". Also eth0 and eth1 have to be in the interfaces file but IMO they really shouldn't be an active interface since they are DSA CPU and Programmable Switch ports.
  4. One more thing. If you change something in the interfaces file it could cause over a minute delay in startup with "Waiting for interfaces" or something to that effect.~~
Chadster766 commented 6 years ago

With this new release McDebian will now be WRT32X compatible and I've worked out a process to return to stock firmware from McDebian on the WRT32X.

The updated rootfs will complete uploading in approx. 30 minutes.

Chadster766 commented 6 years ago

I've been doing some AP and WAN-LAN throughput testing and DSA seem to max at around 400-500mbps on the WRT1900AC V1. Any one else getting similar results?

Throughput testing on the other WRT router models is much better :-)

Chadster766 commented 6 years ago

I could really use some help with getting an AP configuration together where the WRT is connected to the upstream network via wan interface.

I can't seem to get DHCP working for the wireless clients with all interfaces part of br0 and no iptables rules.

ValCher1961 commented 6 years ago

Hi @Chadster766. I understand correctly that only wireless clients do not receive an IP address?

Chadster766 commented 6 years ago

Good question I forgot to test that.

Chadster766 commented 6 years ago

@ValCher1961 yes it's only the wireless clients that don't get IP Addresses.

Chadster766 commented 6 years ago

The wireless clients DHCP requests are showing up on the Main router and DHCP offers are being sent but the wireless clients are not getting the offers.

Chadster766 commented 6 years ago

I figured it out. The bridge interface in an AP mode will have the same MAC Address as one of the wireless interfaces. Once I change the network load script to put the Linksys supplied MAC Address to br0 it came to life and how :smiley:

For testing I had the main router pinging the test wireless client connected to the AP. I switched from the 5Ghz to the 2.4Ghz and then to the main router 5Ghz and didn't drop a ping :astonished:

That is amazing!

iface wan inet manual
        #up /etc/network/mcdebian-set-wan-mac-address
        #up iptables-restore < /etc/iptables.up.rules

iface wan inet6 manual
        #pre-up ip6tables-restore < /etc/ip6tables.up.rules

auto br0
iface br0 inet static
        bridge_ports lan1 lan2 lan3 lan4 wan
        address 192.168.200.13
        netmask 255.255.255.0
        gateway 192.168.200.1
        network 192.168.200.0
        broadcast 192.168.200.255
        up /etc/network/mcdebian-wait-for-dsa-interfaces
        up /etc/network/mcdebian-set-br0-mac-address
        post-up /etc/network/mcdebian-wrt1900acV1-wrt3200-wlan
Chadster766 commented 6 years ago

I've completed QA and development for McDebina 4.9.51 but maybe I should update to 4.9.52 before I release a new version. What do you think?

~~1. With DSA the network interfaces file is complex and I don't like having to specify locally administrated mac addresses but I did this because interfaces should have unique mac addresses IMO.

  1. The network.service fails after boot but it doesn't seem to effect the operation of the router.
  2. I haven't figured out a way to get AP mode working with DSA.
  3. For the WRT1900AC V1 in my previous 4.9.x and Debian Stretch testing the sensors package worked but not the fancontrol package. I haven't tested this with this upgraded Stretch rootfs. (apt-get upgrade)
  4. I'm not sure if its DSA or Debian Stretch but ifup will fail to bring up some interfaces if the interfaces are not perfectly set as "auto" or "allow-hotplug". Also eth0 and eth1 have to be in the interfaces file but IMO they really shouldn't be an active interface since they are DSA CPU and Programmable Switch ports.
  5. One more thing. If you change something in the interfaces file it could cause over a minute delay in startup with "Waiting for interfaces" or something to that effect.~~
Chadster766 commented 6 years ago

I did more QA and discovered that assigning the MAC Address from the devinfo to different interfaces was causing intermittent arp issues. I will have to revamp and do more testing before I release this but it shouldn't be long now.

ValCher1961 commented 6 years ago

I think the big difference between releases 4.14.51 and 4.14.52 No, but the new is always better than the previous one.

About the inclusion of the WAN in the bridge I do not understand, explain.

Chadster766 commented 6 years ago

I typically use the WAN connection when I configure a McDebian WRT as an AP. It may not be necessary but I like to have all the ports operational.

ValCher1961 commented 6 years ago

Oh, now I get it, it's just for tweaking.

popoviciri commented 6 years ago

Just installed this today on my wrt1900acsv1, booting from an esata ssd (sda1: rootfs, sda2: swp, sda3: data). I also have a 4 TB drive hooked on the usb3 port and transfers are around 80MB. First of all, it works GREAT! Thank you!

Chadster766 commented 6 years ago

I don't think you are missing any code because the rootfs has everything I was working on at the time.

The wan is related to the DSA issues I was mentioning. I'm hopping others can come up with some config\scripts that can help to make this work smoother.

Chadster766 commented 6 years ago

I discovered that adding "MAC80211_MESH" to the kernel will cause a kernel panic on the WRT3200ACM that I have not come up with a repair for other than reload firmware via USB to TTL. :cold_sweat:

ValCher1961 commented 6 years ago

I have CONFIG_MAC80211_MESH=y installed and everything is working.

Chadster766 commented 6 years ago

@ValCher1961 is it installed on the WRT3200ACM?

I've been testing with kernel 4.17.3.

Chadster766 commented 6 years ago

I added it to the kernel only is there a module that goes along with it? Maybe I should have rebuilt the modules too.

ValCher1961 commented 6 years ago

I have not tried compiling the kernels above 4.14.X.

Chadster766 commented 6 years ago

Ok I will enable CONFIG_MAC80211_MESH in the 4.17.3 kernel, rebuild the modules and retest.

Chadster766 commented 6 years ago

In the meantime it would be great if some users could evaluate McDebian 4.17.3 beta. IMO it handles USB 3.0, DSA interfaces and IP better than 4.14.51.

Firmware:

wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/firmwares/McDebian-Stretch-Firmwares_4.17.3.tar.gz

Root File System:

wget --user=mcdebian --password=mcdebian123 http://www.protechs-online.com/downloads/McDebian/rootfs/mcdebian-stretch-router-WRT-1900-1200-3200-Kernel_4_17_3-base.gz
Chadster766 commented 6 years ago

I discovered that enabling CONFIG_MAC80211_MESH in the kernel causes almost all networking modules to be rebuilt which means an module update will be required in the rootfs. Once I've tested this feature more I will post a new firmware and rootfs that includes it.

Chadster766 commented 6 years ago

@ValCher1961 I've done testing with MESH but I can't bring up a mesh interfaces:

iw dev wlp2s0 interface add mesh0 type mp mesh_id MYMESHID
iw dev mesh0 set channel 4
ifconfig wlp2s0 down
ifconfig mesh0 up
Chadster766 commented 6 years ago

I get the below error:

root@MCDEBIAN:~# ifconfig mesh0 up
SIOCSIFFLAGS: Operation not permitted
ValCher1961 commented 6 years ago

@Chadster766, I haven't explored mesh yet, but I'm very interested in it. Your examples give me the same output results. I will investigate this feature.

Chadster766 commented 6 years ago

Does anyone else see the below hostapd warnings with the latest mwlwifi updates:

Nov 03 17:17:01 MCDEBIAN kernel: netlink: 'hostapd': attribute type 213 has an invalid length.
Nov 03 17:17:02 MCDEBIAN hostapd[3558]: Starting advanced IEEE 802.11 management: hostapd.
Nov 03 17:17:02 MCDEBIAN kernel: netlink: 'hostapd': attribute type 213 has an invalid length.
Chadster766 commented 6 years ago

Or this:

Nov 03 17:16:42 MCDEBIAN kernel: platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
Nov 03 17:16:43 MCDEBIAN kernel: cfg80211: failed to load regulatory.db
ValCher1961 commented 6 years ago

In my assembly everything is clean.

ValCher1961 commented 6 years ago

It seems the answer is here - https://webcache.googleusercontent.com/search?q=cache:9x9R3Aufb9kJ:https://github.com/kaloz/mwlwifi/commit/master%3Fdiff%3Dsplit+&cd=6&hl=ru&ct=clnk&gl=ru @Chadster766 , Do you see this link?

Chadster766 commented 6 years ago

Yes, I've read those commit comments but they don't make much sense to me.