specifies the offset of EC and VID headers is 2048, which will force RO mode, since it is smaller than the minimum input/output unit of the NAND, 4096.
In the stock firmware, that UBI is only used for storing squashfs, so read-only mode is okay. In contrast, OpenWRT uses that UBI for storing squashfs and overlayfs, which requires RW mode.
UBI requires EC and VID headers reside on different minimum input/output unit to enable RW mode, and according to what the NAND driver reports, that is 4096.
To fix this issue, I think we need to let the kernel replace ubi.mtd=22,2048 in the kernel command line to ubi.mtd=22,4096, and create the UBI images without specifying SUBPAGESIZE and VID_HDR_OFFSET. (It will use 4096 as the offset of EC and VID, which will be on different minimum input/output units, and thus supports RW mode.)
I didn't see anything interesting or unexpected. Opportunities for hacking are minimal. The serial port is already exposed and easy to get to. The antenna connections are easy to get to if someone wanted to do an antenna mod. NAND is on the back side, and there's plenty of storage on this thing anyway. Only one of the radio ICs had a thermal pad to connect to the heat sink. I might add pads there if I think it's an issue. My RAM is Kingston, or at least that's how it's etched. I laughed about that.
The storage configuration on this device (MX4300) is a tragedy of wastefulness. The kernel is on raw NAND, outside of any UBI. Uboot supports UBI but isn't using it. The squashfs and writable config filesystems are seperate UBIs, so that's a pile of wasted space (160MB x2) and constrains the theoretical size of the squashfs at the same time. It's the worst of all possible options. The writable storage area is non-redundant, which reduces the usefulness of redundant system partitions to near-zero.
As for the app2_data and app2 partitions that take up half the damn NAND, I don't even know what that is yet.
Using this build and modifying the uboot partbootargs, this booted on my device successfully. WAN port works correctly and automatically received a DHCP lease and I got internet connectivity. Wifi also works following the steps to set disabled=0 in the config then running wifi.
interesting, ln1301 seems to be given away with stuff in USA as dirt cheap, not much in the UK!
Interesting it has fortinet branding. i'm guessing the default firmware still "looks" linksys and from details above it certainly has the same linksys layout
Does anybody have a compiled version of the NSS branch for MX4200v1 (or instructions how to compile it)? I'm interested in testing it out as I experience random disconnects and notice this error:
ath11k c000000.wifi: failed to flush transmit queue, data pkts pending
It is very noticeable in Teams calls where the meeting freezes for 2-3 seconds.
root@OpenWrt:/# ifconfig | grep "HWaddr"
br-lan Link encap:Ethernet HWaddr 80:69:1A:22:FE:8C
lan1 Link encap:Ethernet HWaddr 80:69:1A:22:FE:8C
lan2 Link encap:Ethernet HWaddr BA:5E:06:8A:BF:72
lan3 Link encap:Ethernet HWaddr 76:BD:4B:57:03:B3
phy0-ap0 Link encap:Ethernet HWaddr 80:69:1A:22:FE:8E
phy1-ap0 Link encap:Ethernet HWaddr 80:69:1A:22:FE:8D
wan Link encap:Ethernet HWaddr 80:69:1A:22:FE:8B
Reset button works - short press for reboot, long press for factory reset both work.
WPS button doesn't seem to work even when configured correctly on the wifi ifaces. Seems like the GPIO pin might be incorrect. I tried to find which one it was without much success, but here's a dump of /sys/kernel/debug/gpio that might be helpful.
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 512-581, parent: platform/1000000.pinctrl, 1000000.pinctrl:
gpio0 : in low func1 2mA pull down
gpio1 : in high func1 8mA no pull
gpio2 : in high func1 2mA pull down
gpio3 : in high func1 8mA no pull
gpio4 : in high func1 8mA no pull
gpio5 : in low func1 8mA no pull
gpio6 : in low func1 8mA no pull
gpio7 : in low func1 8mA no pull
gpio8 : in low func1 8mA no pull
gpio9 : in high func1 2mA pull down
gpio10 : in high func1 8mA no pull
gpio11 : in high func1 8mA no pull
gpio12 : in low func1 8mA no pull
gpio13 : in low func1 8mA no pull
gpio14 : in low func1 8mA no pull
gpio15 : in low func1 8mA no pull
gpio16 : in low func1 2mA pull down
gpio17 : in high func1 8mA no pull
gpio18 : in low func0 2mA pull down
gpio19 : in low func0 2mA pull down
gpio20 : in low func0 2mA pull down
gpio21 : in high func0 2mA pull up
gpio22 : in low func0 2mA pull down
gpio23 : in high func2 8mA no pull
gpio24 : out low func2 8mA no pull
gpio25 : in low func0 2mA pull down
gpio26 : in low func0 2mA pull down
gpio27 : in low func0 2mA pull down
gpio28 : in high func0 2mA pull down
gpio29 : in low func0 2mA pull down
gpio30 : in high func0 2mA pull down
gpio31 : in low func0 2mA pull down
gpio32 : in high func0 2mA pull down
gpio33 : in low func0 2mA pull down
gpio34 : in low func0 2mA pull down
gpio35 : in low func0 2mA pull down
gpio36 : in high func0 2mA pull down
gpio37 : out high func0 2mA pull down
gpio38 : in high func0 2mA pull up
gpio39 : in high func0 2mA pull up
gpio40 : in high func0 2mA pull up
gpio41 : in high func0 2mA pull up
gpio42 : in high func0 8mA no pull
gpio43 : in high func0 8mA no pull
gpio44 : in low func0 2mA pull down
gpio45 : in high func0 2mA pull down
gpio46 : in high func0 8mA no pull
gpio47 : in high func0 8mA no pull
gpio48 : in high func0 8mA no pull
gpio49 : in high func0 8mA no pull
gpio50 : in low func0 2mA pull down
gpio51 : in low func0 2mA pull down
gpio52 : in high func0 8mA pull up
gpio53 : in low func0 2mA pull down
gpio54 : in low func0 2mA pull down
gpio55 : in low func0 2mA pull down
gpio56 : in low func0 2mA pull down
gpio57 : in low func0 2mA pull down
gpio58 : in low func0 2mA pull down
gpio59 : in low func0 2mA pull down
gpio60 : in low func0 2mA pull down
gpio61 : in low func0 2mA pull down
gpio62 : in low func0 2mA pull down
gpio63 : in low func0 2mA pull down
gpio64 : in low func0 2mA pull down
gpio65 : in low func0 2mA pull down
gpio66 : in low func0 2mA pull down
gpio67 : in high func0 8mA pull up
gpio68 : in high func0 8mA pull up
gpio69 : in high func0 8mA pull up
gpiochip1: GPIOs 582-593, parent: platform/200f000.spmi:pmic@0:gpio@c000, 200f000.spmi:pmic@0:gpio@c000:
gpio1 : ---
gpio2 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio3 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio4 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio5 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio6 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio7 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio8 : in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio9 : out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio10: in low normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio11: out high normal vin-0 pull-down 10uA push-pull high atest-1 dtest-0
gpio12: ---