How to flash Easybox 802 (Arcadyan ARV752DPW)
To recycle my old legacy provider router, I choose to flash it with an experimentel version of openWRT v22.
Open the case and connect UART
I use the FTDI connector so you can also use a Raspberry pi


# Pin 1 is marked with an little arrow
# Setup COM : 115200 8N1
6 7 8 9 10
[ ][ ][ ][ ][ ]
[ ]Rx Tx [ ]Gnd
1 2 3 4 5
Backup full flash with brntool
- Step enter Admin mode
## START TERM
## Find serial with dmesg | grep serial or setserial
screen /dev/ttyUSB0 115200
## OUTPUT
Press Space Bar 3 times to enter command mode ...123
Yes, Enter command mode ...
[DANUBE Boot]:!
Enter Administrator Mode !
======================
[#] Set Serial Number
[2] Use Normal Firmware
[3] Use ART-Testing Firmware
[9] Taggle ART Firmware Enable/Disable
[A] Set MAC Address
[E] Erase Flash
[G] Run Runtime Code
[H] Set Options
[M] Upload to Memory
[P] Print Boot Params
[R] Read from Memory
[T] Memory Test
[U] Upload to Flash
[V] Set Board Version
[W] Write to Memory
[Y] Go to Memory
[Z] Dump DDR Ram Register
[0] Primary = Image 0
[1] Primary = Image 1
======================
[DANUBE Boot]:
2. Step Kill screen with Ctrl ^ A + K + Y and start brntool.py
## DOWNLOAD && INSTALL SERIAL LIBS
mkdir easybox802-flash ; cd easybox802-flash/
wget https://raw.githubusercontent.com/rvalles/brntool/master/brntool.py
pip3.10 install pyserial
## PIP2 LEGACY INSTALL
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
python2 get-pip.py
## RUN 1
python3.10 brntool.py --read=ARV752DPW_backup_1.dump --addr=0xB0000000 --verbose --size=0x800000
## RUN 2
python3.10 brntool.py --read=ARV752DPW_backup_2.dump --addr=0xB0000000 --verbose --size=0x800000
## OUTPUT VERBOSE
root@monitor:~/easybox802-flash# python3.10 brntool.py --read=ARV752DPW_backup_1.dump --addr=0xB0000000 --verbose --size=0x800000
Waiting for a prompt...
Ok.
Addr: 0xb0002710
Size: 8378608
Addr: 0xb0004e20
Size: 8368608
Addr: 0xb0007530
Size: 8358608
Addr: 0xb0009c40
Size: 8348608
...
## DIFF AND CHECK
diff ARV752DPW_backup_1.dump ARV752DPW_backup_2.dump
cmp ARV752DPW_backup_1.dump ARV752DPW_backup_2.dump
md5sum ARV752DPW_backup_*.dump
Install uboot Bootloader
This assumes your already in Adminstrator mode in DANUBE
## GET TOOLS AND IMAGES
wget http://blog.galax.is/files/802/brnboot-uboot.bin
wget http://blog.galax.is/files/802/flash-uboot.bin
wget http://blog.galax.is/files/802/write-to-uboot.py
## Set Memory
screen /dev/ttyUSB0 115200
# [M] Upload to Memory at default address 0x80002000
## Copy to 0x80002000
screen /dev/ttyUSB0 115200
sx brnboot-uboot.bin </dev/ttyUSB0 >/dev/ttyUSB0
# Press [ENTER] , [Y] Go to Memory to default address 0x80002000
# Test if this runs fine... Ctrl ^C to end
## FLASH UBOOT TO ROM
python2 write-to-uboot.py --serial=/dev/ttyUSB0 --write=flash-uboot.bin --addr=0x80500000 --verbose
## CHECK
screen /dev/ttyUSB0 115200
crc32 80500000 00010000
# ==> 223ed699
# Unprotect the sector where the u-boot config is being stored
protect off 0xb0010000 0xb001FFFF
# Erase the flash memory.
erase 0xb0000000 0xb001FFFF
# Copy the uploaded flash-uboot.bin from RAM to flash memory.
cp.b 0x80500000 0xb0000000 10000
# Protect again and reboot device...
protect on 0xb0010000 0xb001FFFF
reset
Flash openWRT Image
## DOWNLOAD INITRAMFS AND FULLIMAGES
wget https://downloads.openwrt.org/releases/19.07.4/targets/lantiq/xway/openwrt-19.07.4-lantiq-xway-arcadyan_arv752dpw-initramfs-kernel.bin
wget http://downloads.openwrt.org/attitude_adjustment/12.09/lantiq/danube/openwrt-lantiq-danube-ARV752DPW-squashfs.image
## UPLOAD IMAGE
python2 write-to-uboot.py --serial=/dev/ttyUSB0 --write=openwrt-19.07.4-lantiq-xway-arcadyan_arv752dpw-initramfs-kernel.bin --addr=0x80500000 --verbose
# The output of the executed script shows what to do next:
# You should run command 'crc32 80500000 003e2ed7' on the modem and the result must be 57ec0d28.
# 003e2ed7 = %FILESIZE%
screen /dev/ttyUSB0 115200
crc32 80500000 %FILESIZE%
# Erase the flash memory.
erase 0xB0020000 +0x%FILESIZE%
# Copy from RAM to FLASH
cp.b 0x80500000 0xB0020000 0x%FILESIZE%
## Check if image is OpenWrt (If the image has no header, there is no output).
iminfo 0xB0020000
# Boot uploaded image. Type:
bootm ${kernel_addr} ${bootargs}
#################################################################
# If not booting / stuck just poweroff and on hardly and check
# Now in openWRT just reboot and press key to get in uboot again!
#################################################################
## TO FLASH ROM
python2 write-to-uboot.py --serial=/dev/ttyUSB0 --write=openwrt-lantiq-danube-ARV752DPW-squashfs.image --addr=0x80500000 --verbose
screen /dev/ttyUSB0 115200
crc32 80500000 %FILESIZE%
# Erase the flash memory.
erase 0xB0020000 +0x%FILESIZE%
# Copy from RAM to FLASH
cp.b 0x80500000 0xB0020000 0x%FILESIZE%
## Check if image is OpenWrt (If the image has no header, there is no output).
iminfo 0xB0020000
reset
Output, if successful:
...
...
Writing: mw 807c0000 deadc0de at: 0x807c0000
Waiting for prompt...
Ok, prompt received
File successfully written. You should run command 'crc32 80500000 002c0004' on the modem and the result must be a1cfc607.
root@monitor:~/easybox802-flash# screen /dev/ttyUSB0 115200
ARV752DPW => crc32 80500000 002c0004
CRC32 for 80500000 ... 807c0003 ==> a1cfc607
ARV752DPW => erase 0xB0020000 +0x002c0004
............................................. done
Erased 45 sectors
ARV752DPW => cp.b 0x80500000 0xB0020000 0x002c0004
Copy to Flash... 9....8....7....6....5....4....3....2....1....done
ARV752DPW => iminfo 0xB0020000
## Checking Image at b0020000 ...
Legacy image found
Image Name: MIPS OpenWrt Linux-3.3.8
Created: 2013-04-03 8:57:45 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1017147 Bytes = 993.3 kB
Load Address: 80002000
Entry Point: 80002000
Verifying Checksum ... OK
ARV752DPW => reset
Upgrade to openwrt v19
## Using my windows laptop and put the image to router with pscp
.\pscp -P 22 -scp C:\owrt19_image.bin 192.168.1.1:/tmp/
md5sum /tmp/*.bin
sysupgrade -n -v /tmp/owrt19_image.bin
SETUPS / NETWORKING
# S W I T C H - C O N F I G
# -------------------------------------------
# | [WAN] -- [1|2|3|4] <=> [5 TAGGED CPU] |
# -------------------------------------------
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
option mirror_source_port '0'
option mirror_monitor_port '0'
#P0 - WAN
config switch_vlan
option device 'switch0'
option vlan '0'
option vid '0'
option ports '0 5t'
# P1 - DHCP CLIENT
config switch_vlan
option device 'switch0'
option vlan '2'
option vid '2'
option ports '1 5t'
# P2 - STATIC ADDRESS
config switch_vlan
option device 'switch0'
option ports '2 5t'
option vlan '11'
# P3 / 4 - 10.0.0.0/8 NET / WLAN
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '3 4 5t'
config interface 'uplinkdhcp'
option proto 'dhcp'
option delegate '0'
option hostname 'owrt802'
option ifname 'eth0.2'
config interface 'uplinkv1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '192.168.2.1'
option broadcast '192.168.2.255'
option ipaddr '192.168.2.233'
list dns '192.168.2.1'
option ifname 'eth0.11'
option force_link '0'
option metric '1'
config interface '10net'
option proto 'static'
option ifname 'eth0.3'
option ipaddr '10.3.3.254'
option netmask '255.255.255.0'
option delegate '0'
option force_link '0'
list dns '1.1.1.1'
option type 'bridge'