CPE510 V3.8 - Need help, really bricked it this time

I have a tp-link CPE510 V3.8. Yesterday I flashed the OpenWRT snapshot not realizing it did not come with a LuCi interface pre-installed. After a while I could not figure out how to configure the device with ssh to receive a internet connection and I can not figure out the repositories to download the correct packages manually so I attempted to flash the stock firmware back with ssh command completely bricking the device I think. Just the power light comes on now.

I followed the instructions for "Debricking" on the CPE510 page for OpenWRT. Setup the tftp with tftpd64 by Ph. Jounin, after resetting the CPE510 after a few seconds I get this in the TFTP log:

Connection received from on port 2332 [12/08 13:33:33.838]
Read request for file . Mode octet [12/08 13:33:33.838]
File : error 2 in system call CreateFile The system cannot find the file specified. [12/08 13:33:33.839]

I put the stock firmware into my C:\TFPT-Root folder and renamed it to recovery.bin, but I get the error above. I guess its a good sign that I am least getting a connection from but I am not sure what to do from here.

It's asking for a null file name?
What happens if you power on the router while holding the reset button down?
Next step if it won't TFTP by itself would be serial.

Wireshark (or tcpdump showing packet contents as ASCII) would let you see what the router is requesting.

same exact thing while holding reset.

downloading wireshark right now.

It's asking for a null file name?
What happens if you power on the router while holding the reset button down?
Next step if it won't TFTP by itself would be serial.

what do you mean by this? I am not sure what to do next.

Open the case, connect a serial port so you can see what the bootloader is doing and send commands to it.

yea ok I guess im screwed. thanks.

You have any information on this process for this device possibly you would mind sharing?

The error above means that the bootloader asks for the file but the tftp server does not have it.

Please make sure that you can see the file extension in Windows, by default it does not show file extension. If you don't see the file extension you are renaming the file but not the extension, so the file does NOT have the right name and the recovery fails to find it.
See here to change this option in Windows so you can be sure you are seeing everything.

yea one of the first things I always configure in windows is the "hide extensions" option. So I already have the extensions shown. I have the file in the folder that I set in the tftp software.

well I dont know what I did different that time but it just worked. Thanks for the replies.

Can anybody possibly link the correct packages for manually downloading Luci for this device or how to configure it to temporary bridge internet from another router so I can use the update command in ssh without **** things up this time?

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

These commands will set your gateway router IP and also another IP for this device (in case the default IP is not good)
IP addresses used in this example are purely fictional, use the right ones for your setup.

uci set network.lan.gateway=''
uci set network.lan.ipaddr=''
uci commit

Should change the IP configuation to get this device as a slave to another router with internet access.
Your ssh session should be terminated if the device IP address has changed.
If it didn't, write a
service network restart
to force it to re-read and update its IP configuration. It should kick you out from ssh if you changed the device IP.

Connect again to the device at the new IP address you set.

Test that this thing can access the Internet now with

ping -c 4

If that is working, update package lists

opkg update

Then install luci package if you want a normal unencrypted web interface, or luci-ssl if you want a secure web interface using HTTPS.

opkg install luci
opkg install luci-ssl

After it has done wait for a bit and then you can connect to the web interface.

1 Like

Yea I tried this again last night with this:

config wifi-iface
    option network 'wan'
    option device radio0
    option mode 'sta'
    option ssid 'WIFINETWORKNAME'
    option encryption psk2
    option key 'WIFIPASSWORD'

I could see that my CPE510 was connected to the router that had internet by checking the other routers admin panel, but the CPE510 would not connect. Could not get it to work and then ended up bricking the device again trying to flash back to stock, spent all night trying to get it to get it take the recovery file again through tftp, but the CPE510 kept asking for "vmlinuz" instead of recovery.bin. After a good 3 hours of countless attempts and frustration, I decided to give it a go on a laptop instead of my desktop and uploaded the recovery.bin on the first shot.

Im thinking ill just wait for a full release of openwrt that includes the interface this time(if there ever will be one).

Seriously dude, chill out a bit, there is no need to go crazy like that.

I still think you should have found a way to give this AP an ethernet connection just for this setup phase, it removes a whole layer of unneeded complexity.

I could see that my CPE510 was connected to the router that had internet by checking the other routers admin panel, but the CPE510 would not connect.

There could have been bugs in the wifi driver maybe, but I doubt it.

What was the network config in the /etc/config/network ? What was the subnet it was trying to connect to?

If the device was connected through wifi but not connecting then your network config for the "wan" interface should be adjusted.

Also, if you are connecting to a subnet like 192.168.1.X and your "lan" interface is in the same subnet (ie. it has IP address then it's not gonna work either as "lan" cannot be in same subnet as "wan", change the "lan" IP to another subnet.

It's going to be a long wait, as this device is in a taget that won't be built for the next release as it is too new or something (yes I disagree with their choice, not that it matters much).

I suggest you set up a Linux VM (Debian or Ubuntu is fine) in Virtualbox or VMWare Player and use the Image Builder to assemble an image with the packages you need. https://openwrt.org/docs/guide-user/additional-software/imagebuilder
Since it is not compiling but just downloading pre-built packages from the download servers it does not need a powerful PC, nor it will take a long time.

You will need the "image builder" from the "Supplementary files" at the bottom of here https://downloads.openwrt.org/snapshots/targets/ath79/generic/

The command to have it build an image in your case is

make image PROFILE="tplink_cpe510-v3" PACKAGES="ca-certificates bridge htop nano luci-ssl luci-proto-relay"

Yes I added more than just Luci web interface. Especially "nano" that is a much more friendly text editor than vi. I hate vi.
It also contains Luci-ssl so it's the safe web interface over HTTPS, your browsers will complain because it's using a self-signed certificate, but random people won't be able to sniff your password with packet capture.

Now, I understand that you aren't in the best shape to do this right now, so I've built an image with that command myself.

There are two images, a factory one and a sysupgrade one. Plus some text files for the shasums and packages installed.

DISCLAIMER: I DID NOT TEST this image as I don't own the hardware. If you use it you do so AT YOUR OWN RISK. I just ran that command, if something is wrong it's not my fault.


(Note: I didn't do this "just for you". I keep all my devices on snapshot, every few months I rebuild a full firmware image like this and send it over, so I have everything set up already)

1 Like

not sure what you mean by "go crazy" but thanks.

something something spent all night trying to get it to get it take the recovery file again through tftp something something

didn't @jow yesterday wrote that it will be enabled and built?

where did he wrote it?

Last time I saw this discussed in the mailing list at the beginning of August, and @ynezz was adamant about keeping them source-only for 19.07 release. I think you (or another guy called "psyborg") were also in that discussion.