tidalf_ has quit [Read error: Connection reset by peer]
tidalf has joined #openwrt-devel
tidalf__ has quit [Ping timeout: 480 seconds]
tidalf_ has joined #openwrt-devel
danitool has joined #openwrt-devel
tidalf has quit [Ping timeout: 480 seconds]
<aparcar[m]>
rmilecki: thank you
rua has quit [Quit: Leaving.]
rua has joined #openwrt-devel
robimarko has joined #openwrt-devel
raenye has joined #openwrt-devel
<raenye>
So I have OpenWRT running on DAP-1620-B1 (mt7621/mt7615dn)
<raenye>
ethernet, leds, buttons are fine, also rssileds
rua has quit [Quit: Leaving.]
<raenye>
wireless is OK after manual DBDC intervention, but this seems wrong
<raenye>
and even after editing /etc/config/wireless, phy0 calls itself 802.11ac/b/g/n
<raenye>
any m7615 experts here?
<raenye>
I built it based on 22.03.3; I'll see if .4 brings any changes
<PaulFertser>
raenye: you can always check "iw list" to see what kernel drivers thinks about each phy. And if that's wrong, then you need to change something in kernel, not in /etc/config/wireless.
<PaulFertser>
raenye: usually new boards should be made to work on the tip of the master branch, then you upstream the support and then probably the patch if it's trivial enough can be backported to a release branch. That's the usual process.
<raenye>
PaulFertser: thanks, I'm new to openwrt development
<PaulFertser>
raenye: welcome, hope you enjoy it
<raenye>
I should do more testing, but at least connecting to 5g works
<PaulFertser>
raenye: usually the best way is to see how a similar board was added.
robimarko has quit [Quit: Leaving]
<raenye>
that's how I got the rssi leds working (DTS quirk from DAP-X1860)
<PaulFertser>
raenye: if /etc/config/wireless is absent on startup then the scripts basically parse "iw list" output and create a suitable default config.
<raenye>
PaulFertser: but it doesn't
<raenye>
PaulFertser: it assigns channel 36 to both phys
dangole has joined #openwrt-devel
<PaulFertser>
raenye: hm, isn't channel auto is specified when the config is created?
<raenye>
PaulFertser: I couldn't find anything specific to DBDC in other devices' commits
<PaulFertser>
raenye: you can always just delete the config and run "wifi config" manually and cross-check the generated file with "iw list" ("iw phy") output.
<raenye>
PaulFertser: wifi config does it wrong
<PaulFertser>
raenye: yeah, from userspace point of view DBDC is the same as having two wireless cards.
<raenye>
PaulFertser: but to "split" radio0 I need to down it and echo 1 to kernel debug mt76 dbdc something
<raenye>
that's what I'm trying to avoid
<PaulFertser>
raenye: that shouldn't be needed, no.
<raenye>
PaulFertser: I want it to work correctly after factory reset, which it currently doesn't
<PaulFertser>
raenye: probably your calibration data ("eeprom"/"factory" partition etc) isn't properly used?
<raenye>
PaulFertser: but after manually doing it, radio1 works fine
<PaulFertser>
raenye: I'm surprised you're not using some pastebin to show full dmesg and "iw list" output after first boot.
<raenye>
PaulFertser: you mean paste the link here?
<PaulFertser>
raenye: yes
<PaulFertser>
raenye: so that we would be discussing something specific rather than abstract
<raenye>
I'm not sure what needs to be sanitized (MACs?)
<raenye>
let me grab some relevant info
raenye has quit [Remote host closed the connection]
<raenye>
PaulFertser: is this what you meant? sorry for not following "standard procedure", again this is my first attempt
AtomiclyCursed has quit [Quit: ZNC 1.8.2 - https://znc.in]
AtomiclyCursed has joined #openwrt-devel
goliath has joined #openwrt-devel
<PaulFertser>
raenye: no problem, I'm always glad to see people learning
AtomiclyCursed has quit []
<PaulFertser>
raenye: so basically initially you see what looks like a single dual-band device, and then after the debugfs trick you see one dual-band and one 5 GHz device, right?
<raenye>
PaulFertser: yes
<raenye>
I'll try to connect to the radio0 ap to see if it works
AtomiclyCursed has joined #openwrt-devel
<raenye>
PaulFertser: yes, I can access luci via radio0 too
<raenye>
PaulFertser: I tried to rebase to master, but had trouble with files I did not touch
<PaulFertser>
raenye: what exactly your trick is?
<PaulFertser>
raenye: rebasing a single commit with the files you didn't touch can't lead to conflicts, as rebasing is basically git format-patch followed by git am.
<raenye>
wifi down; echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/dbdc; wifi up
<raenye>
PaulFertser: that's what I thought
<raenye>
but maybe it's easier to take a diff, start a new branch, and apply it
<olmari>
if you didn't do much modifications with your current setup, I'd "nuke everything" and pull current git head and try again, as this is nonetheless an requirement pretty much
<PaulFertser>
raenye: ok, I checked the sources and it very much looks like you're not providing mt76 driver with the right "eeprom" contents, it fails to enable DBDC in mt7615_eeprom_parse_hw_band_cap() function.
<PaulFertser>
Hm, looks like "eeprom" is supposed to come from "efuse".
<PaulFertser>
raenye: why are you sure it's a MT7615D device?
<PaulFertser>
raenye: are you sure your specification of mediatek,mtd-eeprom is correct?
<PaulFertser>
raenye: I'd expect the right eeprom data to start with 15 76, do you see that in hexdump?
<raenye>
I rebased manually, building now on master
<PaulFertser>
raenye: check hexdump before trying a new build, chances are you got the wrong offset currently.
<PaulFertser>
For mediatek,mtd-eeprom
<raenye>
here is my dts:https://pastebin.com/ugX38ZKi
<raenye>
hexdump from where?
<PaulFertser>
raenye: from wherever you expect "eeprom" to be.
<PaulFertser>
raenye: please pastebin full vendor's bootlog too for the reference
<raenye>
it's from serial, I didn't get telnet/ssh access
<raenye>
quite possible that dlink messed it up in the first place, no?
Acinonyx has joined #openwrt-devel
<raenye>
original firmware is buggy as h*ll
Daanct12 has joined #openwrt-devel
<PaulFertser>
raenye: your vendor log shows isDBDC=0
<PaulFertser>
raenye: mt76 driver reads that 3e byte to decide if dbdc should be enabled or not. You later force it by debugfs and if it works it means the factory calibration data can't be trusted which is bad.
tidalf_ has quit [Ping timeout: 480 seconds]
<raenye>
I see
<PaulFertser>
And the second band is just invalid according to vendor's log, wtf...
<PaulFertser>
raenye: probably this AP is really 5 GHz 2x2 only?
<raenye>
nope, it's AC1300
<raenye>
400 2.4 (2x2) and 866 5 (2x2)
<raenye>
patching eeprom sounds like a possibility, but maybe it's better if this can be done in an overlay fashion
Acinonyx_ has quit [Ping timeout: 480 seconds]
<PaulFertser>
raenye: if you force dbdc with debugfs, then remove /etc/config/wireless, then run "wifi config", is it relatively sane? Guess not, as it thinks that one phy is dual-band.
<raenye>
no, it is not
<raenye>
it sets channel 36 on both
<PaulFertser>
But if you specify the right channel manually for the 2.4 GHz-capable phy, what happens?
Daaanct12 has quit [Ping timeout: 480 seconds]
<raenye>
I can connect to it fine
<raenye>
but it still shows dual-banded
<raenye>
e.g. iwinfo says "Type: nl80211 HW Mode(s): 802.11ac/b/g/n"
<raenye>
and I can only get HT20 and not HT40
tidalf_ has joined #openwrt-devel
<PaulFertser>
raenye: right, and I do not see a way to override that with debugfs.
<raenye>
I need to set band to 2g manually for it to work at all
<PaulFertser>
raenye: hm, that's the first time I hear about vendor doing stupid shit like that.
<PaulFertser>
raenye: changing that 0x00 to 0x30 seems to be the sanest way...
<raenye>
you won't be surprised to find the original firmware resets encryption to "none" upon power cycle
<PaulFertser>
:D
<PaulFertser>
Well, that's still kind of surprising I have to admit!
<PaulFertser>
As it's like basic functionality that is sure to be noticed by the end users, and would lead to a huge stream of returned devices.
<raenye>
good thing I caught it right when it happened
<raenye>
also huge security flaw
<raenye>
maybe it's only when used as wired AP, since most people use it as wireless repeater
<PaulFertser>
raenye: I think what you can do is test eeprom modification on your board, and in the commit message specify that if one doesn't feel like messing with that data then the 2.4 GHz band should be configured manually, and add that dbdc hack to some startup script.
<PaulFertser>
Or just recommend everybody to fix the eeprom and add clean support without any hacks.
<PaulFertser>
raenye: changing it to 0x30 should make both phy properly single-band.
<PaulFertser>
No reason to not give it a try.
tidalf has quit [Ping timeout: 480 seconds]
<raenye>
how to change a single byte in the factory partition? just write all of it using mtd?
dangole_ has joined #openwrt-devel
GNUmoon has quit [Remote host closed the connection]
dangole has quit [Remote host closed the connection]
<PaulFertser>
raenye: yep, you have full backup on a real computer anyway, and you can overwrite with whatever when you need to.
GNUmoon has joined #openwrt-devel
<PaulFertser>
raenye: btw, OpenWrt has a kmod which allows writing to read-only partitions.
<PaulFertser>
raenye: sure, I'm just thinking about how the instructions should look like for the future users once you get support upstream.
<raenye>
sure, thanks
<PaulFertser>
raenye: please ping me as soon as you try with the modded "factory", also check hexdump right there on device just in case after writing.
<PaulFertser>
I'm eager to see if it's indeed enough to make the silly thing behave.
<raenye>
sure, I will. But I need to tend to real life now, so probably only in the evening.
<raenye>
Thanks again for all your help, Paul.
<PaulFertser>
raenye: btw, enabling HT40 on 2.4 GHz is problematic as by default hostapd will scan all the nearby channels on startup and if it detects a single HT20 AP it will downgrade to HT20 too.
<raenye>
I see. actually I don't use 2.4 at all, just wanted the device to function properly
<PaulFertser>
raenye: good luck, see you soon :)
tidalf has joined #openwrt-devel
<PaulFertser>
raenye: btw, it's OpenWrt, not OpenWRT
<olmari>
PaulFertser: If we yell OpenWRT enough times, change it officially? ;D
tidalf_ has quit [Ping timeout: 480 seconds]
<PaulFertser>
olmari: it used to be OpenWRT but then the name as changed as it's not related to the original Linksys WRT (which as an abbreviation) anymore.
<olmari>
While story makes sense, nobody but core devs know ;D
<olmari>
I mean.. I don't even care so much myself, but ofcourse I realise for some naming is a thing, especially for "own" systems :)
<olmari>
..and sometimes it's fun to poke an bit :P
danitool has quit [Quit: Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos]
<PaulFertser>
6. Do not use Arm’s trademarks to make fun of Arm or portray Arm in a negative way.
<olmari>
And I ofcourse try to be correct on naming where needed, but often times I also fail.. fortunately most of the times it's not that relavant =)
<aparcar[m]>
rmilecki: I'll go ahead and merge bcm4908
<aparcar[m]>
rmilecki: please let me know once anything else is ready
<rmilecki>
aparcar[m]: well, id prefer to test it first
<rmilecki>
i can do that during weekend
<rmilecki>
today most likely
<aparcar[m]>
rmilecki: oh okay sorry I thought bcm4908 is already tested and fine. sure please take over ☹️
<aparcar[m]>
opps I meant 🙂
tidalf has joined #openwrt-devel
rua has quit [Quit: Leaving.]
tidalf_ has joined #openwrt-devel
tidalf has quit [Ping timeout: 480 seconds]
minimal has joined #openwrt-devel
rua has joined #openwrt-devel
schwicht has joined #openwrt-devel
schwicht_ has joined #openwrt-devel
schwicht has quit [Read error: Connection reset by peer]
tidalf_ has quit [Ping timeout: 480 seconds]
tidalf has joined #openwrt-devel
tidalf_ has joined #openwrt-devel
tidalf__ has joined #openwrt-devel
<lostandconfused1>
PaulFertser: djfe_: https://pastebin.com/xcisM2KA this is the original dts of the device and the cmdline is `root_rfs=0x00203640 flash_type=norplusnand ubi.mtd=UBI_DEV clk_ignore_unused`. i've built targeting 'asus rt-ac58u' profile with qcom-ipq4018-rt-ac58u.dts (openwrt v21.02.2) and it started the boot process but got stuck on 'PHY 0 single test PSGMII issue happen!' and there it loops until i
<lostandconfused1>
remove power but replacing the dts with the original dts doesn't boot or at least serial stops
tidalf___ has joined #openwrt-devel
tidalf has quit [Ping timeout: 480 seconds]
tidalf___ has quit [Read error: Connection reset by peer]
<djfe_>
lostandconfused1: your name is too fitting. What are you even trying to do here? What would you use the original dts for? It makes sense that this won't boot. Asus is using asuswrt which is not openwrt. even if they use some Linux Kernel it's not the same. the device is supported already: https://firmware-selector.openwrt.org/?version=22.03.3&target=ipq40xx%2Fgeneric&id=asus_rt-ac58u
tidalf_ has joined #openwrt-devel
tidalf__ has quit [Ping timeout: 480 seconds]
Daanct12 has quit [Ping timeout: 480 seconds]
schwicht has joined #openwrt-devel
<lostandconfused1>
djfe_: :D i'm (learning) porting a new device (4g-ac53u) which is similar to rt-ac58u and wanted to see how far it would get but the kernel failing to boot/not printing anything with the original dts vs the rt-ac58u one was a bit confusing and i had no idea where to continue (i'm fairly new to this)
tidalf has quit [Ping timeout: 480 seconds]
schwicht has quit [Ping timeout: 480 seconds]
Lynx- has joined #openwrt-devel
goliath has quit [Quit: SIGSEGV]
<djfe_>
start with openwrt master. make a copy of the rt-ac58u stuff (not just the dts) but adjust the partitions first (very important if you actually plan to flash this!)
<djfe_>
this might not be the best type of instructions, bear with me (meant towards everyone else here)
<djfe_>
there are some instructions in the wiki on what to do. you might want to read them (no time to search right now, maybe ask me in pm or again tomorrow if you can't find them)
<djfe_>
If you want to be able to restore your device if you messed up, I suggest restoring stock rom with the Asus recovery and taking backups of all partitions (mtd)
rua has quit [Quit: Leaving.]
rua has joined #openwrt-devel
<lostandconfused1>
i don't think changing partitions yet is a good idea if the kernel doesn't boot (unless this is required?), i've been booting off usb to test things
<djfe_>
open a fork on Github and send me a link of your progress, I can tell you what looks ok and what needs to be fixed
<djfe_>
actually getting started with just booting from ram is a very good idea. get the initramfs working first
<djfe_>
interesting didn't know booting via USB
<djfe_>
anyway, starting with the current rt-ac58u dts is probably a better idea if the devices are similar
<djfe_>
you can't expect dts files of a different os to magically work in a new environment, I think
<djfe_>
record everything you need for adding support: cpu type (ipq4018 I assume?), mtd partitions from flash (see stock dmesg log), all macs (lan, wan, wifi 2.4, wifi 5, lte mac) you'll need those later
<lostandconfused1>
yeah that's what i was wondering, does the dts format/keywords work in every kernel or does it stop working at some point (original kernel 3.14.77 vs openwrt 5.4.179)
schwicht has joined #openwrt-devel
rua has quit [Quit: Leaving.]
<djfe_>
the issue with that is that they were never written to be universal like dts files in the Linux Kernel are.
<djfe_>
they were written to work with this one os, that's it
<djfe_>
Also lots of stuff has changed since the device was published. official support for the soc and wifi chips in the official kernel looks a lot different probably compared to the hacks(?) Asus had to do themselves to get stuff running.
<djfe_>
maybe compare stock dts of ac53u and ac58u to see the differences Asus had to make. then apply those to your copy of the master dts of the ac58u
<djfe_>
(apply doesn't mean copy & paste, search the github repo for issues, commits and code that might be related to what you want to do)
<lostandconfused1>
yeah i backed up the mtd partitions as one of the first things :D and documented key things i read on openwrt wiki and yes the main soc is ipq4018
<djfe_>
is this the first device you are adding support for?
tidalf has joined #openwrt-devel
<lostandconfused1>
yep
<djfe_>
👍
<lostandconfused1>
wanted to start somewhere
<lostandconfused1>
is that an unicode emoji
<djfe_>
I've mostly improved stuff regarding devices in the last few months to learn how stuff works. but most stuff was related to Mediatek devices
<djfe_>
or lantiq
<djfe_>
yes it is, a thumbsup
<djfe_>
anyways, I'm everything but an expert, but I feel like I can help getting things started :)
<lostandconfused1>
cool, how exactly do you learn in that method (because the docs are generally lackluster)?
schwicht has quit [Ping timeout: 480 seconds]
<djfe_>
looking at code, looking at issues, looking at new commits
<djfe_>
and asking stuff on irc when I'm stuck
tidalf_ has quit [Ping timeout: 480 seconds]
tidalf_ has joined #openwrt-devel
<lostandconfused1>
but you do have the hardware to test things out or just making educated guesses? :D
<djfe_>
related to every ipq4018 type soc
<djfe_>
yes, there are docs, and they are helpful depending on what you are trying to do. If your device is actually fairly similar, adding it should be easy but you start with existing code in the code base you are trying to add the device to, not with device tree from Asus. those are helpful for learning about certain features that the new dts might need. but also might not need, because openwrt/linux includes dtsi files for generic stuff
<djfe_>
I started with hardware that I owned, it was supported already but certain led's weren't working.
<djfe_>
I got different hardware too eventually (bought it used or people gave them to me)
<djfe_>
I'm engaging with the German movement Freifunk
<djfe_>
trying to add devices so we can add them to our openwrt fork called Gluon.
<lostandconfused1>
cool cool cool, i'll write all this down and get started on the github stuff (possibly a libre alternative if there are any)
tidalf has quit [Ping timeout: 480 seconds]
rua has joined #openwrt-devel
raenye has quit [Remote host closed the connection]
<djfe_>
you can also do that but submitting code only works via email or via github PR
<lostandconfused1>
that freifunk stuff is really cool but if i understand correctly, you're making an open wifi network 'mesh'?
<djfe_>
I can also open the PR for you with your commit if you don't feel like using github
<djfe_>
yes, so mostly qualcomm and mediatek based devices. switches/vpn offloader can also use different SOCs.
<djfe_>
Qualcomm and Mediatek because those have wifi drivers that work well enough and support 802.1s meshing
<djfe_>
so yeah, in most cases I have hw now, but depending on what I do, educated guesses always help. like helping in adding support for your device.
schwicht has joined #openwrt-devel
<lostandconfused1>
neat! thanks a lot for the help and guidance, i now know how to move forward with this :D
tidalf has joined #openwrt-devel
goliath has joined #openwrt-devel
tidalf_ has quit [Ping timeout: 480 seconds]
schwicht has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tidalf has quit [Ping timeout: 480 seconds]
schwicht has joined #openwrt-devel
raenye has joined #openwrt-devel
<raenye>
PaulFertser: patched eeprom, rebased to master. Now two devices are detected but still radio0 is detected as dual-band.
<raenye>
at least now everything can be configured from luci (change 802.11 mode from AC to N, and then 2.4g can be selected)
Lynx- has quit [Ping timeout: 480 seconds]
<raenye>
but now both wireless phys have the same MAC
<raenye>
this can be fixed in userspace like other devices do
dangole_ has quit [Ping timeout: 480 seconds]
tidalf has joined #openwrt-devel
schwicht has quit [Ping timeout: 480 seconds]
tidalf_ has joined #openwrt-devel
tidalf has quit [Ping timeout: 480 seconds]
raenye has quit [Remote host closed the connection]
schwicht has joined #openwrt-devel
raenye has joined #openwrt-devel
<raenye>
Any idea why sysupgrade requires me to discard settings every time? ("The device is supported, but the config is incompatible to the new image (1.1->1.0)")
tidalf has joined #openwrt-devel
raenye has quit [Remote host closed the connection]
schwicht has quit [Ping timeout: 480 seconds]
tidalf__ has joined #openwrt-devel
schwicht has joined #openwrt-devel
tidalf_ has quit [Ping timeout: 480 seconds]
raenye has joined #openwrt-devel
<raenye>
PaulFertser: setting band for phy0 can be done with uci-defaults, I reckon, but I'm not sure how accepted is that on official builds