What happened to the D-Link DIR-510L?

Yes I have the device, and I want to try to get OpenWRT running. I've used it for several years with stock firmware, but it has become unreliable. I was thinking of factory reset, but then I remembered there was some effort on getting OpenWRT running which is much preferred since stock firmware is poor. However, I'm not able to dedicate time for a couple of weeks.

In the meantime, I need some education on how this process works. I've flashed routers with OpenWRT and DD-WRT before, but the process I've seen described is quite different. I need to understand what's going on better.

  1. Should I get an SPI programmer? What is the recommendation?
  2. what is the process for capturing the backup before starting?
  3. what is JBOOT? mtd partitions?
  4. Understanding combination of serial access with PUTTY as well as file transfer with TFTP?

@timg11

  1. You can make backup without SPI Programmer. But when router become brick, SPI programmer is the only chance to revert changes.
  2. There is two ways:
    a. desolder flash and make backup with SPI Programmer
    b. You need connect to serial console: (57200 8N1)

dd if=/dev/mtd0 of=/tmp/www3/dir-510l-whole-flash.bin

And download through the builtin httpd:
http://192.168.0.1/dir-510l-whole-flash.bin
3. JBOOT is closed D-link bootloader. Mtd layout You can find here:
https://openwrt.org/toh/d-link/d-link_dir-510l_a1
4. Serial console is nescessary. In this router TFTP isn't used.

Every vendor have his own system. This router was maked by Amit for D-Link. JBOOT bootloader causes that work with this devices is different. You can upload images by JBOOT recovery web interface.

I hope You didn't forgot about this topic!

Just found this thread after digging through my notepad, finding a sketch from the time just before the forum disappeared. I was on the old thread, but none of the later posts were recovered. However back then I had tried to find the circuit around the embedded MSP430 controller that handles the power and charging:

I remember there were some weird effects when switching the device on and booting OpenWRT - you just couldn't switch it back off without detaching the battery.
The slider switch "Router <-> OFF <-> charger" is connected to a MSP430 Microcontroller (Pins 9/10), just as the two LEDs (Pins 18/19) and the bq24195l battery charger (i2c, Pins 14,15).

MSP430 connects to MT7620 via UART (MSP430 Pins 3/4, apparently 4800 8N1), but I couldn't make sense out of the communication protocol yet.
The binary that handles communication to that chip in the stock firmware seemed to be mcuinfo_cdm56cdl, but I don't have the tools and skills required to reverse engineer that properly to find out how to talk to it (so we could at least shutdown the device, maybe even read the battery status):
https://onlinedisassembler.com/odaweb/kLPxxGw5

So, is anyone still on this? I have a device to test :slight_smile:

@s_2, I have the device but have not had a chance to get back to working on it. Maybe in the next month or so?
I've installed OpenWRT on more traditional routers, but this one seems substantially more complex, so I'm trying to learn enough so I don't brick it trying. I already learned about backing up via the serial console, JBOOT, etc. Now you are saying there is a companion MSP430 microcontroller that is doing some other functions for power and charging? Since I don't use the DIR-510L as a charger, or in self-powered mode, I'd be happy to disable that and remove the battery and only power it over USB. Do you have any schematic, photos, or other notes you can share?

If you just want the device to be powered 24/7 without battery, you could use the image I downloaded from a link in the old forum on May 3rd, cannot remember whether it was built by @CHKDSK88 or @lowmaster. However they did not brick my device :slight_smile:
http://sebastianschaper.net/openwrt/openwrt-ramips-mt7620-dlink_dir-510l-squashfs-factory.bin
http://sebastianschaper.net/openwrt/openwrt-ramips-mt7620-dlink_dir-510l-squashfs-sysupgrade.bin

I think the latest version even contained the GPIOs for enabling the USB Hub ports, I don't have specific notes about those though. The only scribble I found on paper was this about MSP430, wanted to make a nice and clean schematic with EAGLE, but then the forum was gone and I never continued :blush:

I think I will have some time next month (one week of vacation after christmas). As far as I remember, I had destroyed the MSP430 UART connection on one device while testing, but I might find the issue with the new microscope soon :slight_smile:

By the way, there also seems to be somewhat acceptable support for MT7610E by now, which should probably be included when someone intends to build a new image:

I can go back to work with this router. Still I don't have a device, so I need help. :wink:

At this moment my images don't make device a brick.

For support 7610 I need whole flash or config partition dump.

@s_2
Do You know which mt7620 pins are connected to MSP430?

I think it should be /dev/ttyS0 according to the strings in the binary that controls the chip in the stock firmware, not sure whether it's the same UART that would also enumerate as ttyS0 in openwrt.
It's difficult to follow the traces within the multi-layer pcb, I have no clue yet as to where exactly they are physically connecting to MT7620.

Upon attaching the battery, MSP apparently sends some version info at 600 Baud, then switches to 4800. But I broke the UART connection on my device back then (probably cut some trace with oscilloscope probes), so even after flashing back to stock it will show battery charge always at 0% (curiously it can still be switched off using the slider).

I will have to find my board within the piles of electronics boxes and have a look at the bootlog again for the mtd layout / position of the wifi calibration data (or am I just confusing this with the ART partition of ar71xx? what exactly do you need from the full flash, just the layout or some binary blob that is the same for all DIR510 ?)

I disabled uartf. In next image I will turn it on.

I need only config partition dump. 7610 have calibration data stored in this partition. Flash layout is described at openwrt wiki.


New images. Should support 5GHz wifi. Ethernet is LAN. Second uart is enabled. I recommend use it with serial console.

Could someone give a bootlog and info what work?

1 Like

Found the device :slight_smile:
Here's my mtd7: http://sebastianschaper.net/openwrt/dir510l_mtd7.bin

There was also a link (actually still working) in the old archived thread from a post by lowmaster, where he uploaded his mtd0 (full flash), that also included mtd7.
Comparing the two there's many differences, so I wonder which part will be MT7610 EEPROM...

0xE000 is apparently for MT7620 ethernet, according to the .dts in your github :slight_smile:

Looking at the DIR-810L pull request for MT76x0, I guess we will be needing something like this?! (with the correct offset and adding package kmod-mt76x0e)

&pcie0 {
	mt76@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&config 0x????>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

Here You can find my changes.

okay apparently I was too slow with dumping the mtd partition :smile:

MT7610 looks good actually, iw wlan0 scan works perfectly and will list 5GHz networks :slight_smile:

Serial bootlog until console is disabled:


CDM56CDL_U03 Jboot B796
JRecovery Version R1.2 2013/10/04 18:32
SPI FLASH: MX25l12805d 16M
.
...Boot addr = 0x80400000
...................
Starting kernel @80000000...
[    0.000000] Linux version 4.14.78 (krolik@ubuntu-VirtualBox) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6894+1283-547042398a)) #0 Thu Nov 22 17:21:22 2018
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link dir-510l
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00075952
[    0.000000] Readback ErrCtl register=00075952
[    0.000000] Memory: 124832K/131072K available (3611K kernel code, 172K rwdata, 840K rodata, 168K init, 207K bss, 6240K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015471] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087711] pid_max: default: 32768 minimum: 301
[    0.097105] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110123] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.129658] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149139] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.161306] pinctrl core: initialized pinctrl subsystem
[    0.172141] NET: Registered protocol family 16
[    0.663935] PCI host bridge /pcie@10140000 ranges:
[    0.673327]  MEM 0x0000000020000000..0x000000002fffffff
[    0.683700]   IO 0x0000000010160000..0x000000001016ffff
[    0.711681] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.722715] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.735746] PCI host bridge to bus 0000:00
[    0.743743] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.757462] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.769187] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.782687] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.798868] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.815730] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.828786] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.842593] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.856094] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.869604] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.883099] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.896596] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.906447] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.923779] clocksource: Switched to clocksource systick
[    0.935360] NET: Registered protocol family 2
[    0.944754] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.958528] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.971115] TCP: Hash tables configured (established 1024 bind 1024)
[    0.983938] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.995443] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.008121] NET: Registered protocol family 1
[    1.019475] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.032182] Crashlog allocated RAM at address 0x3f00000
[    1.044285] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.062264] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.073768] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.103241] io scheduler noop registered
[    1.110947] io scheduler deadline registered (default)
[    1.122089] gpio-export gpio_export: 3 gpio(s) exported
[    1.132660] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.146131] console [ttyS0] disabled
[    1.153122] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a Palmchip BK-3103
[    1.172205] console [ttyS0] enabled
[    1.185907] bootconsole [early0] disabled

Connecting via ssh:

login as: root


BusyBox v1.29.3 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r6719+1661-a656ea0bdb
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~# dmesg
[    0.000000] Linux version 4.14.78 (krolik@ubuntu-VirtualBox) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6894+1283-547042398a)) #0 Thu Nov 22 17:21:22 2018
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7620A ver:2 eco:4
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link dir-510l
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80483730, node_mem_map 81000040
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00075952
[    0.000000] Readback ErrCtl register=00075952
[    0.000000] Memory: 124832K/131072K available (3611K kernel code, 172K rwdata, 840K rodata, 168K init, 207K bss, 6240K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015471] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087711] pid_max: default: 32768 minimum: 301
[    0.097105] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110123] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.129658] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149139] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.161306] pinctrl core: initialized pinctrl subsystem
[    0.172141] NET: Registered protocol family 16
[    0.663935] PCI host bridge /pcie@10140000 ranges:
[    0.673327]  MEM 0x0000000020000000..0x000000002fffffff
[    0.683700]   IO 0x0000000010160000..0x000000001016ffff
[    0.711681] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.722715] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.735746] PCI host bridge to bus 0000:00
[    0.743743] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.757462] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.769187] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.782687] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.798474] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.798513] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.798527] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.798600] pci 0000:00:00.0: supports D1
[    0.798610] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.798868] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.814869] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.814919] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.815048] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.815290] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.815333] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.815459] pci 0000:01:00.1: supports D1
[    0.815469] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.815664] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.815681] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.815730] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.828786] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.842593] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.856094] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.869604] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.883099] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.896596] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.906447] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.923779] clocksource: Switched to clocksource systick
[    0.935360] NET: Registered protocol family 2
[    0.944754] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.958528] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.971115] TCP: Hash tables configured (established 1024 bind 1024)
[    0.983938] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.995443] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.008121] NET: Registered protocol family 1
[    1.016752] PCI: CLS 0 bytes, default 32
[    1.019475] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.032182] Crashlog allocated RAM at address 0x3f00000
[    1.044285] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.062264] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.073768] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.103241] io scheduler noop registered
[    1.110947] io scheduler deadline registered (default)
[    1.122089] gpio-export gpio_export: 3 gpio(s) exported
[    1.132660] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.146131] console [ttyS0] disabled
[    1.153122] 10000500.uart: ttyS0 at MMIO 0x10000500 (irq = 13, base_baud = 2500000) is a Palmchip BK-3103
[    1.172205] console [ttyS0] enabled
[    1.185907] bootconsole [early0] disabled
[    1.202360] 10000c00.uartlite: ttyS1 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.222703] cacheinfo: Failed to find cpu0 device node
[    1.232976] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    1.250682] spi spi0.0: force spi mode3
[    1.259141] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    1.269311] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.281970] Creating 4 MTD partitions on "spi0.0":
[    1.291521] 0x000000000000-0x000000010000 : "jboot"
[    1.302113] 0x000000010000-0x000000210000 : "recovery"
[    1.313221] 0x000000210000-0x000000ff0000 : "firmware"
[    1.326570] 2 jimage-fw partitions found on MTD device firmware
[    1.338450] 0x000000210000-0x00000038c261 : "kernel"
[    1.349194] 0x00000038c261-0x000000ff0000 : "rootfs"
[    1.359907] mtd: device 4 (rootfs) set to be root filesystem
[    1.372692] 1 squashfs-split partitions found on MTD device rootfs
[    1.385077] 0x000000600000-0x000000ff0000 : "rootfs_data"
[    1.396704] 0x000000ff0000-0x000001000000 : "config"
[    1.408156] libphy: Fixed MDIO Bus: probed
[    1.425470] gsw: setting port4 to ephy mode
[    1.433884] mtk_soc_eth 10100000.ethernet: generated random MAC address 66:7d:5b:55:cf:d9
[    1.450264] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.462721] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.479731] rt2880_wdt 10000120.watchdog: Initialized
[    1.491033] NET: Registered protocol family 10
[    1.503585] Segment Routing with IPv6
[    1.511053] NET: Registered protocol family 17
[    1.519978] 8021q: 802.1Q VLAN Support v1.8
[    1.534811] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.549823] Freeing unused kernel memory: 168K
[    1.558701] This architecture does not have kernel memory protection.
[    2.447472] init: Console is alive
[    2.454579] init: - watchdog -
[    2.783774] random: fast init done
[    3.615593] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.763072] usbcore: registered new interface driver usbfs
[    3.774164] usbcore: registered new interface driver hub
[    3.784888] usbcore: registered new device driver usb
[    3.800974] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.815781] ehci-platform: EHCI generic platform driver
[    3.836579] phy phy-usbphy.0: remote usb device wakeup disabled
[    3.848378] phy phy-usbphy.0: UTMI 16bit 30MHz
[    3.857248] ehci-platform 101c0000.ehci: EHCI Host Controller
[    3.868742] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    3.884650] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    3.906285] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    3.919766] hub 1-0:1.0: USB hub found
[    3.927697] hub 1-0:1.0: 1 port detected
[    3.939584] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.958142] init: - preinit -
[    4.609919] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    4.863514] random: procd: uninitialized urandom read (4 bytes read)
[    4.876757] hub 1-1:1.0: USB hub found
[    4.889951] hub 1-1:1.0: 4 ports detected
[    5.276640] 8021q: adding VLAN 0 to HW filter on device eth0
[    6.633544] jffs2: notice: (386) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2 of xdatum (0 unchecked, 2 orphan) and 2 of xref (2 dead, 0 orphan) found.
[    6.666535] mount_root: switching to jffs2 overlay
[    6.705703] overlayfs: upper fs does not support tmpfile.
[    6.722555] urandom-seed: Seeding with /etc/urandom.seed
[    6.845356] procd: - early -
[    6.852048] procd: - watchdog -
[    7.269637] procd: - watchdog -
[    7.276300] procd: - ubus -
[    7.392472] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.406963] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.420285] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.433977] procd: - init -
[    7.937281] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.956607] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.980297] Loading modules backported from Linux version v4.19-rc5-0-g6bf4ca7fbc85
[    7.995641] Backport generated by backports.git v4.19-rc5-1-0-g05571dcd
[    8.013209] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.033227] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    8.113236] xt_time: kernel timezone is -0000
[    8.201432] PPP generic driver version 2.4.2
[    8.212887] NET: Registered protocol family 24
[    8.237754] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.250331] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[    8.263440] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[    8.359140] mt76x0e 0000:01:00.0: EEPROM ver:01 fae:00
[    8.373358] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.420436] ieee80211 phy1: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[    8.510539] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    8.526063] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    8.540465] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[    8.546221] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.753034] urandom_read: 5 callbacks suppressed
[    9.753044] random: jshn: uninitialized urandom read (4 bytes read)
[   18.211186] 8021q: adding VLAN 0 to HW filter on device eth0
[   18.260918] device eth0 entered promiscuous mode
[   18.303450] br-lan: port 1(eth0.1) entered blocking state
[   18.314288] br-lan: port 1(eth0.1) entered disabled state
[   18.325561] device eth0.1 entered promiscuous mode
[   18.430200] br-lan: port 1(eth0.1) entered blocking state
[   18.441028] br-lan: port 1(eth0.1) entered forwarding state
[   18.452344] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   19.263824] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   37.279832] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[   54.399779] random: crng init done
[   56.395857] mtk_soc_eth 10100000.ethernet eth0: port 0 link down
[   56.409874] br-lan: port 1(eth0.1) entered disabled state
[   57.157870] mtk_soc_eth 10100000.ethernet eth0: port 0 link up (100Mbps/Full duplex)
[   57.174706] br-lan: port 1(eth0.1) entered blocking state
[   57.185536] br-lan: port 1(eth0.1) entered forwarding state
root@OpenWrt:~#

So I guess the only remaining issue now would be telling MSP430 to shutdown the device without detaching battery. I will check whether I can fix my UART traces and try to capture the transmission again :slight_smile:

I forgot about lowmaster dump. :slight_smile:

I need some info:

  1. ifconfig -a (For wifi 5GHz MAC. At this moment is not implemented. My PR for mt76 driver is pending.)
  2. How many serials You see in system?
  3. Is status LED working?
  4. Are USB working?
  5. What (except MSP) isn't working?

Curiously, when I try to scan 5GHz with LuCI it will not finish scanning, also the radio0 shows "Wireless not associated".
If I try to disable and enable via LuCI, I will only have 2.4 GHz (showing as wlan0), so it's probably just an issue with ifconfig for 5GHz.

After rebooting, both interfaces are back:

// edit: after rebooting both of them even work in LuCI, status is shown and Channels can be scanned :slight_smile: apparently needed one more restart after flashing (or I shouldn't have ifconfig wlan0 up outside of LuCI!?)

root@OpenWrt:~# ifconfig -a
br-lan    Link encap:Ethernet  HWaddr 78:54:2E:9D:27:7D
          inet addr:192.168.7.222  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::7a54:2eff:fe9d:277d/64 Scope:Link
          inet6 addr: fdf3:32be:2ffe::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8803 (8.5 KiB)  TX bytes:8450 (8.2 KiB)

eth0      Link encap:Ethernet  HWaddr 6E:2F:E3:F6:89:03
          inet6 addr: fe80::6c2f:e3ff:fef6:8903/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:11473 (11.2 KiB)  TX bytes:11073 (10.8 KiB)
          Interrupt:5

eth0.1    Link encap:Ethernet  HWaddr 78:54:2E:9D:27:7D
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:76 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8803 (8.5 KiB)  TX bytes:8450 (8.2 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1621 (1.5 KiB)  TX bytes:1621 (1.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0C:43:26:60:F8
          inet6 addr: fe80::20c:43ff:fe26:60f8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3368 (3.2 KiB)

wlan1     Link encap:Ethernet  HWaddr 78:54:2E:9D:27:7D
          inet6 addr: fe80::7a54:2eff:fe9d:277d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3601 (3.5 KiB)

root@OpenWrt:~#

There's two serials, however no more console after booting.

root@OpenWrt:~# ls /dev/tty*
/dev/tty    /dev/ttyS0  /dev/ttyS1
root@OpenWrt:~#

Status LED works, flashing while booting, steady when done. (except for LED2 which is controlled by MSP)

USB is working too:slight_smile:

Support for 7610 is a new thing. It could have bugs. Please try turn on 7610 in AP mode and connect to router.

Things to do:

  1. Repair console
  2. Prepare for wlan 0 MAC setting
  3. Check communication with MSP

Please let me know if You repair uart.

There is not many things to do. Maybe it will be supported before 19.01. :slight_smile:

It is connecting and I can use it for any traffic (LuCI, Web) when it's configured in AP mode.

However it seems to be connecting at only 54 MBit; when iperf3 server is running on OpenWRT, I can get about 20 MBit/s, when the server is on the PC instead it will vary a lot around 13 MBit/s.

I tried switching to 2.4 GHz then for comparison, but did not work (do I have to enable WPA2 PSK first? only did this for 5 GHz), had to restart after changing configuration etc.
So it's probably the driver not yet running smoothly, but great to have some support at all :slight_smile:

Soldered some wires to the UART pins, hope I'll find time for more testing next week, maybe even at the weekend :slight_smile:

This is because firmware loading, IMHO.

On the very first boot the system formats /overlay and the user helper script which loads the wifi's firmware is delayed until the storage gets ready to store the blob extracted from the flash.

if you run again in such issue, it can happen when luci or driver is slow and there is many channels, an easy solution is to increase Maximum wait time for network activity in uhttpd settings

I not recommend use luci at this moment. Can You turn off wlan1 and set only wlan0 to ac mode?