<dansan>
Hello! Has there been any investigation, talk or work on a KConfig feature (either in OpenWRT or elsewhere) to differentiate because manual and automatic selection?
<brpr>
Hey all. I've been digging through DTSes and can't wrap my head around how I can get the needed info for "eeprom". The MAC addresses are on the ubi partition "factory".
<PaulFertser>
brpr: hey
<PaulFertser>
brpr: I think you can't get it from a ubi volume from kernelspace, you need to make it in a script.
danitool has quit [Quit: Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos]
<PaulFertser>
brpr: for MACs see target/linux/ath79/nand/base-files/etc/board.d/02_network netgear,wndr3700-v4 section , mtd_get_mac_binary , probably also nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
<PaulFertser>
brpr: and for wifi calibration data nand/base-files/etc/hotplug.d/firmware/*
<brpr>
Alright. So I get MACs from "factory" and I suppose calibration data from "caldata"? caldata isn't an ubi volume.
<rsalvaterra>
As owner of an Armada 385-based device, having to keep local hacks just to be able to fully use my hardware, well… sucks.
rsalvaterra_ has joined #openwrt-devel
rsalvaterra has quit [Ping timeout: 480 seconds]
rsalvaterra_ has quit [Quit: Leaving]
rejoicetreat has quit [Remote host closed the connection]
rejoicetreat has joined #openwrt-devel
goliath has joined #openwrt-devel
<brpr>
PaulFertser, WE HAVE 2.4 GHz WIFI! but the 5GHz driver still fails to load.
Rentong has joined #openwrt-devel
<brpr>
PaulFertser, would you like the dmesg? The 5Ghz driver still spits out the same error
<brpr>
[ 12.207467] ath10k_pci 0000:00:00.0: failed to run otp: -22 (download-cal-data)
danitool has joined #openwrt-devel
<PaulFertser>
brpr: did you add the right script for 5 GHz caldata extraction?
Rentong has quit [Ping timeout: 480 seconds]
hitech95 has joined #openwrt-devel
<Pepes>
Guys, I am missing this commit https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=025bd93f36c9923127674ce127e22933592cba6c for OpenWrt 19.07 to fix FragAttacks vulnerability. I also take a look at LTS kernels, I can see that this was fixed in kernel 5.4, but it was not backported to 4.19 (mac80211)
<hitech95>
nbd, ping. I have a couple of questions about the mtk PPE and flow offload...
<brpr>
PaulFertser, I'm yet to.
\x has quit [Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in]
\x has joined #openwrt-devel
<brpr>
PaulFertser, you have said before that I'd only need scripts for MAC addresses.
<PaulFertser>
brpr: I was wrong, since then I checked and told you mtd-cal-data is only implemented for ath9k.
<brpr>
Alright. Where should I look for a template script?
<PaulFertser>
09:55 < PaulFertser> brpr: and for wifi calibration data nand/base-files/etc/hotplug.d/firmware/*
<PaulFertser>
brpr: not "cal" but "caldata". I also suggest to rename the label in the DTS file the next time you compile so that you avoid this particular mismatch.
<brpr>
Alright.
<brpr>
Compiling.
<brpr>
PaulFertser, 5GHz works now!
<PaulFertser>
brpr: :)
<brpr>
And all Ethernet ports work!
<brpr>
And all Ethernet ports work!
<brpr>
oops
<brpr>
sorry, client bugged out
<brpr>
So now PaulFertser: The only broken thing is the reset button. How would I implement that?
<brpr>
Oh and MAC addresses.
<PaulFertser>
brpr: do "cat /sys/kernel/debug/gpio" , then press the button and while holding it, cat again and see what changed.
<brpr>
I have the GPIOs for all of the buttons and LEDs
<PaulFertser>
09:54 < PaulFertser> brpr: for MACs see target/linux/ath79/nand/base-files/etc/board.d/02_network netgear,wndr3700-v4 section , mtd_get_mac_binary , probably also nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
<PaulFertser>
brpr: then define the reset button as the other boards do, name it "reset", should work.
<brpr>
alright.
<brpr>
PaulFertser, I'm looking at the section but how do I get the 0x6 part of the MAC setup? hexdump?
<PaulFertser>
brpr: yes
<brpr>
Also how would I resolve the 04 thing?
<brpr>
And of course the MAC is on an UBI partition.
<PaulFertser>
brpr: by adding 4 I guess
<hauke>
Pepes: mac80211 was updated in 19.07.8 to a version which includes this chnage
<brpr>
PaulFertser, Alright, the thing concerning me is the ubi partition thing.
<PaulFertser>
brpr: I think script will be reading from ubi partition all right, you see it in /proc/mtd after OpenWrt as any other partition, right?
<brpr>
I... don't
<brpr>
I only see bootloader, ubi and caldata.
<brpr>
I can read the MACs from /dev/ubi0_1
<hauke>
mangix: I would just keep gdb without arc support. I think no one here is able to test on arc if it actually works and it looks like synopsys does not care any more
<hauke>
I do not think they will get many new customers for arc with Linux anyway because RISC V cores are probably similar expensive and better supported
<hauke>
I am only aware of Quantenna using arc with Linux
<brpr>
PaulFertser, nevermind! Now I can't seem to get ANY MAC addresses from any ubi partition!
arifre has quit [Quit: Page closed]
<brpr>
PaulFertser, nevermind again lol, I now get the mac address. I've been typing it wrong :P
arifre has joined #openwrt-devel
<brpr>
PaulFertser, so in the script, I replace caldata with /dev/ubi0_2?
<PaulFertser>
brpr: no, use mtd_get_mac_binary_ubi
<brpr>
PaulFertser, Hmm, I've been hexdumping the factory partition, not the whole ubi one. Do I need to?
<PaulFertser>
brpr: no, mtd_get_mac_binary_ubi accepts a ubi volume name as the first argument.
<brpr>
PaulFertser, I don't know what's going on with wlan0. It has a very weird mac address. 00 03 f7 00 00 00. wlan1 has the 00 02 03 04 crap that I've said before.
rua has joined #openwrt-devel
<PaulFertser>
brpr: where are you running it?
<PaulFertser>
brpr: on target?
<brpr>
yes
Rentong has quit [Ping timeout: 480 seconds]
clef_ has quit [Ping timeout: 480 seconds]
<brpr>
PaulFertser, that actually kinda fooled me because the real MAC starts with 30 :P
<PaulFertser>
brpr: ok, now "export FIRMWARE=ath10k/cal-pci-0000:00:00.0.bin; rm /lib/firmware/$FIRMWARE" and rerun with sh -x
<brpr>
PaulFertser, sadly it still doesn't show the right MAC
<PaulFertser>
brpr: rm
<PaulFertser>
And retry
<brpr>
so it did a dd command now
<brpr>
two of them
<PaulFertser>
brpr: you won't see the right address in "ip" now, you can just verify that the mac was read correctly in the trace output. Then you change the script and enjoy it the next time you run.
<PaulFertser>
I mean the next time you assemble the full image.
<brpr>
PaulFertser, IT DID!
<brpr>
We have a read!
<brpr>
Right - changing in both of the files
<brpr>
10-ath9k looks a lot different.
<brpr>
It doesn't have any commands with mac in it, only caldata
<brpr>
PaulFertser, hint please :D
<PaulFertser>
brpr: I see ath9k_patch_mac mentioned
<PaulFertser>
brpr: does vendor firmware use same mac for both cards?
<brpr>
I'll have to reboot, wait a second.
<PaulFertser>
brpr: write down all addresses it uses, for wlan0, for wlan1, for lan and for wan. You should eventually collect 4 addresses.
<brpr>
Weird thing is that it has eth0 and eth1
<brpr>
and ath0 and 1
<brpr>
PaulFertser, wifi0 and wifi1 (real names of interfaces) I can accept because 2.4 and 5GHz but for eth and ath?!
shibboleth has joined #openwrt-devel
<PaulFertser>
brpr: ath0 is qca proprietary wifi driver
<brpr>
PaulFertser, why does it have two eths though
<PaulFertser>
brpr: for wan and for lan?
<brpr>
one with the MAC ending with 0 and one with it ending in 4
<brpr>
yeah that would make sense
<brpr>
Alright, I have 4 addresses. Of course actually 2 as they repeat
clef has quit [Quit: Leaving...]
<brpr>
PaulFertser, sadly the address ending in 4 doesn't show up in Factory
<brpr>
PaulFertser, how would I tell which interface is 5G and which one is 2.4?
<brpr>
5G as in 5GHz
<PaulFertser>
brpr: you can just assume it's the Factory address +4
<brpr>
alright.
<PaulFertser>
brpr: hm, probably iwconfig can help there
<PaulFertser>
No idea about the proprietary driver
<brpr>
If wireless works in OpenWRT it works :P
<brpr>
(with an open source driver obviously)
<brpr>
PaulFertser, the 5G MAC is the +4 one. How would I accomplish that?
<brpr>
In the script
<PaulFertser>
brpr: my point is that you're now booted to vendor's qca code. And to tell if ath0 is on 2.4 GHz you might use iwconfig, not sure.
rua has quit [Ping timeout: 480 seconds]
<PaulFertser>
brpr: use macaddr_add shell function
<brpr>
PaulFertser, ath0 is 2.4 and ath1 is 5ghz
<brpr>
PaulFertser, so like macaddr_add "$mac" 1 if mac is a variable containing the factory mac?
<PaulFertser>
brpr: yes
<brpr>
obviously instead of 1 there'd be 4
<PaulFertser>
brpr: what about the wired interfaces, what addresses are they using?
<brpr>
eth0 uses the 0 MAC
<brpr>
eth1 uses the 4 MAC
<PaulFertser>
brpr: and athX do the same?
<brpr>
yes, ath0 uses the 0 mac and ath1 the 4 mac\
<brpr>
except for the end number, the same
<PaulFertser>
I mean eth0 and ath0 use identical MAC, right?
<brpr>
PaulFertser, yes.
<PaulFertser>
brpr: ok
rua has joined #openwrt-devel
danitool has joined #openwrt-devel
<brpr>
PaulFertser, I have done wireless MACs. How would I do wired?
<PaulFertser>
brpr: you should first get the interfaces working
<brpr>
alright
<brpr>
dts?
<PaulFertser>
brpr: and macs you'll see how to do in 02_network
<PaulFertser>
brpr: yes
<shibboleth>
anyone care to try and build an ipq806x (preferably c2600) image from master and verify if this breaks network connectivity?
<shibboleth>
tftp recovery will still work, no need to disassemble for recovery
minimal has joined #openwrt-devel
<brpr>
PaulFertser, can't wrap my head around Ethernet. Have been doing research on other DTSes and still don't know.
<PaulFertser>
brpr: you said it worked before with zyxel image?
<brpr>
PaulFertser, at least to some extent, I could connect to it
<PaulFertser>
brpr: so it must be that zyxel dts (or the dtsi it included) had proper eth sections and now your own dts doesn't.
Rentong has joined #openwrt-devel
<brpr>
I'm going to bed, will be continuing tomorrow.
<brpr>
Bye
brpr has quit [Quit: Leaving]
rua has quit [Ping timeout: 480 seconds]
Rentong has quit [Ping timeout: 480 seconds]
<rsalvaterra>
dangole: Is there anything specific to ath9k in hostapd?
<dangole>
rsalvaterra: no, that's just the mac80211 driver, nothing more than that.
<mangix>
shibboleth: sounds like a side effect of the NVMEM updates
<mangix>
There's a DSA PR that should work.
<rsalvaterra>
mangix: True… but they also have their own OS, which isn't vanilla OpenWrt (and the reason I hate it).
<mangix>
Their OS is very close to uostream
<mangix>
Except for TOS 3
<shibboleth>
sure, but hopefully this can be fixed without forcing users onto dsa?
<mangix>
DSA is the future
<mangix>
Note that this is openwrt-devel
Rentong has joined #openwrt-devel
<rsalvaterra>
Me and stintel will only love DSA when it supports multiple CPU ports connected to a switch. :P
<rsalvaterra>
Right now, my Omnia has a dangling eth0. Not cool.
<shibboleth>
well, having ipq806x broken on master can't be a desirable status quo?
<rsalvaterra>
shibboleth: Master can break from time to time. It's not desirable, but it happens. People will get around to it, eventually.
Rentong has quit [Ping timeout: 480 seconds]
<shibboleth>
i get that, but we're apparently talking about a month here :)
<stintel>
git bisect it so the breaking commit can be reverted
<slh>
shibboleth: chances are also that it 'just' affects the c2600 and not the r7800/ nbg6817/ g10/ ea8500 (because the r7800 was presumably tested, and nbg6817, g10 and ea8500 use a different approach to read out and set the MAC addresses (fetched from ubootenv or similar as ASCII, not in an nvmem compatible way)
<stintel>
if you run master you should be willing to get your hands dirty
<stintel>
I don't have the device so I can't do it for you
<rsalvaterra>
This ^
<shibboleth>
i've tested both c2600 and ad7200
<slh>
yes, but those two are very similar to each other - but different to the other mentioned devices (and ansuel can only test the r7800)
<rsalvaterra>
stintel: I see you changed your mind and created a new qoriq target, nice. ;)
<stintel>
rsalvaterra: oh few weeks already. if I had done that I would have never hit the thread_shift problem and probably would have been using the device for 6 months already
<stintel>
if I had done that from the beginning*
<stintel>
I should probably further debug those dropped packet in the stats
<rsalvaterra>
Yeah, ppc64 is a different beast. :)
<mangix>
rsalvaterra: Ansuel ported the Turris patch in his DSA PR.
<rsalvaterra>
Turris parch? For multiple CPU ports?
<rsalvaterra>
*patch
<slh>
yes
<slh>
running it here on ipq806x (nbg6817 and g10)
<rsalvaterra>
Wait, has it been accepted upstream?
<rsalvaterra>
Thought so. So, no consensus yet. Sigh…
rua has quit [Ping timeout: 480 seconds]
<slh>
sadly, yes
<mangix>
Just carry it locally
<stintel>
I should probably give that thing a try too
<stintel>
or maybe first finalize qoriq and send it for review
<stintel>
I seem to be having a problem with finishing things :(
<rsalvaterra>
stintel: I can relate. :P
<rsalvaterra>
mangix: To be honest, the patch is useless to me. I have an external switch connected to my Omnia's lan4, and all my devices connect to the switch.
<mangix>
Strange setup
<rsalvaterra>
Come to think of it, I had already seen the patch and thought "meh", at the time. Oh, well.
shibboleth has quit [Quit: shibboleth]
<rsalvaterra>
mangix: Well, not *all* devices. The wan of the Omnia is connected to the internet, of course.
<mangix>
Right. Seems a waste not to use the built-in switch though.
rua has joined #openwrt-devel
<rsalvaterra>
mangix: Not enough ports… :)
<rsalvaterra>
But I agree it's a bit wasteful, yes.
<mangix>
Friend I have uses both the ports on his router and external switch.
<mangix>
I assume your switch is 24 port. His is 9 :P
<mangix>
*8
<rsalvaterra>
mangix: That implies a bottleneck between the devices on the external switch and the devices on the Omnia's switch. :/
<rsalvaterra>
Actually, my switch is also 8-port.
<mangix>
Maybe. No idea how big it would be.
<stintel>
pfff don't mention switchports. with the extra testing hardware I ran out
<mangix>
Lol
<rsalvaterra>
…
<slh>
I'm getting nervous whenever I have more that ~half to 2/3 of my switch ports in use (especially with managed switches, where you can go more crazy in terms of assigning VLANs)
<stintel>
<mangix>
Sadly I'm starting to value wifi over Ethernet
<rsalvaterra>
stintel: You should post photos of your setup, somewhere. :P
<stintel>
heh
<rsalvaterra>
mangix: Wi-Fi is useful and nice to have, but nothing beats a guided medium to get sh*t done.
<slh>
fortunately/ sadly I've gone a little crazy in terms of switches recently, rtl8382 based gs1900-24e, gs1900-24 and dgs-1210-16g1 - one more than I really wanted to buy, but I just couldn't let the gs1900-24 pass for the money
<mangix>
rsalvaterra: sure but wires are annoying. :)
<mangix>
Wonder how to use a MAC address specified in uboot-env
<slh>
mangix: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ipq806x/base-files/etc/board.d/02_network;hb=HEAD#l81 (nbg6817), ansuel had some idea to use nvmem for that as well, but he hasn't come back with an approach for that, yet
<rsalvaterra>
mangix: Eww, what device from hell specifies the MAC address that way?
<slh>
quite a few do
<mangix>
CyberTAN (OEM) is notorious for this
<rsalvaterra>
I was afraid of that answer. :P
<slh>
rsalvaterra: in the ipq806x target at least: ASRock G10, Linksys EA7500v1/ EA8500, ZyXEL NBG6817
<rsalvaterra>
Is the uboot-env also writeable?
<slh>
depends on who did the porting and the device in question, often, yes
<rsalvaterra>
What could possibly go wrong? :P
<rsalvaterra>
Well, probably the reference MAC address is also written in a sticker somewhere…
<hurricos>
@stintel: Any updates on the Firebox m300? Alternatively, do you presently have a box in mind that would work well for a main firewall?
<slh>
e.g. Linksys stores the active (boot-) partition in uboot-env, so there it must be writable. the g10 and nbg6817 don't need to have it writable
<stintel>
hurricos: the M300 is my main firewall :)
<stintel>
mangix: you don't want to see how many wires I have here :D
<rsalvaterra>
stintel: I still want AltiVec accelerated crypto for WireGuard… :P
<hurricos>
stintel: I seem to remember it is ... yes, thanks rsalvaterra, powerpc. But not mpc85xx, where is it?
<hurricos>
OK. Gotcha. I have a building I may very soon be completely rip-and-replacing the networking in, and I'm considering a Firebox
<hurricos>
Currently has a Ubiquiti EdgeRouter Pro and it's ....
<stintel>
I have some quirks to figure out, but all ethernet ports are working, 0-2 real, 3-7 DSA
<hurricos>
Nice. OK ...
<hurricos>
Well, probably not in time. I may opt to just work with a smaller device as the main firewall and do everything else with VLANs, but I find that turns ugly and makes change / structure hard to communicate.
<hurricos>
(if you only have 4 ethernet ports ;( ...)
<stintel>
let's see ...
<hurricos>
I look at the FireBox and see a fairly powerful multicore machine and I grin, of course.
<slh>
hurricos: you be awayre that the m300 is effectively a small rackserver, so 3 small fans spnning at 6000-11000 rpm
<hurricos>
Yes, sure. I have an R510 in the same rack.
<hurricos>
slh: Thanks :^)
<rsalvaterra>
slh: Ouch. That's a big no-no for me. :(
<hurricos>
> 75 watts max -- ouch
<slh>
rsalvaterra: one in the back of the 1U case, two in the PSU (and at least those are unavoidable)
<hurricos>
See, I would convert the EdgeRouter pro, but unfortunately it is not mine.
<hurricos>
it's also Cavium, rrg. Rats!
<stintel>
still have a bad taste of cavium in your mouth yes ? :D
<hurricos>
why is there no way to smack a 24-port switch onto x86 over XAUI?
<hurricos>
yes, very much so ... to be realistic, I just know there's not much support
<hurricos>
I don't want my building to suddenly not have internet. I do have half a mind to keep the EdgeRouter there but the change in the building present a perfect opportunity to rip and replace and it's been nearly a decade since that was last done
<slh>
depending on the number of clients and WAN speed (1 GBit/s symmetric), it may be sensible to just get a low-end core i5/ low-end ryzen with a couple of ethernet cards and a good/ big managed switch and call it a day
<hurricos>
slh: I had that exact thought in mind, tbh. It's presently just 150Mbit/s and it will likely be 1GBit/s within a year, at most.
<slh>
that can be rather low-noise/ low power consumption
<stintel>
I have a Zero W in my power cabinet that polls the SDM630 Modbus power meter, a Zero W with motion, and a camera aimed on my front door, another Zero W with a motion sensor that drives my welcome light, one in the bedroom with PM sensor, and a 5th one for testing (e.g. this will be used to test the 5.10 kernel first)
<stintel>
a 3A+ here close to LBSF for ADS-B capturing and feeding to flightaware, a 3B+ doing the same at my parents' place close to EBBR
<Habbie>
my PM sensors are on ESP8266 or ESP32
<stintel>
yeah I have a few of those too
<stintel>
have even 2 ESP32-C3 (RISC-V model) doing that
<Habbie>
ah, i have 2 C3 but I haven't tried them yet :)
<stintel>
I have 20 :D
<stintel>
went a bit nuts
<Habbie>
they came in last week
<Habbie>
lol
<stintel>
and they will probably all be donated once the WiFi6 model is out
<stintel>
to continue the RPi story, a Pi 4 with Lora/GPS HAT used as stratum 0 NTP server here
<stintel>
and finally a Pi 4 at my parents place that one day should be running Pi-KVM
<stintel>
so that's 9, not 10
* mangix
still needs to get this wifi 6 router in shape to run OpenWrt
<Habbie>
stintel, wifi6 esp is coming?
<stintel>
Habbie: yeeees
<stintel>
2.4 only iirc, but still
<Habbie>
i knew about the matter/zigbee one
<stintel>
ESP32-C6
<Habbie>
nice
<stintel>
yeah
<stintel>
the let's be nice to the spectrum features are definitely worth it imo
<Habbie>
yeah that's the point - low rate wifi devices take up so much spectrum time
<stintel>
> This in practice means that every EU member state must update their national frequency allocation plans to reflect the 6 GHz decision before December 1, 2021, sources say.
<stintel>
santa will come early :D
<Habbie>
haha
<Habbie>
6ghz - now your walls must be even thinner :D
<stintel>
this is Bulgaria, no problem :D
<Habbie>
you're in Bulgaria?
<stintel>
yes
<stintel>
EU's tax haven ;)
<Habbie>
lol
<stintel>
I used to be in Belgium. went from >50% income tax to 10-15%
<stintel>
as an added bonus I have 1000/600 for EUR 16 per month or so
<Habbie>
neat
<stintel>
only no native v6 :(
<Habbie>
i got native v6 a few weeks ago and it totally broke down behind the stock openwrt box :D
<stintel>
I do have a HA router setup, with each router a tunnel to a different endpoint but with the same /60 announced via BGP, which is kind of cool, but still tunneled :(