WiFi lost in HG556a because of OpenWrt 18


#21

What is that about? Do not modify any config files. You will do the insmod from the command line after installing the package.


#22

Hi @mk24
I know, I realized. That's why I've done it all over again from scratch. I have reinstalled version 18.06.2, then I install the latest snapshot version and try to install kmod-mtd-rw, but it fails. then I try to install luci, but it also fails. strange, no?
And yes, I have an internet connection, opkg update works perfectly.

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

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r9258-420376a
 -----------------------------------------------------
=== 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:~# opkg update
Downloading http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/packages/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/packages/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/kmods/4.14.97-1-dee606e894727d3ef691b82bff6114a0/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/kmods/4.14.97-1-dee606e894727d3ef691b82bff6114a0/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/packages/mips_mips32/base/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/mips_mips32/base/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/packages/mips_mips32/luci/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/mips_mips32/luci/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/packages/mips_mips32/packages/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/mips_mips32/packages/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/packages/mips_mips32/routing/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/mips_mips32/routing/Packages.gz

Downloading http://downloads.openwrt.org/snapshots/packages/mips_mips32/telephony/Packages.gz
Failed to establish connection
*** Failed to download the package list from http://downloads.openwrt.org/snapshots/packages/mips_mips32/telephony/Packages.gz

Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/targets/brcm63xx/generic/kmods/4.14.97-1-dee606e894727d3ef691b82bff6114a0/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

root@OpenWrt:~# opkg install luci
Unknown package 'luci'.
Collected errors:
 * opkg_install_cmd: Cannot install package luci.
root@OpenWrt:~# opkg install kmod-mtd-rw
Unknown package 'kmod-mtd-rw'.
Collected errors:
 * opkg_install_cmd: Cannot install package kmod-mtd-rw.
root@OpenWrt:~#

TIA


#23

What a pity. I can see it, but I can not touch it ...

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00020000 "CFE"
mtd1: 00f80000 00020000 "linux"
mtd2: 001a5b18 00020000 "kernel"
mtd3: 00dda3e8 00020000 "rootfs"
mtd4: 00bc0000 00020000 "rootfs_data"
mtd5: 00020000 00020000 "cal_data"
mtd6: 00020000 00020000 "nvram"

#24
 * opkg_download: Failed to download http://downloads.openwrt.org/snapshots/packages/mips_mips32/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

I just saw that opkg update does not download anything.
I'm lost, I do not understand anything, I browse the internet, and if I click on the link, I download the luci package, but from the command line it does not do anything.


#25

https://openwrt.org/faq/after_installation#failed_to_download_wget_returned_4


#26

Test your router's Internet access with ping openwrt.org.


#27

As I said, I surf the web...
And the ping...

Haciendo ping a openwrt.org [139.59.209.225] con 32 bytes de datos:
Respuesta desde 139.59.209.225: bytes=32 tiempo=73ms TTL=54
Respuesta desde 139.59.209.225: bytes=32 tiempo=74ms TTL=54
Respuesta desde 139.59.209.225: bytes=32 tiempo=73ms TTL=54
Respuesta desde 139.59.209.225: bytes=32 tiempo=72ms TTL=54

Estad¡sticas de ping para 139.59.209.225:
    Paquetes: enviados = 4, recibidos = 4, perdidos = 0
    (0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
    M¡nimo = 72ms, M ximo = 74ms, Media = 73ms

#28

Run the ping on the router's SSH command line, not your PC. You have to connect the router itself to the Internet to install packages. That would of course mean a wired connection since wireless doesn't work.


#29

You are right @mk24

root@OpenWrt:~# ping openwrt.org
ping: bad address 'openwrt.org'
root@OpenWrt:~#

But I surf the web at this moment, I'm using this router to connect this forum.
Of course it is a wired connection.


#30

I've got it. Some kind of DNS issue, but solved with this:

uci set network.lan.dns="8.8.4.4 8.8.8.8"
uci commit
/etc/init.d/network restart

Luci installed
Kmod-mtd-rw installed
Now, insmod mtd-rw i_want_a_brick=1
An then, dd if=/etc/ralink_generic.bin of=/dev/mtd5, but this haven't finished still


#31

Done.

root@OpenWrt:~# insmod mtd-rw i_want_a_brick=1
root@OpenWrt:~# dd if=/etc/ralink_generic.bin of=/dev/mtd5
dd: writing '/dev/mtd5': No space left on device
257+0 records in
256+0 records out
root@OpenWrt:~#

Now rebooting...

Don't work. :sob:

Any idea to solve this?


#32

https://openwrt.org/playground/faq/no_space_left_on_device


#33

Use mtd write to write an image to an mtd partition. The file must be same size or smaller than the partition.


#34

root@OpenWrt:~# insmod mtd-rw i_want_a_brick=1
root@OpenWrt:~# mtd -r write /etc/ralink_generic.bin cal_data
Unlocking cal_data ...

Writing from /etc/ralink_generic.bin to cal_data ... [e]Failed to erase block
root@OpenWrt:~#
Router is 16mb flash, and full firmware is 8mb.


#35

Why are you trying to flash this partition!?!?

And what is the size of the partition you're trying to flash? That's the only thing that matters.


#36

Hi @lleachii

Calibration data is lost in this router (HG622 and others) when you flash openwrt firmware, so you must make a copy of CAL_DATA partition before flash.

I only have this:

root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00020000 00020000 "CFE"
mtd1: 00f80000 00020000 "linux"
mtd2: 001a5b18 00020000 "kernel"
mtd3: 00dda3e8 00020000 "rootfs"
mtd4: 00bc0000 00020000 "rootfs_data"
mtd5: 00020000 00020000 "cal_data"
mtd6: 00020000 00020000 "nvram"


#37

You're missing my point. I wish you well unbricking your device.


#38

It's 1MB long, exactly.


#39

Size 0x20000 is 128kbyte, 131072 bytes.
Failed to erase could be a hardware failure. Dump the partition from the flash, if it is all 0xff except for one bit stuck at zero, that is a bad flash chip.


#40

You are right. All the time I have been trying to flash the CAL_DATA of an HG556a in an HG622. The two with the chip Ralink RT3062F, but the size of the binary file of the HG556a is 1MB, and the size of the partition CAL_DATA of the HG622 is 128kb, so it does not fit, and I do not have backup of the original CAL_DATA, to prove that what I want to do works. Now what I need is for someone from the forum that has an HG622 to make a copy of the partition and upload it to continue testing with this router.