Onhub TP-LINK TGR1900 future support?

Thanks.
Now I am Openwrt user :slight_smile:

2 Likes

If it is a wireless bridge NSS probably won’t help too much. Most likely it is operating as a switch and not routing traffic per say.

1 Like

Been following the installation instructions here https://openwrt.org/inbox/toh/google/onhub_tp-link_tgr1900 for the TP-Link onhub but I'm getting errors on Step 13 (To program your image to the main flash, connect ethernet to the LAN port and run the following SSH commands)

For the first command:

root@OpenWrt:~# scp -O openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bi
n root@192.168.1.1:
scp: unrecognized option: O
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-P port] [-S program]
           [[user@]host1:]file1 [...] [[user@]host2:]file2

And the second string isn't any better

root@OpenWrt:~# ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=
/dev/mmcblk0 count=33 && \
> dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev
/mmcblk0 bs=1M"
WARNING: Ignoring unknown option -C
33+0 records in
33+0 records out
dd: can't open '/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin': No such file or directory

I flash the USB sticks with both the latest BalenaEtcher and Win32DiskImager with no errors but the results are the same.

It looks like you are running those commands on the router shell. You need to run those from a computer attached to the router. Make sure the install file is in the same directory as the terminal that is open so it finds the file to transfer. What OS are you using?

I used Putty in Windows 10 to ssh into the router. Tried copying the bin to the Putty directory and even tried putting it under a "root" folder. Same result

In windows, I'd use WinSCP to transfer the file (openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin) to the root folder of OpenWrt on the router then you can execute this from the router shell.

dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
dd if=/root/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0 bs=1M"

That should do it. If you run into issues, you might need to wipe the eMMc before the previous step. Which would be done in the router shell.

It eventually worked. Installed it to emmc & added in Luci. Thanks. The Onhub lives again

2 Likes

Windows 10/ 11 have OpenSSH available (at least in the pro versions already preinstalled), that might be easier in the future (as it behaves more closely to the documented OpenSSH-on-linux commands).

anybody experience any difference in terms of performance/stability between CT vs non-CT versions

I have the TP-Link device, and probably messed up.

For the step where we copy the firmware to the tmp directory, I used the original .bin file I had downloaded (and later mounted to the USB drive). Was that the correct file to copy over?

I then completed "Write firmware to eMMC...". And I saw that the commands seem to have run without issues. So I proceeded to unplug, remove the USB drive and reboot the router.

The router restarted (purple -> beep twice -> lights off -> multicoloured); however, while connected via LAN I am no longer able to access the router (ping / ssh @ 192.168.1.1). After re-running the steps a few times (minus copying the firmware again) I remain unable to connect to the router whatsoever.

Any ideas on either connecting or fully resetting to resolve this issue?

Edited: Fixed the incorrectly typed IP address.

Probably just a typo, but the address is 192.168.1.1 not 162.

1 Like

Yes indeed, most definitely a typo. But I have done dumb stuff like this in the past where I typed it incorrectly once and kept using up-arrow and reusing the wrong input.

But checking my terminal, I used the correct IP and still no-go.

I ran into the same. The fix for me was to zero out the onhub storage before writing the image to it (steps are found here on this thread). Also, try another image. Remember you can always sysupgrade to your preferred image once you get OWRT on the device itself.

1 Like

Thank you so much, after your comment I realized there were several mentions in this thread about this. Sorry to keep turning over the same issue.

My issue was that I was completely unable to even boot from USB, so to solve this I got a bit further by doing the following:

  1. Flash another USB with OEM recovery
  2. This led to cyan ring start, then orange ring (this is a state mentioned 14d ago by @Mandupizza ).
  3. I then repeated the process for adding OWRT.
  4. This time I was able to boot from OWRT USB and ping + ssh into the router (as I had once before).
  5. I zeroed the eMMC.
  6. I copied the file from my downloads to /tmp on the router

So now, current issue is an I/O issue when writing the firmware.

This is the output, plus confirmation that the .bin file and mmcblk0 locations exist:

root@OpenWrt:~# dd if=/tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0 bs=1M
dd: error writing '/dev/mmcblk0': I/O error
20+1 records in
20+0 records out
root@OpenWrt:~# ls -ltra /dev/mmcblk0
brw-------    1 root     root      179,   0 Apr 24 19:09 /dev/mmcblk0
root@OpenWrt:~# ls -ltra /tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin
-rwxr-xr-x    1 root     root      21249450 Apr 24 19:03 /tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin
root@OpenWrt:~#

So that is where I am currently stuck. Are there any tools I could use to troubleshoot the storage, I don't see anything logged in /var/logs/.

If it helps, I am accessing this using WSL terminal (Windows, Ubuntu Subsystem), but that seems irrelevant once you ssh into the router.

Edit: I just spotted my current snapshot when I ssh in is OpenWrt SNAPSHOT, r22649-1129b226f7 if that helps as well.

In the instructions, this is the command to write to the emmc

dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
dd if=/tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0 bs=1M

Seems you left out the first part?

dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \

I wish it were this simple, in fact I originally ran the full command, both lines together as specified in the instructions. That is where I first spotted that I/O error message. So to troubleshoot further I ran the commands independently to see where it fails.

When running the command as specified in the instructions I get the following:

:~$ ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
> dd if=/tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0 bs=1M"
33+0 records in
33+0 records out
dd: error writing '/dev/mmcblk0': I/O error
20+1 records in
20+0 records out

I suspect there is something wrong with the storage, corrupt sector for example. Is anyone aware of diagnostic utilities that could be used to detect any issues? Maybe something similar to fsck I am not all that familiar with diagnostic tools, but there must be something to validate and repair storage space.

This post lists two ways to check the storage and the sizes to expect. When in doubt, back to stock, zero out the memory and try again. It seems to be troublesome sometimes to get owrt on them.

1 Like

Thanks, with this I was able to gather a bit more info.

I was unable to run opkg update && opkg install cfdisk since there is no internet connection.

To get the package updates I attempted the solution provided in Package download failed - #3 by jaromanda but I think ultimately I just do not have internet access.

So I installed some packages offline following the recommendations from: Install Packages While Offline?

The packages I needed were at https://downloads.openwrt.org/snapshots/packages/arm_cortex-a15_neon-vfpv4/base/

I then switched my terminal to ~/User/Downloads (could be a different route depending on your system, maybe ~/Downloads) and ran the following to copy each of the downloaded packages required:

scp cfdisk_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk root@192.168.1.1:/tmp/ && \
scp libncurses6_6.4-2_arm_cortex-a15_neon-vfpv4.ipk root@192.168.1.1:/tmp/ && \
scp libfdisk1_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk root@192.168.1.1:/tmp/ && \
scp libmount1_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk root@192.168.1.1:/tmp/ && \
scp terminfo_6.4-2_arm_cortex-a15_neon-vfpv4.ipk root@192.168.1.1:/tmp/

And I followed this by installing the packages:

ssh root@192.168.1.1 -C "opkg install /tmp/terminfo_6.4-2_arm_cortex-a15_neon-vfpv4.ipk && \
opkg install /tmp/libncurses6_6.4-2_arm_cortex-a15_neon-vfpv4.ipk && \
opkg install /tmp/libfdisk1_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk && \
opkg install /tmp/libfdisk1_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk && \
opkg install /tmp/libmount1_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk && \
opkg install /tmp/cfdisk_2.38.1-2_arm_cortex-a15_neon-vfpv4.ipk"

Then I could ssh into the router and use the cfdisk utility.

user@computer:~/User/Downloads$ ssh root@192.168.1.1
root@OpenWrt:~# cfdisk /dev/mmcblk0

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.3M      4.3M         0 100% /rom
tmpfs                   484.7M     20.8M    463.9M   4% /tmp
/dev/sda3                 3.5G    282.4M      3.2G   8% /overlay
overlayfs:/overlay        3.5G    282.4M      3.2G   8% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# cfdisk /dev/mmcblk0

It is interesting that for row 3 I get /dev/sda3 rather than /dev/mmcblk0p3. And the results for cfdisk are as follows:

The good thing is that the cfdisk installation persists for each reboot. However, once I zero /dev/mmcblk0 that space is completely destroyed and a reset (with the reset button) is required to restore that space which of course removes the installed packages.

This is the output I get as I attempt to proceed:

user@computer:~/User/Downloads$ scp openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin root@192.168.1.1:/tmp/
openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin
user@computer:~/User/Downloads$ ssh root@192.168.1.1 -C "dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33 && \
> dd if=/tmp/openwrt-ipq806x-chromium-tplink_onhub-squashfs-factory.bin of=/dev/mmcblk0 bs=1M"
33+0 records in
33+0 records out
dd: error writing '/dev/mmcblk0': I/O error
20+1 records in
20+0 records out

Then I ssh in to check:

root@OpenWrt:~# cfdisk /dev/mmcblk0
cfdisk: cannot open /dev/mmcblk0: I/O error

Attempt to zero the eMMC

root@OpenWrt:~# dd if=/dev/zero bs=512 seek=7552991 of=/dev/mmcblk0 count=33
dd: error writing '/dev/mmcblk0': I/O error
1+0 records in
0+0 records out
root@OpenWrt:~# dd if=/dev/zero bs=1M of=/dev/mmcblk0
dd: error writing '/dev/mmcblk0': No space left on device
3689+0 records in
3688+0 records out

At this point, that location is completely gone. Trying again will just return the I/O error message. Is there anything else I can try to break out of this loop? Is there something different with my device storage somehow, maybe do something with /dev/sda3 instead.

A lot of posts discuss the Asus model, I would be curious to know if any of the TP-Link owners had to configure anything differently, also would be nice if I could use the internet connection in USB mode for package update, not sure if that is possible with some config changes.

So there is something going wrong here. You should be able to use the OnHub with OWRT running from the usb drive. You should have network and internet. Looking at the cfdisk readout, it looks like google firmware is in the eMMc still. There wouldn't be that many partitions in OWRT.

Just to check, you are allowing the full recovery process to complete correct?

  1. Hold the Reset button (Near the power jack)
  2. Connect power to the device
  3. The LED will be white and after a few seconds should blink orange; After a few more seconds, the LED should blink red; you may now release the Reset button.
  4. Plug in USB stick containing Recovery image
  5. LED should turn off, and recovery begins
  6. After about 5-6 minutes, the device should automatically reboot; LED will pulse blue
  7. Recovery is complete

Then

Then use commands to write factory.bin image to eMMc

Sorry to be redundant if you've done all this multiple times. I have not run into much difficulty getting OWRT on either version of the Hub. Following the recovery instructions and then the install instruction. Most of the time I haven't had to zero the eMMc but I don't think it hurts anything. I've done it with Windows 10 but usually with Linux Mint running natively. I don't have experience with WSL terminal but if you get ssh access seems it should work.

At this point, it might be worth reminding that the "recovery" USB that dadogroove refers to is different than the OWRT image (I believe it's nicknamed "whirlwind").

You at least need to be in a state where the OnHub will restore to the above original firmware, consistently.

From there, I would try creating different OWRT images to burn to the OnHub (e.g. from dadogroove, acwifidude, even the snapshot image from OpenWRT will suffice). Be sure to follow the drive-zero'ing steps, important, to ensure no stale data is left behind after your OWRT flash.

1 Like