Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| toh:huawei:hg622 [2019/02/16 20:57] – [Wifi calibration data - UNDER CONSTRUCTION] willy | toh:huawei:hg622 [2023/05/21 16:58] – fix links danitool | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| {{section> | {{section> | ||
| - | The HG622 is an adsl wifi router mainly distributed by [[wp> | + | The HG622 is an ADSL wifi router mainly distributed by [[wp> |
| + | |||
| + | {{: | ||
| - | {{: | ||
| - | :!: It's a good idea to backup the cal_data area at the flash-chip. The WLAN calibration data is specific for your device. | ||
| ===== Supported Versions ===== | ===== Supported Versions ===== | ||
| ---- datatable ---- | ---- datatable ---- | ||
| - | cols : Brand, Model, | + | cols : Brand, Model, |
| - | headers : Brand, Model, | + | headers : Brand, Model, |
| align : c, | align : c, | ||
| filter | filter | ||
| Line 40: | Line 40: | ||
| ---- | ---- | ||
| - | <WRAP center round alert 60%> | + | <WRAP center round important |
| - | **Warning**: | + | **Warning**: |
| + | |||
| + | **BUG fixed** in this commit -> [[https:// | ||
| + | |||
| + | **17.01.4 < <color red> | ||
| </ | </ | ||
| + | |||
| ==== Old firmwares ==== | ==== Old firmwares ==== | ||
| Line 51: | Line 56: | ||
| -> [[docs: | -> [[docs: | ||
| - | |||
| - | |||
| - | A [[# | ||
| ==== OEM installation using the TFTP method ==== | ==== OEM installation using the TFTP method ==== | ||
| - | For installing the Openwrt | + | For installing the OpenWrt |
| * Connect a [[docs: | * Connect a [[docs: | ||
| * Start a TFTP server in your PC. Copy the // | * Start a TFTP server in your PC. Copy the // | ||
| - | * Set the IP at your pc to 192.168.1.35 (or any compatible), | + | * Set the IP at your PC to 192.168.1.35 (or any compatible), |
| - | * Power ON the router, press any key in the serial console to break into the CFE command line interpreter. | + | * Press the reset button (**very important**), |
| * Execute the command: '' | * Execute the command: '' | ||
| This is a session of flashing via TFTP: | This is a session of flashing via TFTP: | ||
| Line 77: | Line 79: | ||
| </ | </ | ||
| - | === CFE upgrade === | + | You may have to try several times, because |
| - | If you want to have a web server for easy flashing you can upgrade | + | |
| - | <WRAP center round download 60%> | ||
| - | [[https:// | ||
| - | |||
| - | </ | ||
| - | |||
| - | Use the same procedure, as described above. This is a session of upgrading the bootloader | ||
| - | <WRAP bootlog> | ||
| - | < | ||
| - | Build Date: Sun Jul 24 16:58:20 CST 2011 (wangxinfeng@build.huawei.com) | ||
| - | Copyright (C) 2000-2008 Broadcom Corporation. | ||
| - | |||
| - | Parallel flash device: name AM29LV320MT, | ||
| - | CPU type 0x2A031: 400MHz, Bus: 160MHz, Ref: 64MHz | ||
| - | CPU running TP0 | ||
| - | Total memory: 33554432 bytes (32MB) | ||
| - | Boot Address 0xb8000000 | ||
| - | |||
| - | |||
| - | Board IP address | ||
| - | Host IP address | ||
| - | Gateway IP address | ||
| - | Run from flash/host (f/h) : f | ||
| - | Default host run file name : vmlinux | ||
| - | Default host flash file name : bcm963xx_fs_kernel | ||
| - | Boot delay (0-9 seconds) | ||
| - | Boot image (0=latest, 1=previous) : 0 | ||
| - | Board Id (0-5) : 96368MVWG_hg622 | ||
| - | Number of MAC Addresses (1-32) | ||
| - | Base MAC Address | ||
| - | PSI Size (1-64) KBytes | ||
| - | Main Thread Number [0|1] : 0 | ||
| - | |||
| - | *** Press any key to stop auto run (3 seconds) *** | ||
| - | Auto run second count down: 1 | ||
| - | web info: Waiting for connection on socket 0. | ||
| - | CFE> | ||
| - | CFE> f 192.168.1.100: | ||
| - | Loading 192.168.1.100: | ||
| - | Finished loading 87360 bytes | ||
| - | |||
| - | Flashing CFE: .. | ||
| - | |||
| - | readNvramData() CRC ERROR !!!!!! | ||
| - | |||
| - | writeNvramData | ||
| - | |||
| - | Flashing root file system and kernel at 0xb8020000: .. | ||
| - | |||
| - | |||
| - | Clear Flags ok! | ||
| - | . | ||
| - | *** Image flash done *** ! | ||
| - | |||
| - | CFE timeout, | ||
| - | |||
| - | Resetting board... | ||
| - | |||
| - | CFE version 2.0.3 for BCM63XX (32bit, | ||
| - | Build Date: Tue Dec 15 18:07:41 CET 2015 (dani@tool) | ||
| - | Copyright (C) 2000-2009 Broadcom Corporation. | ||
| - | |||
| - | Parallel flash device: name AM29LV320MT, | ||
| - | Total Flash size: 16384K with 128 sectors | ||
| - | Chip ID: BCM6368B2, MIPS: 400MHz | ||
| - | Main Thread: TP0 | ||
| - | Total Memory: 33554432 bytes (32MB) | ||
| - | Boot Address: 0xb8000000 | ||
| - | |||
| - | *** Upgrading NVRAM (version 5 to version 6) *** | ||
| - | |||
| - | Board IP address | ||
| - | Host IP address | ||
| - | Gateway IP address | ||
| - | Run from flash/host (f/h) : f | ||
| - | Default host run file name : vmlinux | ||
| - | Default host flash file name : bcm963xx_fs_kernel | ||
| - | Boot delay (0-9 seconds) | ||
| - | Board Id (0-15) | ||
| - | Number of MAC Addresses (1-32) | ||
| - | Base MAC Address | ||
| - | PSI Size (1-64) KBytes | ||
| - | Enable Backup PSI [0|1] : 0 | ||
| - | System Log Size (0-256) KBytes | ||
| - | Main Thread Number [0|1] : 0 | ||
| - | Voice Board Configuration (0-19) | ||
| - | |||
| - | *** Press any key to stop auto run (3 seconds) *** | ||
| - | Auto run second count down: 0 | ||
| - | Booting from only image (0xb8020000) ... | ||
| - | Code Address: 0x00000000, Entry Address: 0x00000000 | ||
| - | Failed to decompress image. | ||
| - | web info: Waiting for connection on socket 0. | ||
| - | web info: Waiting for connection on socket 1. | ||
| - | web info: Waiting for connection on socket 2. | ||
| - | web info: Waiting for connection on socket 0. | ||
| - | web info: Waiting for connection on socket 1. | ||
| - | web info: Waiting for connection on socket 3. | ||
| - | web warning: Unexpected TCP disconnect. | ||
| - | web warning: Unexpected TCP disconnect. | ||
| - | web warning: Unexpected TCP disconnect. | ||
| - | web info: Waiting for connection on socket 0. | ||
| - | web info: Upload 4587524 bytes, Broadcom image format. | ||
| - | CFE> | ||
| - | |||
| - | </ | ||
| - | </ | ||
| - | After CFE upgrade you will have a web server at '' | ||
| ==== Flash Layout ==== | ==== Flash Layout ==== | ||
| Line 230: | Line 124: | ||
| How to connect to the Serial Port of this specific device: | How to connect to the Serial Port of this specific device: | ||
| - | ^ J4 ^ | + | |
| - | | TX | | + | ^ J4 ^ |
| - | | GND | | + | | TX | |
| - | | VCC | | + | | GND |
| - | | nc | | + | | VCC |
| - | | RX | | + | | nc | |
| + | | RX | | ||
| Serial works at 3.3V 115200N1, see pin assignments above | Serial works at 3.3V 115200N1, see pin assignments above | ||
| |< | |< | ||
| Line 242: | Line 138: | ||
| Parity | Parity | ||
| Flow control | Flow control | ||
| - | |||
| - | |||
| Line 253: | Line 147: | ||
| {{media: | {{media: | ||
| - | ^ J5 ^ | + | < |
| - | | TDI | | + | # |
| - | | TMS | | + | TX | #-# | .-. | TDI |
| - | | TDO | | + | | #-# | ' |
| - | | TRST | | + | | |
| - | | TCK | | + | GND | .-. | .-. | TMS |
| + | | ' | ||
| + | | | ||
| + | VCC | .-. | .-. | TDO | ||
| + | | ' | ||
| + | | | ||
| + | NC | .-. | .-. | TRST | ||
| + | | ' | ||
| + | | | ||
| + | RX | .-. | .-. | TCK | ||
| + | | ' | ||
| + | # | ||
| + | | ||
| + | </ | ||
| === URJTAG === | === URJTAG === | ||
| Line 299: | Line 207: | ||
| You can use a different JTAG cable, only the first line will be different | You can use a different JTAG cable, only the first line will be different | ||
| + | |||
| ^ JTAG adapter ^ command ^ | ^ JTAG adapter ^ command ^ | ||
| | Altera USB Blaster adapter | < | | Altera USB Blaster adapter | < | ||
| | [[docs: | | [[docs: | ||
| - | | [[docs: | + | | [[docs: |
| Line 332: | Line 241: | ||
| - | ===== Bootloader mods ===== | + | ===== Backup and restore Wifi calibration data ===== |
| + | In theory each wifi chip (it doesn' | ||
| + | * Without the cal_data, wifi will not work | ||
| + | * The WLAN calibration data is specific for your device, i.e. cal_data from another device will most likely not work | ||
| + | * If you wipe it accidentially it will be difficult to restore | ||
| + | * It cannot be restored by flashing back a vendor firmware | ||
| + | |||
| + | -> It's a good idea to backup this partition **before** flashing OpenWrt. | ||
| + | |||
| + | |||
| + | ==== Backup cal_data partition ==== | ||
| + | A serial to TTL converter is needed to access the router' | ||
| + | |||
| + | What we need is to save the information that contains the partition cal_data, but the command " | ||
| + | < | ||
| + | But there are only valid data from 0 to 200, so we would use this one: | ||
| + | < | ||
| + | With the execution of this command we will obtain a console dump. | ||
| + | The content of the cal_data partition is something like this: | ||
| + | < | ||
| + | b8fa0010: 00 00 62 30 14 18 00 00 01 00 6a ff 0c 00 ff ff ..b0......j..... | ||
| + | b8fa0020: ff ff ff ff b0 92 ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0030: ff ff ff ff 22 08 24 00 ff ff 2d 01 ff ff d9 fa ...." | ||
| + | b8fa0040: cc 88 ff ff 0d ff 00 00 03 00 00 00 00 00 ff ff ................ | ||
| + | b8fa0050: ff ff 11 11 10 10 0f 0f 0e 0e 0d 0d 0c 0c 0c 0c ................ | ||
| + | b8fa0060: 09 09 08 08 07 07 07 07 08 08 08 08 08 08 ff ff ................ | ||
| + | b8fa0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa00a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 55 55 ..............UU | ||
| + | b8fa00e0: 88 88 77 77 66 66 66 66 66 66 66 66 66 66 66 66 ..wwffffffffffff | ||
| + | b8fa00f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa0190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| + | b8fa01f0: ff ff ff ff ff ff ff ff ff ff ff ff ff 06 86 93 ................ | ||
| + | </ | ||
| + | |||
| + | We select the text in the console, copy it and paste it in a text editor, then open a hex editor and copy and paste only the hexadecimal part of each of the lines, until we have in the hex editor the same as in the dump. It just takes a little patience. Do it so because when you paste the text of the console in the hex editor, you also copy the memory pointers and the ascii part, so the final result is not valid. Now we just need to save the file, for example cal_data_hg622.bin. There is an easy way below. | ||
| + | |||
| + | Now we install OpenWrt, and once installed, we copy the file with the calibration data to the router. To do so we use WinSCP, we will copy the file cal_data_hg622.bin to the folder "/ | ||
| + | The problem is that the partitions are protected and can not be modified, to do so we will have to install the **kmod-mtd-rw** module, which allows us to modify the partitions if we execute the command '' | ||
| + | <WRAP center round download 60%> | ||
| + | If you lost your calibration data, here is the cal_data partition for this model: | ||
| + | {{: | ||
| + | </ | ||
| + | ==== Restore cal_data partition ==== | ||
| + | If you have already lost the calibration data, download {{: | ||
| + | |||
| + | First of all, transfer the cal_data_hg622.bin file into your router with WinSCP to "/ | ||
| + | |||
| + | The router has to have [[# | ||
| + | < | ||
| + | opkg install kmod-mtd-rw</ | ||
| + | With this we install the necessary module to unprotect the partitions, then execute | ||
| + | < | ||
| + | We can now modify the data of the partition cal_data. | ||
| + | |||
| + | **Optional**: | ||
| + | < | ||
| + | Then we check the partition mtd(x) that contains the calibration data by executing: | ||
| + | < | ||
| + | dev: size | ||
| + | mtd0: 00020000 00020000 " | ||
| + | mtd1: 00f80000 00020000 " | ||
| + | mtd2: 001a56a8 00020000 " | ||
| + | mtd3: 00dda858 00020000 " | ||
| + | mtd4: 00bc0000 00020000 " | ||
| + | mtd5: 00020000 00020000 " | ||
| + | mtd6: 00020000 00020000 " | ||
| + | And finally | ||
| + | < | ||
| + | * **Restart** OpenWrt and check if wifi works. | ||
| + | |||
| + | * Other considerations: | ||
| + | The MAC is in the first line, in this example it is "ac e8 7b 30 ef b4", but it is not the same as in the sticker, the last two characters are different "ac e8 7b 30 ef ac". Anyway if we start the router before making the modifications connected by serial port, we can find the line "Main bssid = ac: e8: 7b: 30: ef: b4", which as we see informs us of the MAC that appears in the calibration data. Now we just have to edit the file with hex editor and put the MAC of our router, and then follow the whole procedure. | ||
| + | |||
| + | If you accidentially erased your cal_data partition and you didn't make your own backup, you can use the above data to fill the erased partition (note the MAC address is specific for each calibration data). Or try this: | ||
| + | * Generate a bin file with the cal_data. You don't need to do this step if you already have your own backup. Make it at your PC with a **linux** distro:< | ||
| + | * Also, if you don't have a **linux** distro, copy the next content in a hex editor:< | ||
| + | |||
| + | * Now transfer the **cal_data_hg622.bin** file into your router and flash the **cal_data** partition< | ||
| + | * **Restart** OpenWrt and check if wifi works. | ||
| + | |||
| + | ==== Basic internet configuration ==== | ||
| + | You can set a basic internet configuration with uci commands. Assuming your main router (gateway) has the IP 192.168.1.1 (the most common). Follow these steps. | ||
| + | |||
| + | - Connect only the ethernet cable from the HG622 to your computer, and telnet it or ssh. | ||
| + | - Execute these commands < | ||
| + | uci set network.lan.netmask=255.255.255.0 | ||
| + | uci set network.lan.gateway=192.168.1.1 | ||
| + | uci set network.lan.dns=' | ||
| + | uci commit network</ | ||
| + | - You may also need to disable the dhcp server < | ||
| + | - Reboot the HG622 and connect the ethernet cable to the main router (gateway). | ||
| + | - Now the HG622 IP is 192.168.1.254, | ||
| + | - Ping any internet address, or install a package < | ||
| + | opkg install luci</ | ||
| + | |||
| + | |||
| + | ===== Bootloader mods ===== | ||
| ^ bootloader ^ download link ^ description ^ | ^ bootloader ^ download link ^ description ^ | ||
| - | | CFE | [[https:// | + | | CFE | [[https:// |
| + | |||
| + | ==== CFE upgrade ==== | ||
| + | If you want to have a web server for easy flashing you can upgrade the bootloader with a new modded one. | ||
| + | |||
| + | <WRAP center round download 60%> | ||
| + | [[https:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | Use the same procedure, as described above. This is a session of upgrading the bootloader | ||
| + | <WRAP bootlog> | ||
| + | < | ||
| + | Build Date: Sun Jul 24 16:58:20 CST 2011 (wangxinfeng@build.huawei.com) | ||
| + | Copyright (C) 2000-2008 Broadcom Corporation. | ||
| + | |||
| + | Parallel flash device: name AM29LV320MT, | ||
| + | CPU type 0x2A031: 400MHz, Bus: 160MHz, Ref: 64MHz | ||
| + | CPU running TP0 | ||
| + | Total memory: 33554432 bytes (32MB) | ||
| + | Boot Address 0xb8000000 | ||
| + | |||
| + | |||
| + | Board IP address | ||
| + | Host IP address | ||
| + | Gateway IP address | ||
| + | Run from flash/host (f/h) : f | ||
| + | Default host run file name : vmlinux | ||
| + | Default host flash file name : bcm963xx_fs_kernel | ||
| + | Boot delay (0-9 seconds) | ||
| + | Boot image (0=latest, 1=previous) : 0 | ||
| + | Board Id (0-5) : 96368MVWG_hg622 | ||
| + | Number of MAC Addresses (1-32) | ||
| + | Base MAC Address | ||
| + | PSI Size (1-64) KBytes | ||
| + | Main Thread Number [0|1] : 0 | ||
| + | |||
| + | *** Press any key to stop auto run (3 seconds) *** | ||
| + | Auto run second count down: 1 | ||
| + | web info: Waiting for connection on socket 0. | ||
| + | CFE> | ||
| + | CFE> f 192.168.1.100: | ||
| + | Loading 192.168.1.100: | ||
| + | Finished loading 87360 bytes | ||
| + | |||
| + | Flashing CFE: .. | ||
| + | |||
| + | readNvramData() CRC ERROR !!!!!! | ||
| + | |||
| + | writeNvramData | ||
| + | |||
| + | Flashing root file system and kernel at 0xb8020000: .. | ||
| + | |||
| + | |||
| + | Clear Flags ok! | ||
| + | . | ||
| + | *** Image flash done *** ! | ||
| + | |||
| + | CFE timeout, | ||
| + | |||
| + | Resetting board... | ||
| + | |||
| + | CFE version 2.0.3 for BCM63XX (32bit, | ||
| + | Build Date: Tue Dec 15 18:07:41 CET 2015 (dani@tool) | ||
| + | Copyright (C) 2000-2009 Broadcom Corporation. | ||
| + | |||
| + | Parallel flash device: name AM29LV320MT, | ||
| + | Total Flash size: 16384K with 128 sectors | ||
| + | Chip ID: BCM6368B2, MIPS: 400MHz | ||
| + | Main Thread: TP0 | ||
| + | Total Memory: 33554432 bytes (32MB) | ||
| + | Boot Address: 0xb8000000 | ||
| + | |||
| + | *** Upgrading NVRAM (version 5 to version 6) *** | ||
| + | |||
| + | Board IP address | ||
| + | Host IP address | ||
| + | Gateway IP address | ||
| + | Run from flash/host (f/h) : f | ||
| + | Default host run file name : vmlinux | ||
| + | Default host flash file name : bcm963xx_fs_kernel | ||
| + | Boot delay (0-9 seconds) | ||
| + | Board Id (0-15) | ||
| + | Number of MAC Addresses (1-32) | ||
| + | Base MAC Address | ||
| + | PSI Size (1-64) KBytes | ||
| + | Enable Backup PSI [0|1] : 0 | ||
| + | System Log Size (0-256) KBytes | ||
| + | Main Thread Number [0|1] : 0 | ||
| + | Voice Board Configuration (0-19) | ||
| + | |||
| + | *** Press any key to stop auto run (3 seconds) *** | ||
| + | Auto run second count down: 0 | ||
| + | Booting from only image (0xb8020000) ... | ||
| + | Code Address: 0x00000000, Entry Address: 0x00000000 | ||
| + | Failed to decompress image. | ||
| + | web info: Waiting for connection on socket 0. | ||
| + | web info: Waiting for connection on socket 1. | ||
| + | web info: Waiting for connection on socket 2. | ||
| + | web info: Waiting for connection on socket 0. | ||
| + | web info: Waiting for connection on socket 1. | ||
| + | web info: Waiting for connection on socket 3. | ||
| + | web warning: Unexpected TCP disconnect. | ||
| + | web warning: Unexpected TCP disconnect. | ||
| + | web warning: Unexpected TCP disconnect. | ||
| + | web info: Waiting for connection on socket 0. | ||
| + | web info: Upload 4587524 bytes, Broadcom image format. | ||
| + | CFE> | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | After CFE upgrade you will have a web server at '' | ||
| ===== OpenWrt bootlog ===== | ===== OpenWrt bootlog ===== | ||
| Line 509: | Line 644: | ||
| [ | [ | ||
| </ | </ | ||
| - | |||
| - | |||
| - | ==== Wifi calibration data ==== | ||
| - | In theory each wifi chip (it doesn' | ||
| - | |||
| - | * Procedure to extract the data from the cal_data partition: | ||
| - | A serial to TTL converter is needed to access the router' | ||
| - | |||
| - | What we need is to save the information that contains the partition cal_data, but the command " | ||
| - | < | ||
| - | But there are only valid data from 0 to 200, so we would use this one: | ||
| - | < | ||
| - | With the execution of this command we will obtain a console dump. | ||
| - | The content of the cal_data partition is something like this: | ||
| - | < | ||
| - | b8fa0010: 00 00 62 30 14 18 00 00 01 00 6a ff 0c 00 ff ff ..b0......j..... | ||
| - | b8fa0020: ff ff ff ff b0 92 ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0030: ff ff ff ff 22 08 24 00 ff ff 2d 01 ff ff d9 fa ...." | ||
| - | b8fa0040: cc 88 ff ff 0d ff 00 00 03 00 00 00 00 00 ff ff ................ | ||
| - | b8fa0050: ff ff 11 11 10 10 0f 0f 0e 0e 0d 0d 0c 0c 0c 0c ................ | ||
| - | b8fa0060: 09 09 08 08 07 07 07 07 08 08 08 08 08 08 ff ff ................ | ||
| - | b8fa0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0090: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa00a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa00b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa00c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 55 55 ..............UU | ||
| - | b8fa00e0: 88 88 77 77 66 66 66 66 66 66 66 66 66 66 66 66 ..wwffffffffffff | ||
| - | b8fa00f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0110: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0120: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0130: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0140: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0150: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0160: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0170: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa0190: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ | ||
| - | b8fa01f0: ff ff ff ff ff ff ff ff ff ff ff ff ff 06 86 93 ................ | ||
| - | </ | ||
| - | |||
| - | We select the text in the console, copy it and paste it in a text editor, then open a hex editor and copy and paste only the hexadecimal part of each of the lines, until we have in the hex editor the same as in the dump. It just takes a little patience. Do it so because when you paste the text of the console in the hex editor, you also copy the memory pointers and the ascii part, so the final result is not valid. Now we just need to save the file, for example cal_data_hg622.bin. There is an easy way below. | ||
| - | |||
| - | Now we install OpenWrt, and once installed, we copy the file with the calibration data to the router. To do so we use WinSCP, we will copy the file cal_data_hg622.bin to the folder "/ | ||
| - | The problem is that the partitions are protected and can not be modified, to do so we will have to install the **kmod-mtd-rw** module, which allows us to modify the partitions if we execute the command " | ||
| - | |||
| - | * Procedure to restore the data to the cal_data partition: | ||
| - | The router has to have access to the internet, then we access the router by SSH and execute | ||
| - | < | ||
| - | opkg install kmod-mtd-rw</ | ||
| - | With this we install the necessary module to unprotect the partitions, then execute | ||
| - | < | ||
| - | We can now modify the data of the partition cal_data. | ||
| - | |||
| - | **Optional**: | ||
| - | < | ||
| - | Then we check the partition mtd(x) that contains the calibration data by executing: | ||
| - | < | ||
| - | dev: size | ||
| - | mtd0: 00020000 00020000 " | ||
| - | mtd1: 00f80000 00020000 " | ||
| - | mtd2: 001a56a8 00020000 " | ||
| - | mtd3: 00dda858 00020000 " | ||
| - | mtd4: 00bc0000 00020000 " | ||
| - | mtd5: 00020000 00020000 " | ||
| - | mtd6: 00020000 00020000 " | ||
| - | And finally | ||
| - | < | ||
| - | * **Restart** OpenWrt and check if wifi works. | ||
| - | |||
| - | * Other considerations: | ||
| - | The MAC is in the first line, in this example it is "ac e8 7b 30 ef b4", but it is not the same as in the sticker, the last two characters are different "ac e8 7b 30 ef ac". Anyway if we start the router before making the modifications connected by serial port, we can find the line "Main bssid = ac: e8: 7b: 30: ef: b4", which as we see informs us of the MAC that appears in the calibration data. Now we just have to edit the file with hex editor and put the MAC of our router, and then follow the whole procedure. | ||
| - | |||
| - | If you accidentally erased your cal_data partition and you didn't make your own bakcup, you can use the above data to fill the erased partition (note the MAC address is specific for each calibration data). Or try this: | ||
| - | * Generete a bin file with the cal_data. You don't need to do this step if already have your own backup. Make it at your PC with a **linux** distro:< | ||
| - | * Also, if you don't have a **linux** distro, copy the next content in a hex editor:< | ||
| - | |||
| - | * Now transfer the **cal_data_hg622.bin** file into your router and flash the **cal_data** partition< | ||
| - | * **Restart** OpenWrt and check if wifi works. | ||
| ===== Tags ===== | ===== Tags ===== | ||
| [[meta: | [[meta: | ||
| - | {{tag> | + | {{tag> |