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

19.07-SNAPSHOT works fine.

3 Likes

I didn't know 19.07-SNAPSHOT existed - I'd been using the nightlies, and what do you know, it fixed my weird issues! thanks a bunch :slight_smile:

1 Like

A couple of issues (relatively minor, mind you) - I can't make extroot work, no doubt because the relevant GPIOs aren't being flipped on until later in the boot process. I've pastebinned the two log sets;

delay_root set to 5s;

[   27.639112] usb 1-1.2: new high-speed USB device number 3 using ehci-platform
[   27.824530] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   27.870331] scsi host0: usb-storage 1-1.2:1.0
[   28.935623] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[   28.955402] sd 0:0:0:0: [sda] 60063744 512-byte logical blocks: (30.8 GB/28.6 GiB)

delay_root set to 45s:

[   54.221709] usb 1-1.2: new high-speed USB device number 3 using ehci-platform
[   54.465847] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   54.513754] scsi host0: usb-storage 1-1.2:1.0
[   55.581999] scsi 0:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ: 0 ANSI: 6
[   55.602053] sd 0:0:0:0: [sda] 60063744 512-byte logical blocks: (30.8 GB/28.6 GiB)

logread output from the delay_root 5s run is here, too :slight_smile:

This definitely had the desired delay effect, but as I said above I suspect the relevant GPIOs for extroot aren't being flipped on until this point in the boot process. Changing to a different flash drive doesn't seem to help. I've been stumbling through the documentation on how the boot process works trying to work out where I might need to mess with things to flip the GPIOs on, but I'm really way out of my depth here.

The other issue is one I think is known? When I boot the unit up at first, I get the charge status light lit up; the light goes away after OpenWRT finishes booting, and in the rare instance that it doesn't i get reboots until it does - and despite my best efforts, I can't seem to get any data in from the MSP430 on ttyS0. What am I missing here? The earlier posts were somewhat hard to follow :frowning: my aim was to make a little script / LuCI module to show charge status on the main page, and maybe have the LED work right. Too much to ask? I saw something about weirdness with GPIO mapping?

E: OK, so the LED thing appears to be just because it's plugged in and the battery's full. So that's totally fine. Would still love to be able to read in the serial data from the MSP, though!

1 Like

Could someone post the compiled firmware for the DIR-510L based on that latest Snapshot (understood it works). Thanks a lot.

Factory
Sysupgrade

1 Like

We eventually gave up on trying to get the battery status working.
The problem is, we need to configure the particular pin on MT7620 for UART RX, however the kernel driver would also take control of the corresponding TX pin for the serial port, which would be driven to a high level when the serial port is enabled. However, that pin should rather be left untouched (i.e. input / high-impedance), since it is also somehow connected to the MSP430, and driving it to a high level will keep MSP430 supplied with power even when power to MSP430 was disconnected (i.e. the MSP430 will remain powered by the voltage applied to one of its GPIO pins rather than +3V3), and when that happens you cannot switch your device off even when the physical power switch is in "OFF" position (thus we called it the secret "stealth mode" :wink: ).
Maybe there is some way to accomplish this using pinmux settings, but we found no solution. You could try to bit-bang it, maybe that's even what the oem firmware does, considering they chose a very low baud rate :thinking:

Regarding extroot, that looks like an interesting problem... the USB GPIO will apparently be set by something that is in rootfs, kind of a bootstrapping problem when trying to use extroot :innocent: maybe @CHKDSK88 has an idea about how to solve it?

5GHz does not work at all, with latest master and was nor work with master from august.
Client see SSID, but fail to connect to it, router can scan and see other SSID, no event records in log about connect try.

I recheck hw and flash stock fw - it work with 5GHz. (But main cpu is hot, even with termalpad + flat radiator.)
My work branch: https://github.com/rozhuk-im/openwrt/commits/dir-510l

I suspect that mediatek,mtd-eeprom = <&config 0xe05d>; is not correct offset, or some fw from openwrt driver, because after flash back owrt from stock if boot and 5GHz show initialize ok and show 9 in levels, but after software reboot 5GHz adapter fail to init.

you likely need usb-storage / scsi-generic / ext4 / etc. compiled into your kernel...

I assembled a custom image using the imagebuilder containing all the things it needs for extroot, even tried a few different combinations of filesystems and packages - no dice. Issue seems to be that this specific device needs some GPIOs twiddled for the USB ports to power on, and that doesn’t happen until after the point in the boot process where it tries to mount an extroot.

Can’t mount the USB key if it’s not turned on :stuck_out_tongue:

1 Like

EDIT: Just saw the full logread...

if it's extroot-overlay via block mount then your fine/delays may be a compromise...

interesting how it kicks in after the leds... maybe kick it's start order down to S89/etc and see if the drive follows?

Mon Oct  7 10:12:50 2019 daemon.notice procd: /etc/rc.d/S96led: setting up led Blink Green on Net
Mon Oct  7 10:12:50 2019 daemon.notice procd: /etc/rc.d/S96led: setting up led Red On
Mon Oct  7 10:12:51 2019 kern.info kernel: [   27.639112] usb 1-1.2: new high-speed USB device number 3 using ehci-platform

wonder if the led gpio pulls something else low/high?

EDIT: Don't know the device well enough ( at all :nerd_face: ) ... but a quick squiz... seems perhaps... it might be missing something;

cat target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts | grep -A5 state_default

	state_default: pinctrl0 {
		default {
			ralink,group = "i2c", "uartf"; /* <<< HERE wled/ref_clk? */
			ralink,function = "gpio";
		};

I'm thoroughly confused. Is the D510L supported by OpenWRT?

Tried the 19.07.3 firmware linked in it's page, but that doesn't seem to have 5Ghz, and you need to use recovery mode to flash new firmware.

From the posts above, it sounds like there may be a snapshot from some time back that works, but all links to it are broken.

Is there an OpenWRT firmware that works well with the D510L?

Does anyone have and would be willing to provide me with a full original flash dump of this router?

ask the one who compile the code to recompile with lower down the limitition of spi speed in dts file, it is exceeding what your nand can handle