Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
toh:huawei:hg622 [2018/03/04 12:01] bobafetthotmailtoh:huawei:hg622 [2023/05/21 16:58] – fix links danitool
Line 1: Line 1:
 ====== Huawei EchoLife HG622 ====== ====== Huawei EchoLife HG622 ======
-The HG622 is an adsl wifi router mainly distributed by [[wp>Jazztel]] to their customers. 
  
-{{:media:huawei:hg622.png?|}}+{{section>meta:infobox:432_warning#infobox_for_dataentries&noheader&nofooter&noeditbutton}} 
 +{{section>meta:infobox:broadcom_dsl#infobox_for_dataentries&noheader&nofooter&noeditbutton}}
  
-Supported since [[https://dev.openwrt.org/changeset/48305|r48305]] (Designated Driver)Internal xDSL modem NOT supported.+The HG622 is an ADSL wifi router mainly distributed by [[wp>Jazztel]] to their customers. 
 + 
 +{{:media:huawei:hg622:hg622.png|}} 
 + 
 + 
 +===== Supported Versions ===== 
 +---- datatable ---- 
 +cols    : Brand, Model, Supported Since Rel, Supported Current Rel, Forum search_search-forums, Device Techdata_pageid 
 +headers : Brand, Model, Supported Since, Current Release, Forum Search, Technical Data 
 +align   : c,c,c,c,c,c,
 +filter  : Model=HG622 
 +---- 
 + 
 +---- datatable ---- 
 +cols    : Unsupported Functions_unsupporteds 
 +filter  : Model=HG622 
 +----
  
  
 ===== Hardware Highlights ===== ===== Hardware Highlights =====
-SoC ^ Ram ^ Flash ^ Network ^ USB ^ Serial ^ JTag ^ +---- datatable ---- 
-| Broadcom 6368 | 32MiB | 16MiB | 4x| Yes | Yes | Yes |+cols    : Model, Versions, CPU, CPU MHz, Flash MB_mbflashs, RAM MB_mbram, WLAN Hardware, WLAN 2.4GHz, WLAN 5.0GHz, Ethernet 100M ports_, Ethernet Gbit ports_, Modem, USB ports_ 
 +header  : Model, Version,SoC,CPU MHz,Flash MB,RAM MB,WLAN Hardware,WLAN2.4,WLAN5.0,100M ports,Gbit ports,Modem,USB 
 +align   : c,c,c,c,c,c,c,c,c,c,c,c,
 +filter  : Model=HG622 
 +----
  
  
 ===== Installation ===== ===== Installation =====
-  → [[:downloads]] +---- datatable ---- 
-  → [[docs:guide-user:installation:generic.flashing|Install OpenWrt]] +cols    Model, Versions, Supported Current Rel, Firmware OpenWrt Install URL_url, Firmware OpenWrt Upgrade URL_url, Firmware OEM Stock URL_url 
-  - → [[:downloads|Latest OpenWrt release]]+headers Model, Version, Current Release, Firmware OpenWrt Install, Firmware OpenWrt Upgrade, Firmware OEM Stock 
 +align   : c,c,c 
 +filter  : Model=HG622 
 +----
  
-[[#serial|serial]] (UART) adapter is required to install OpenWrt+<WRAP center round important 60%> 
 +**Warning**: The **cal_data** partition got corrupted/erased after installing **17.01.6, 18.06.1 or 18.06.2 versions**, leaving the wifi not usable for any firmware unless you restore again this partition. See [[#backup_and_restore_wifi_calibration_data|instructions below]] how to backup and restore the cal_data partition. 
 + 
 +**BUG fixed** in this commit -> [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4b633affff972bf19|brcm63xx: drop linux,part-probe usage where possible]].  
 + 
 +**17.01.4 < <color red>Stable versions with the //cal_data// bug</color> < 18.06.4** 
 +</WRAP> 
 + 
 + 
 +==== Old firmwares ==== 
 +These firmwares were fully tested, and they're known to work 100% ok. 
 + 
 +^ Version ^ Release date ^ firmware link ^ Notes ^ kernel ^ Tested ^ 
 +| **LEDE Reboot 17.01.4 r3560** | 2017 Oct | http://downloads.lede-project.org/releases/17.01.4/targets/brcm63xx/generic/ | LuCI included, USB and wireless drivers included, Based on OpenWrt. cal_data partition must be restored from previous backup. | 4.4.92 |  ✔  | 
 + 
 +-> [[docs:guide-user:installation:generic.flashing|Install OpenWrt (generic explanation)]]
  
-**Available firmwares:** 
-^ Version ^ link ^ notes ^ 
-| trunk | https://downloads.openwrt.org/snapshots/trunk/brcm63xx/smp/openwrt-brcm63xx-smp-HG622-squashfs-cfe.bin | xDSL, VoIP/FXS not supported | 
-| Barrier Breaker 14.07 | <nowiki>git clone git://github.com/openwrt-es/openwrt.git -b bb-14.07-rc3</nowiki> | xDSL, VoIP/FXS not supported | 
  
 ==== OEM installation using the TFTP method ==== ==== OEM installation using the TFTP method ====
  
-For installing the Openwrt firmware you will need to use the CFE serial console: +For installing the OpenWrt firmware you will need to use the CFE serial console: 
-  * Connect a [[docs:hardware:port.serial|serial]] TTL cable to send commands to CFE via serial console software, for loading the firmware via TFTP.+  * Connect a [[docs:techref:hardware:port.serial|serial]] TTL cable to send commands to CFE via serial console software, for loading the firmware via TFTP.
   * Start a TFTP server in your PC. Copy the //**firmware.bin**// file to the TFTP server's directory.   * Start a TFTP server in your PC. Copy the //**firmware.bin**// file to the TFTP server's directory.
-  * Set the IP at your pc to 192.168.1.35 (or any compatible), and connect the ethernet cable to the router. +  * Set the IP at your PC to 192.168.1.35 (or any compatible), and connect the ethernet cable to the router. 
-  * 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**), and power ON the router while continue pressing the reset button till you see the CFE command line interpreter. It seems that if the reset button is not pressed, the integrated TFTP client does not activate.
   * Execute the command: ''f 192.168.1.35:firmware.bin''   * Execute the command: ''f 192.168.1.35:firmware.bin''
 This is a session of flashing via TFTP: This is a session of flashing via TFTP:
Line 45: Line 79:
 </code> </code>
  
-=== CFE upgrade === +You may have to try several times, because the time window the TFTP client has to connect to the TFTP server is very short. 
-If you want to have a web server for easy flashing you can upgrade the bootloader with a new modded one+ 
 + 
 +==== Flash Layout ==== 
 +Please check out the article [[docs:techref:flash.layout]]. It contains an example and a couple of explanations. 
 + 
 +^ partition   ^ name              ^ filesystem       ^ function                                                           ^ 
 +| mtd0        | **CFE**           | n/a              | bootloader                                                         | 
 +| mtd1        | **kernel**        | RAM executable   | kernel                                                             | 
 +| mtd2        | **rootfs**        | squashfs         | root                                                               | 
 +| mtd3        | **rootfs_data**   | jffs2            | configuration, install new packages                                | 
 +| mtd4        | **cal_data**      | n/a              | wifi calibration data **RT3062F eeprom is at 0x0FA0000 offset.**   | 
 +| mtd5        | **nvram**         | n/a              | OEM configuration data                                             | 
 +| mtd6        | **linux**         | n/a              | OpenWrt upgrade                                                    | 
 + 
 +===== Hardware ===== 
 + 
 +==== Info ==== 
 +^ [[wp>Instruction set]]       | [[wp>MIPS architecture|MIPS]] | 
 +^ Vendor                       | [[wp>Broadcom]] | 
 +^ [[docs:techref:bootloader]]  | [[docs:techref:bootloader:cfe]] | 
 +^ Board ID      | 96368MVWG_hg622 
 +^ [[docs:techref:hardware:soc|System-On-Chip]]  | Broadcom BCM6368 | 
 +^ [[docs:techref:hardware:cpu|CPU]]/Speed       | BMIPS4350 v3.1 dual core / 400 MHz | 
 +^ Flash-Chip    | MX29GL128EHT2I-90G / 128KB block size x 128 blocks | 
 +^ Flash size    | 16 MiB | 
 +^ RAM           | 32 MiB / DDR-400 | 
 +^ Wireless      | Ralink RT3062 802.11b/g/n (onboard) | 
 +^ Antenna       | 2x PCB | 
 +^ Ethernet      | Broadcom integrated, fast ethernet | 
 +^ USB           | 1 x USB2.0 | 
 +^ ADSL Modem    | Yes, NOT SUPPORTED | 
 +^ Power adapter | ? | 
 +^ [[docs:techref:hardware:port.serial|Serial]]  | [[#Serial|Yes]] | 
 +^ [[docs:techref:hardware:port.jtag|JTAG]]      | [[#JTAG|Yes]] 
 + 
 +==== PCB pictures ==== 
 + 
 +{{media:huawei:hg622_pcb_top.jpg?400x300|}} {{media:huawei:hg622_pcb_bottom.jpg?400x300|}} 
 + 
 + 
 +==== Serial ==== 
 +-> [[docs:techref:hardware:port.serial]] general information about the serial port, serial port cable, etc. 
 + 
 +How to connect to the Serial Port of this specific device: 
 + 
 +^ J4    ^ 
 +| TX    | 
 +| GND   | 
 +| VCC   | 
 +| nc    | 
 +| RX    | 
 + 
 +Serial works at 3.3V 115200N1, see pin assignments above 
 +|<code>Speed (baud)     - 115200 
 +Data bits        - 8 
 +Stop bits        - 1 
 +Parity           - None 
 +Flow control     - None</code>
 + 
 + 
 +==== JTAG ==== 
 +-> [[docs:techref:hardware:port.jtag]] general information about the JTAG port, JTAG cable, etc. 
 + 
 +How to connect to the JTAG Port of this specific device: 
 + 
 +{{media:huawei:hg622_jtag.jpg?direct&300|}} 
 + 
 +<a2s> 
 +         #-----+-----# 
 +      TX | #-# | .-. | TDI 
 +         | #-# | '-'
 +                 | 
 +     GND | .-. | .-. | TMS 
 +         | '-' | '-'
 +                 | 
 +     VCC | .-. | .-. | TDO 
 +         | '-' | '-'
 +                 | 
 +      NC | .-. | .-. | TRST 
 +         | '-' | '-'
 +                 | 
 +      RX | .-. | .-. | TCK 
 +         | '-' | '-'
 +         #-----+-----# 
 +           J4     J5  
 +</a2s> 
 + 
 + 
 +=== URJTAG === 
 + 
 +Using the urJtag with an FT2232H you can read the flash chip. 
 + 
 +urjtag command file used: 
 + 
 +<code>cable FT2232H vid=xxx pid=xxx 
 +endian big 
 +detect 
 + 
 +register BR 1 
 +register DIR 32 
 +register EJIMPCODE 32 
 +register EJADDRESS 32 
 +register EJDATA 32 
 +register EJCONTROL 32 
 +register EJALL 96 
 + 
 +instruction length 5 
 +instruction BYPASS 11111 BR 
 +instruction IDCODE 00001 DIR 
 +instruction EJTAG_IMPCODE 00011 EJIMPCODE 
 +instruction EJTAG_ADDRESS 01000 EJADDRESS 
 +instruction EJTAG_DATA 01001 EJDATA 
 +instruction EJTAG_CONTROL 01010 EJCONTROL 
 +instruction EJTAG_ALL 01011 EJALL 
 + 
 +instruction IDCODE 
 +shift ir 
 +shift dr 
 +dr 
 + 
 +initbus ejtag 
 + 
 +detectflash 0x38000000 
 + 
 +readmem 0x38000000 0x020000 hg622-CFE.bin</code> 
 + 
 +You can use a different JTAG cable, only the first line will be different 
 + 
 +^ JTAG adapter ^ command ^ 
 +| Altera USB Blaster adapter | <code>cable usbblaster</code> |  
 +| [[docs:techref:hardware:port.jtag.cable.buffered|WIGGLER parallel port adapter]] | <code>cable wiggler ppdev /dev/parport0</code>
 +| [[docs:techref:hardware:port.jtag.cable.unbuffered|DLC5 parallel port adapter]]  | <code>cable dlc5 ppdev /dev/parport0</code>
 + 
 + 
 +=== ZJTAG === 
 + 
 +and using zjtag(version 1.5) 
 +  * to detect flash chip:<code>zjtag -probeonly /window:18000000 /nompi</code>  
 +  * to backup all flash: <code>zjtag -backup:custom /window:18000000 /start:18000000 /length:1000000 /nompi</code> 
 + 
 +==== GPIOs ==== 
 + 
 +=== LEDs === 
 +Read: [[docs:guide-user:base-system:led_configuration|System configuration: Leds]] to configure the leds 
 +^ GPIO                       ^ symbol   ^ Active   ^ 
 +| 2                          | adsl     | Low      | 
 +| 5                          | inet     | Low      | 
 +| 11                         | usb      | Low      | 
 +| 22                         | power    | Low      | 
 +| 6 (PINMUX_EPHY0_ACT_LED)   | lan1     | Low      | 
 +| 7 (PINMUX_EPHY1_ACT_LED)   | lan2     | Low      | 
 +| 8 (PINMUX_EPHY2_ACT_LED)   | lan3     | Low      | 
 +| 9 (PINMUX_EPHY3_ACT_LED)   | lan4     | Low      | 
 + 
 + 
 +=== Buttons === 
 +-> [[docs:guide-user:hardware:hardware.button]] on howto use and configure the hardware button(s). 
 +^ GPIO   ^ Event   ^ Active   ^ 
 +| 34     | Reset   | Low      | 
 + 
 + 
 +===== Backup and restore Wifi calibration data ===== 
 +In theory each wifi chip (it doesn't matter if they are exactly the same model) has its own wifi calibration data. In this router the data is stored in an area of the flash chip. This area is the cal_data partiton in OpenWrt firmwares. 
 + 
 +  * 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's CFE console, once connected, we turn on the router and we have three seconds to press the space bar to stop the boot and access the CFE command line. The command line will only be available for a few seconds, the router restarts automatically if we do not enter commands or take a long time to write them, so we have to be very quick to execute the commands. It is best to write the commands that we will use in a text editor, copy them and then simply paste them on the command line by pressing the right mouse button. Do not use ctrl + v. 
 + 
 +What we need is to save the information that contains the partition cal_data, but the command "save" is not available, so we will have to use the command "dm" (dump). In this router the cal_data partition has a size of 20000 starting at the pointer B8FA0000 and the command to use would be like this: 
 +<code>dm B8FA0000 20000</code> 
 +But there are only valid data from 0 to 200, so we would use this one: 
 +<code>dm B8FA0000 200</code> 
 +With the execution of this command we will obtain a console dump. 
 +The content of the cal_data partition is something like this: 
 +<code>b8fa0000: 62 30 01 00 ac e8 7b 30 ef b4 62 30 14 18 01 80    b0....{0..b0.... 
 +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    ................ 
 +</code> 
 + 
 +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 "/etc" in the router and we will have it available to restore the calibration data. 
 +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 ''insmod mtd-rw i_want_a_brick=1''
 +<WRAP center round download 60%> 
 +If you lost your calibration data, here is the cal_data partition for this model: 
 +{{:media:huawei:hg622:cal_data_hg622.rar|}} 
 +</WRAP> 
 +==== Restore cal_data partition ==== 
 +If you have already lost the calibration data, download {{:media:huawei:hg622:cal_data_hg622.rar|}} and follow these instructions: 
 + 
 +First of all, transfer the cal_data_hg622.bin file into your router with WinSCP to "/etc" folder. 
 + 
 +The router has to have [[#Basic_internet_configuration|access to the internet]], then we access the router by SSH and execute 
 +<code>opkg update 
 +opkg install kmod-mtd-rw</code> 
 +With this we install the necessary module to unprotect the partitions, then execute 
 +<code>insmod mtd-rw i_want_a_brick=1</code> 
 +We can now modify the data of the partition cal_data. 
 + 
 +**Optional**: If you have installed the snapshot version, it will be useful to have Luci 
 +<code>opkg install luci</code> 
 +Then we check the partition mtd(x) that contains the calibration data by executing: 
 +<code>root@OpenWrt:~#cat /proc/mtd 
 +dev:    size   erasesize  name 
 +mtd0: 00020000 00020000 "CFE" 
 +mtd1: 00f80000 00020000 "linux" 
 +mtd2: 001a56a8 00020000 "kernel" 
 +mtd3: 00dda858 00020000 "rootfs" 
 +mtd4: 00bc0000 00020000 "rootfs_data" 
 +mtd5: 00020000 00020000 "cal_data" 
 +mtd6: 00020000 00020000 "nvram"</code> 
 +And finally 
 +<code>dd if=/etc/cal_data_hg622.bin of=/dev/mtd5  *File names are case sensitive</code> 
 +  * **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:<code>echo '62300100ACE87B30EFB4623014180180000062301418000001006AFF0C00FFFFFFFFFFFFB092FFFFFFFFFFFFFFFFFFFFFFFFFFFF22082400FFFF2D01FFFFD9FACC88FFFF0DFF0000030000000000FFFFFFFF111110100F0F0E0E0D0D0C0C0C0C0909080807070707080808080808FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF555588887777666666666666666666666666FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF068693' | xxd -r -p > cal_data_hg622.bin</code> 
 +  * Also, if you don't have a **linux** distro, copy the next content in a hex editor:<code>62300100ACE87B30EFB4623014180180000062301418000001006AFF0C00FFFFFFFFFFFFB092FFFFFFFFFFFFFFFFFFFFFFFFFFFF22082400FFFF2D01FFFFD9FACC88FFFF0DFF0000030000000000FFFFFFFF111110100F0F0E0E0D0D0C0C0C0C0909080807070707080808080808FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF555588887777666666666666666666666666FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF068693</code> 
 + 
 +  * Now transfer the **cal_data_hg622.bin** file into your router and flash the **cal_data** partition<code>mtd write /etc/cal_data_hg622.bin cal_data</code> or <code>dd if=/etc/cal_data_hg622.bin of=/dev/mtd5  *File names are case sensitive</code> 
 +  * **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 <code>uci set network.lan.ipaddr=192.168.1.254 
 +uci set network.lan.netmask=255.255.255.0 
 +uci set network.lan.gateway=192.168.1.1 
 +uci set network.lan.dns='8.8.8.8 192.168.1.1' 
 +uci commit network</code> 
 +  - You may also need to disable the dhcp server <code>/etc/init.d/dnsmasq disable</code> 
 +  - Reboot the HG622 and connect the ethernet cable to the main router (gateway). 
 +  - Now the HG622 IP is 192.168.1.254, telnet or ssh it. 
 +  - Ping any internet address, or install a package <code>opkg update 
 +opkg install luci</code> 
 + 
 + 
 +===== Bootloader mods ===== 
 + 
 +^ bootloader ^ download link ^ description ^ 
 +| CFE | [[https://drive.google.com/uc?export=download&id=1bh67A4yjtGy2kTaa7hVKcNS8r876ylgf|CFE-HG622-CUSTOM.bin]]| moded bootloader: web interface added, reset button detect for stopping the bootloader, no double image, no rootfs CRC check | 
 + 
 +==== 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%> <WRAP center round download 60%>
-[[https://drive.google.com/uc?export=download&id=0B-EMoBe-_OdBX1MtTjMyWXBjbXM|CFE_HG622-dummy_firmware.bin]] (dummy firmware, only CFE and void firmware)+[[https://drive.google.com/uc?export=download&id=17sx3piiqlSo584fOJJXWWZjKbvytnSag|CFE_HG622-dummy_firmware.bin]] (dummy firmware, only CFE and void firmware)
  
 </WRAP> </WRAP>
Line 151: Line 468:
 web info: Upload 4587524 bytes, Broadcom image format. web info: Upload 4587524 bytes, Broadcom image format.
 CFE> CFE>
- 
 </nowiki> </nowiki>
 </WRAP>\\ </WRAP>\\
-After CFE upgrade you will have a web server at http://192.168.1.1/ for upgrading new firmwares. No need anymore the serial console, just press the reset button when powering on the router and wait for accesing the CFE webserver flashing interface. 
  
-==== Flash Layout ==== +After CFE upgrade you will have a web server at ''%%http://192.168.1.1/%%'' for upgrading new firmwares. No need anymore the serial console, just press the reset button when powering on the router and wait for accessing the CFE webserver flashing interface.
-Please check out the article [[docs:techref:flash.layout]]It contains an example and a couple of explanations.+
  
-^ partition ^ name ^ filesystem ^ function ^ +===== OpenWrt bootlog =====
-| mtd0 | **CFE** | n/a | bootloader | +
-| mtd1 | **kernel** | RAM executable | kernel | +
-| mtd2 | **rootfs** | squashfs | root | +
-| mtd3 | **rootfs_data** | jffs2 | configuration, install new packages | +
-| mtd4 | **cal_data** | n/a | wifi calibration data **RT3062F eeprom is at 0x0FA0000 offset.** | +
-| mtd5 | **nvram** | n/a | OEM configuration data | +
-| mtd6 | **linux** | n/a | OpenWrt upgrade | +
-===== Hardware ===== +
- +
-==== Info ==== +
-| **[[wp>Instruction set]]:**    | [[wp>MIPS architecture|MIPS]] | +
-| **Vendor:**          | [[wp>Broadcom]] | +
-| **[[docs:techref:bootloader]]:**     | [[docs:techref:bootloader:cfe]] | +
-| **Board ID:**      | 96368MVWG_hg622 +
-| **[[docs:hardware:soc|System-On-Chip]]:**  | Broadcom BCM6368 | +
-| **[[docs:hardware:cpu|CPU]]/Speed**        | BMIPS4350 v3.1 dual core / 400 MHz | +
-| **Flash-Chip:**      | MX29GL128EHT2I-90G / 128KB block size x 128 blocks | +
-| **Flash size** | 16 MiB | +
-| **RAM** | 32 MiB / DDR-400 | +
-| **Wireless** | Ralink RT3062 802.11b/g/n (onboard) | +
-| **Antenna** | 2x PCB | +
-| **Ethernet:**        | Broadcom integrated, fast ethernet | +
-| **USB** | 1 x USB2.0 | +
-| **ADSL Modem:** | Yes, NOT SUPPORTED | +
-| **Power adapter** | ? | +
-| **[[docs:hardware:port.serial|Serial]]:**          | [[#Serial|Yes]] | +
-| **[[docs:hardware:port.jtag|JTAG]]:**            | [[#JTAG|Yes]] +
- +
-==== PCB pictures ==== +
- +
-{{media:huawei:hg622_pcb_top.jpg?400x300|}} {{media:huawei:hg622_pcb_bottom.jpg?400x300|}} +
- +
- +
-==== Serial ==== +
--> [[docs:hardware:port.serial]] general information about the serial port, serial port cable, etc. +
- +
-How to connect to the Serial Port of this specific device: +
-^ J4  ^ +
-| TX  | +
-| GND | +
-| VCC | +
-| nc  | +
-| RX  | +
-Serial works at 3.3V 115200N1, see pin assignments above +
-|<code>Speed (baud)     - 115200 +
-Data bits        - 8 +
-Stop bits        - 1 +
-Parity           - None +
-Flow control     - None</code>+
- +
- +
- +
- +
-==== JTAG ==== +
--> [[docs:hardware:port.jtag]] general information about the JTAG port, JTAG cable, etc. +
- +
-How to connect to the JTAG Port of this specific device: +
- +
-{{media:huawei:hg622_jtag.jpg?direct&300|}} +
- +
-^ J5 ^ +
-| TDI  | +
-| TMS  | +
-| TDO  | +
-| TRST | +
-| TCK  | +
- +
-=== URJTAG === +
- +
-Using the urJtag with an FT2232H you can read the flash chip. +
- +
-urjtag command file used: +
- +
-<code>cable FT2232H vid=xxx pid=xxx +
-endian big +
-detect +
- +
-register BR 1 +
-register DIR 32 +
-register EJIMPCODE 32 +
-register EJADDRESS 32 +
-register EJDATA 32 +
-register EJCONTROL 32 +
-register EJALL 96 +
- +
-instruction length 5 +
-instruction BYPASS 11111 BR +
-instruction IDCODE 00001 DIR +
-instruction EJTAG_IMPCODE 00011 EJIMPCODE +
-instruction EJTAG_ADDRESS 01000 EJADDRESS +
-instruction EJTAG_DATA 01001 EJDATA +
-instruction EJTAG_CONTROL 01010 EJCONTROL +
-instruction EJTAG_ALL 01011 EJALL +
- +
-instruction IDCODE +
-shift ir +
-shift dr +
-dr +
- +
-initbus ejtag +
- +
-detectflash 0x38000000 +
- +
-readmem 0x38000000 0x020000 hg622-CFE.bin</code> +
- +
-You can use a different JTAG cable, only the first line will be different +
-^ JTAG adapter ^ command ^ +
-| Altera USB Blaster adapter | <code>cable usbblaster</code> |  +
-| [[docs:hardware:port.jtag.cable.buffered|WIGGLER parallel port adapter]] | <code>cable wiggler ppdev /dev/parport0</code>+
-| [[docs:hardware:port.jtag.cable.unbuffered|DLC5 parallel port adapter]]| <code>cable dlc5 ppdev /dev/parport0</code>+
- +
- +
-=== ZJTAG === +
- +
-and using zjtag(version 1.5) +
-  * to detect flash chip:<code>zjtag -probeonly /window:18000000 /nompi</code>  +
-  * to backup all flash: <code>zjtag -backup:custom /window:18000000 /start:18000000 /length:1000000 /nompi</code> +
- +
-==== GPIOs ==== +
- +
-=== LEDs === +
-Read: [[doc:uci:system#leds|System configuration: Leds]] to configure the leds +
-^ GPIO   ^ symbol   ^ Active   ^ +
-| 2      | adsl    | Low     | +
-| 5      | inet    | Low      | +
-| 11     | usb     | Low      | +
-| 22     | power   | Low      | +
-| 6 (PINMUX_EPHY0_ACT_LED) | lan1 | Low    | +
-| 7 (PINMUX_EPHY1_ACT_LED) | lan2 | Low    | +
-| 8 (PINMUX_EPHY2_ACT_LED) | lan3 | Low    | +
-| 9 (PINMUX_EPHY3_ACT_LED) | lan4 | Low    | +
- +
- +
-=== Buttons === +
--> [[docs:guide-user:hardware:hardware.button]] on howto use and configure the hardware button(s). +
-^ GPIO   ^ Event   ^ Active   ^ +
-| 34     | Reset   | Low      | +
- +
- +
-===== Bootloader mods ===== +
- +
- +
-^ bootloader ^ download link ^ description ^ +
-| CFE | [[https://drive.google.com/uc?export=download&id=0B-EMoBe-_OdBZ25Pdi1PU0ZweTA|CFE-HG622-CUSTOM.bin]]| moded bootloader: web interface added, reset button detect for stopping the bootloader, no double image, no rootfs CRC check | +
- +
-===== OpenWRT bootlog =====+
  
 <WRAP bootlog> <WRAP bootlog>
Line 476: Line 644:
 [   23.976000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready</nowiki> [   23.976000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready</nowiki>
 </WRAP>\\ </WRAP>\\
- 
  
 ===== Tags ===== ===== Tags =====
 [[meta:tags|How to add tags]] [[meta:tags|How to add tags]]
-{{tag>bcm63xx bcm6368 TRNG 16flash 32ram}}+{{tag>bcm63xx bcm6368 16flash 32ram 4port fastethernet TRNG}}
  • Last modified: 2024/10/05 16:24
  • by danitool