OpenWrt Forum Archive

Topic: How to backup flash without JTAG? (HG556a)

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everyone.

I have a Huawei HG56BZRB board (Hg556a) from vodafone, and i want to install openwrt. In the wiki says that i need the calibration data from ath_data in order to setup the wireless driver, but i can't read mtdblock4 from telnet with dd (i copied busybox into the router) or cat. It says cat: "/dev/mtdblock4: No such device or address". The same occurs with the rest of the mtdblock files in the /dev directory, except for mtdblock0 wich result in a copy of the squash-fs.

is there any way to backup the whole flash chip from telnet?  I don't want to lose wifi, can i flash a openwrt image without erasing ath_data?

Thanks

Strange... Please inspect boot log for mtd partitions layout/errors, repeat cat/dd where you have enough free space (i.e. /tmp). For big partitions gzip on the fly too (i.e. cat /dev/mtdx | gzip > mtdx.gz)

How can i see the bootlog? need i a serial conecction to the router?

I think it could be a limitation of the telnet server (maybe i am chrooted?)

For big files i've been using a usb drive...

Another diference that i see from the wiki with my router is that the devices are called "mtdblock" instead of "mtd"
mtdblock0
mtdblock1
mtdblock2
mtdblock3
mtdblock4
mtdblock5
mtdblock6
mtdblock7

No, you don't need serial console. just type 'dmesg'
Don't stick on the wiki, just look at mtd device names in /dev

alwar wrote:

Hi everyone.

I have a Huawei HG56BZRB board (Hg556a) from vodafone, and i want to install openwrt. In the wiki says that i need the calibration data from ath_data in order to setup the wireless driver, but i can't read mtdblock4 from telnet with dd (i copied busybox into the router) or cat. It says cat: "/dev/mtdblock4: No such device or address". The same occurs with the rest of the mtdblock files in the /dev directory, except for mtdblock0 wich result in a copy of the squash-fs.

is there any way to backup the whole flash chip from telnet?  I don't want to lose wifi, can i flash a openwrt image without erasing ath_data?

Thanks

I am trying to do the same thing, i.e. backup the wifi data... but I can't figured out how..
Can anyone help?

The only thing I figured out was how to get into the router via telnet but seems like most of the Openwrt linux commands aren't working.. including cat, df, even dmesg isn't working....

Is it really necessary to backup the wifi data?
or will it be preserved even after I flash it with Openwrt?
I need the WIFI to work after I change the ROM to Openwrt..

Thanks
Eric

Is it really necessary to backup the wifi data?

Who said that? Openrwt doesn't mess with partitions it doesn't know about. If the device is supported, flashing it with openwrt shouldn't damage wifi data (if you intend with this the partition with wifi calibration data)

Most commands don't work with original firmware because the're probably not available wink

rAndy wrote:

Is it really necessary to backup the wifi data?

Who said that? Openrwt doesn't mess with partitions it doesn't know about. If the device is supported, flashing it with openwrt shouldn't damage wifi data (if you intend with this the partition with wifi calibration data)

Most commands don't work with original firmware because the're probably not available wink

Well, there is this line right at the top of the wiki for this router... that says
"Before trying to run OpenWRT, it's a good idea to backup the flash, especially the bootloader and the ath_data area. The WLAN calibration data is specific for your device and difficult to restore otherwise. It cannot be restored by flashing back a vendor firmware."
http://wiki.openwrt.org/toh/huawei/hg556a#ath_data

That's why I am doubtful whether it is actually necessary or not.
I am sure those who have flashed this specific router before would know the answer to this question... Anyone?

And there is another post where someone needed to use the WIFI calibration data... which I don't quite understand what happened there...
https://forum.openwrt.org/viewtopic.php?id=337321

(Last edited by ericwongcm on 20 Feb 2013, 12:34)

alwar wrote:

is there any way to backup the whole flash chip from telnet?  I don't want to lose wifi, can i flash a openwrt image without erasing ath_data?

Btw, I saw the wiki here says you can backup the flash via CFE through serial.
http://wiki.openwrt.org/doc/hardware/so … om.bcm63xx

But I am not exactly sure how to open the case... it is not documentation and I don't see a single screw on the case.

From the images it seems there is a screw hole in the middle of the pcb. Perhaps the screw is under a label?
If you follow the instructions, a backup shouldn't be needed.

robthebrew wrote:

From the images it seems there is a screw hole in the middle of the pcb. Perhaps the screw is under a label?

Found it.. The screw hole is underneath the sticker label..

robthebrew wrote:

If you follow the instructions, a backup shouldn't be needed.

I hope so too...
I do have some experience using CFE on another broadcom router before..

Thanks

If the commands don't have "erase" or a set of memory addresses in, you shouldn't worry too much.
If they do, then be afraid!

rAndy wrote:

Is it really necessary to backup the wifi data?

Who said that? Openrwt doesn't mess with partitions it doesn't know about. If the device is supported, flashing it with openwrt shouldn't damage wifi data (if you intend with this the partition with wifi calibration data)

Most commands don't work with original firmware because the're probably not available wink

robthebrew wrote:

If the commands don't have "erase" or a set of memory addresses in, you shouldn't worry too much.
If they do, then be afraid!

Thanks for your help...
You are both correct smile
I have Openwrt running on this HG556A now..

Seems to work fine so far...

ericwongcm wrote:
rAndy wrote:

Is it really necessary to backup the wifi data?

Who said that? Openrwt doesn't mess with partitions it doesn't know about. If the device is supported, flashing it with openwrt shouldn't damage wifi data (if you intend with this the partition with wifi calibration data)

Most commands don't work with original firmware because the're probably not available wink

robthebrew wrote:

If the commands don't have "erase" or a set of memory addresses in, you shouldn't worry too much.
If they do, then be afraid!

Thanks for your help...
You are both correct smile
I have Openwrt running on this HG556A now..

Seems to work fine so far...

Hi.

I'm thinking of installing openwrt on my hg556a but I'd like to know if the print server option on the original firmware is still available on openwrt and also if the usb dongle setup works ok as I've read other posts about problems with kernal versions when loading the usb dongle modules.

Thanks.

(Last edited by tapfit2004 on 21 Apr 2013, 22:45)

tapfit2004 wrote:

I'd like to know if the print server option on the original firmware is still available on openwrt and also if the usb dongle setup works ok as I've read other posts about problems with kernal versions when loading the usb dongle modules.

I have USB print server running on my HG556A on the firmware I build myself.
Works fine there except bidirectional support doesn't work, i.e. I simply turn it off at my computer's end to avoid my printing keep printing the same page until it runs out of paper...

You would likely need to install the USB printing packages by command though.
Default pre-compiled openwrt firmware you download here is a barebone package with only essentials, often even without web interface.

I have USB print server running on my HG556A on the firmware I build myself.
Works fine there except bidirectional support doesn't work, i.e. I simply turn it off at my computer's end to avoid my printing keep printing the same page until it runs out of paper...

You would likely need to install the USB printing packages by command though.
Default pre-compiled openwrt firmware you download here is a barebone package with only essentials, often even without web interface.

Thanks for the reply.

I will have to do a lot more reading over the next few days before trying the openwrt firmware.

I have a little bit of experience using linux commands on satellite receivers. I also have ubuntu running on an old laptop. Is it difficult to build a custom openwrt firmware? It sounds like it would be the best way to go.

The original firmware isn't up to much so I'll have to do something with it.

tapfit2004 wrote:

I have a little bit of experience using linux commands on satellite receivers. I also have ubuntu running on an old laptop.

Then, you should have no problems customizing it by SSH (commands).
There are enough documentations on what you need to do.
Otherwise, you can just issue standard linux commands on Openwrt and see what you get..

tapfit2004 wrote:

Is it difficult to build a custom openwrt firmware? It sounds like it would be the best way to go.

Not difficult if you have all the prerequisite installed on your ubuntu to compile it.
Follow the build root documentation to get going..
http://wiki.openwrt.org/doc/howto/build

The main reason you want to build custom rom is so that you will not lose your configurations or app after you do a reset because you can have them included inside the rom itself.

Otherwise, you will need to re-do everything from scratch.

Have fun..

The discussion might have continued from here.