OpenWrt Forum Archive

Topic: RavPower RP-WD02 - (RT5350) - Work in progress

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

Hello,

I've acquired a Ravpower RP-WD02 and will try to have OpenWrt working on it.

I've started recognition phase and before going further, I'll wait for my USB2Serial adapter to arrive in order to have full view on the uBoot logs.

Many information have been gathered already and have been written down to the wiki : http://wiki.openwrt.org/toh/ravpower/rp-wd02

Waiting for the missing hardware to arrive, I'm trying to find a way to identify the GPIO ports but I'm stuck at this step. I've checked the existing doc which recommend to check through /sys/class/gpio the various gpio available and their behaviour.
I do not have such /sys/class/gpio on my device. I've search through the various class on sys and dev but did not found any gpio related one.

What I've found is the /bin/gpio command line utility which got the following documentation :

Usage: gpio w - writing test (output)
       gpio r - reading test (input)
       gpio i (<gpio>) - interrupt test for gpio number
       gpio l <gpio> <on> <off> <blinks> <rests> <times>
            - set led on <gpio>(0~24) on/off interval, no. of blinking/resting cycles, times of blinking
           
Unfortunately, when I try to leverage this tool to identify the gpio, I got either no output or an error message (/dev/gpio: No such device or address).

Looks like this is related to the current kernel of the device which does not provide access to gpio (no gpio driver message seen in the boot log) and potentially, required module are not part of the kernel build.

Potential missing part is related to :

Sysfs Interface for Userspace (OPTIONAL)
========================================
Platforms which use the "gpiolib" implementors framework may choose to
configure a sysfs user interface to GPIOs.  This is different from the
debugfs interface, since it provides control over GPIO direction and
value instead of just showing a gpio state summary.  Plus, it could be
present on production systems without debugging support.

I'll update this post depending on my progress or any help given by this great community.

One interesting information found in the existing firmware is about the list of vendors/models that looks similar based on RT5350 :

List of VENDORS / MODELS

        //IOVST UIS700HD
        UIS700HD
        
        //IOVST UIS700HD
        PA260s
        
        //IOVST PA520i
        PA520i
        PA521i
        AC01
        PA260si
        
        //EAGET 忆捷 样式使用同一个 第一个是HDD 第二个是SD
        AirDisk
        A86
        
        //POWER7
        wifidisk
        WiFiSDRJ
        WiFiPort
        WiFiDGRJ
        WiFiMagic
        
        //POWER7 wifi SD
        wifisd
        DiskNORJ
        WiFiDG
        
        //ALZX
        WiFimate
        
        //OUO
        S60
        
        //Aigo
        aigoWiFiDisk
        aigoWiFiRouter
        aigoWiFiSD
        PB106
        MiniWiFiRouter
        HD816
        
        // 日本 RATOC
        // helphtml:"ja_JP_WIFISD1" 本客户中如果使用日文,单独使用独立的帮助文档
        WIFISD1
        WIFIMSD1
        WIFIUSB2
        WIFIUSB1
        
        // RATOC的 NTT
        SD1D
        
        //德国版本
        MWiD25
        
        //德国2 Intenso
        M2M
        Reader
        
        //SXZ
        WI10
        
        //OUO
        T30
        
        //MEGAGE
        A60 
        
        //Leedo
        W3000P
        
        //Sarotech WiDisk
        WiDisk
        
        //IPR115
        IPR115
        
        //西班牙 HWD300
        HWD300
        
        //Macally
        WIFIHDD
        MWiFiSD
        
        //Macway
        StorevaXAir
        
        //创世达
        TPOSWiFiDisk
        
        //Sabaoth
        iStorageII
        
        //Eagletec
        HDCWIFI
        
        //Storex
        WeZeeDisk
        WeZeeCard
        
        //Newsmy
        C2
        
        //FANTEC
        MWiD25DS
        
        //NEXTAV
        H100
        D100
        
        //IOGEAR
        GWFRSDU
        
        //Verbatim
        MediaShare
        
        //Futurepath
        WMC_i22
        WMC_i21
        
        //Lenovo
        LeDisk
        
        //I-O DATA
        WFSSR01
        WFSCSR01
        
        //Maxwave
        EZCH31
        
        //PEARL
        PX4854
        PX4893
        
        //3Q
        WHL220M
        
        //MEDION
        WLAN_HDD_N_GO
        WLAN_HDD
        
        //TrekStor
        DSPA
        
        //IOVST
        PA260si_OEM
        PA521i_OEM
        
        //Hama
        HamaWiFi
        
        //RoitsNine
        SVWIFIS250UN
        SVWIFID24U
        
        //IVT
        S3
        
        //Princeton
        WMS1
        
        //POWSON
        POWSON
        
        //EDUP
        EP3701
        
        //SSK
        SSK
        HE_W100
        
        //FG1060N
        FG1060N
        
        //Onion
        iAirDisk
        
        //Sarotech
        WFABU2
        
        //Valence
        MicroSD
        
        //泽宝RAV
        WD01
        WD02
        
        //HooToo
        TM01
        TM02
        TM03
        TM04
        
        //Choton 中创
        WiCloud
        
        //DAHENG 大恒
        DH_3000WIFI
        
        //PNY
        PNYMediaReader
        
        //Merlin Digital 的 WifiHDD
        WifiStorage
        
        //Gigastone
        Gigastone
        A3
        A5
        
        //SAVITMICRO
        DataMoreC52
        
        //Essentielb
        SoftMouv
        

Updated on 02/01/2015 :

I used binwalk on the various mtd backups I've made.

Here is the content :


MTD8 (RootFs)

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             Squashfs filesystem, little endian, non-standard signature,  version 3.0, size: 5495590 bytes,  1307 inodes, blocksize: 65536 bytes, created: Fri Oct 17 06:01:58 2014

and more interestingly :

MTD1 (u-Boot)

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             uImage header, header size: 64 bytes, header CRC: 0x30C9CE94, created: Wed May 14 06:33:42 2014, image size: 128280 bytes, Data Address: 0x80200000, Entry Point: 0x80200000, data CRC: 0x5FB9F5C9, OS: Linux, CPU: MIPS, image type: Standalone Program, compression type: none, image name: "SPI Flash Image"
14036         0x36D4          LZMA compressed data, properties: 0x5D, dictionary size: 1048576 bytes, missing uncompressed size
104736        0x19920         U-Boot version string, "U-Boot 1.1.3 (May 14 2014 - 12:33:39)"


This provide the info about U-Boot 1.1.3.

I've then extracted uboot and run strings on it and I gathered some information (that I will need to confirm when my USB2Serial will arrived) :

Please choose the operation:
   %d: Enter IOVST ui menu.
   %d: Load system code to SDRAM via TFTP.
   %d: Load system code then write to Flash via TFTP.
   %d: Boot system code via Flash (default).
   %d: Entr boot command line interface.
   %d: Load Boot Loader code then write to Flash via Serial.
   %d: Load Boot Loader code then write to Flash via TFTP.

|         USB TEST MENU         |
|  0 USB reset                  |
|  1 USB scan                   |
|  q Quit                       |

|     KERNEL BOOTING SETTING    |
|  0 Boot kernel                |
|     with filesystem in RAM    |
|  1 Boot kernel                |
|     with filesystem in SPI    |

|      ETHERNET TEST MENU       |
|  0 Show IP and MAC Address    |
|  1 Set IP Address             |
|  2 Set Wireless MAC Address   |
|  3 Set Server IP              |
|  4 Ping                       |
|  a eth init                   |
|  b eth stop                   |
|  s Save Flash                 |

|        GPIO SETTING           |
|  0 POWER Interrupt Key        |
|  1 WIFI LED ON                |
|  2 WIFI LED OFF               |
|  3 Internet Blue LED ON       |
|  4 Internet Blue LED OFF      |
|  5 Internet Red LED ON        |
|  6 Internet Red LED OFF       |
|  7 Reset key                  |
|  8 Detect reset Key           |
|  9 Get the Battery volume     |
|  a Check reset key            |
|  b Power Off                  |
|  c Network mode switch        |

|    Flush UPGRADE TEST MENU    |
|  0 Upgrade Bootloader         |
|  1 Upgrade Config             |
|  2 Upgrade Factory            |
|  3 Upgrade Kernel             |
|  4 Upgrade Rootfs             |
|  5 Resume Upgrade             |
|  a Upgrade All Flash          |
|  e Erase Config partition     |
|  f Erase Factory partition    |
|  g Erase User partition       |

|       PARAM TEST MENU         |
|  0 Display bootloader info    |
|  1 Display common info        |
|  2 Input Vendor               |
|  3 Input Product              |
|  4 Input Version              |
|  5 Input Serial               |
|  6 Input XuiLei license       |
|  7 Input Modules license      |
|  8 Input Cloud license        |
|  s Save flash                 |
|  e Erase parameters partition |
|  u Update license file        |

bootcmd=tftp
bootdelay=2
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ipaddr=10.10.10.128
serverip=10.10.10.254
netmask=10.10.10.1
ramargs=setenv bootargs root=/dev/mtdblock8
kernel_addr=BFC40000



Systemic

(Last edited by systemic on 2 Jan 2015, 23:45)

The chip number and the boot log show that it has an 8 MB flash.  You should update that on the wiki page.

I'm pretty sure that the 'gpio' command just accesses the /sys control psuedo-files to actually drive the GPIOs through the kernel.  In theory one could poke directly at the GPIO hardware registers in memory space but since that is very chip-specific, the kernel driver is always used instead.

Thanks for this this initial reply. I've updated the wiki page.

I'll see if I can get or compile the required module for gpio and load then to test them.

Systemic

Serial adapter arrived ...

I use a CP2102 on Mac.

Command line to get the boot log :

screen /dev/cu.SLAB_USBtoUART 57600,cs8,-parenb,-cstopb,-hupcl

U-boot Log:

U-Boot 1.1.3 (May 14 2014 - 12:33:39)

DRAM:  32 MB
Initialize usb ehci ohci
find flash: MX25L6405D
..============================================
UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 256 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 32 MBytes
Flash component: SPI Flash
Date:May 14 2014  Time:12:33:39
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384

 ##### The CPU freq = 360 MHZ ####
 estimate memory size =32 Mbytes
.
Initialize vs configure module
.Initialize GPIO
Input i key to enter menu 0
........................## Booting image at 80500000 ...
   Image Name:   Linux Kernel Image
   Created:      2013-11-01   5:36:56 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1442332 Bytes =  1.4 MB
   Load Address: 80000000
   Entry Point:  80441000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80441000) ...
## Giving linux memsize in MB, 32

Starting kernel ...


LINUX started...

 THIS IS ASIC
PROC INIT OK!
enter init
Start rootfs
mounted
echo 6 > /proc/sys/kernel/printk
tntfs: module license 'Commercial. For support email ntfs-support@tuxera.com.' taints kernel.
init dev files
mounted end
Sun Jan  4 21:49:46 GMT 2015
Get time information first
tz_minuteswest=0
Set time information
offset=-1  tz.tz_minuteswest=-60
Get time information again
tz_minuteswest=-60
GMT-01:00
arch/mips/rt2880/nvram.c 472: len=0x3ffc, crc_value=0x69fcc80f, fb[0].env.crc=0x69fcc80f
arch/mips/rt2880/nvram.c 502: Same CRC
Finish the check crc
SSID_PREFIX:FileHub
wireless port last two bytes:-5bea!
str_buarch/mips/rt2880/nvram.c 423: --> nvram_clear 0
f=5BEA
SSID:RavAir
arch/mips/rt2880/nvram.c 445: clear flash from 0x2004 for 0x3ffc bytes
arch/mips/rt2880/nvram.c 527: --> nvram_commit 0
init net

phy_tx_ring = 0x01c6a000, tx_ring = 0xa1c6a000

phy_rx_ring0 = 0x01c6b000, rx_ring0 = 0xa1c6b000
MAC_ADRH -- : 0x0000001c
MAC_ADRL -- : 0xc2155beb
RT305x_ESW: Link Status Changed
vs_port_link_status=0
RX DESC a13e1000  size = 2048
<-- RTMPAllocTxRxRingMemory, Status=0
RTMP_TimerListAdd: add timer obj c0083b68!
RTMP_TimerListAdd: add timer obj c0020fe4!
RTMP_TimerListAdd: add timer obj c0020bb4!
RTMP_TimerListAdd: add timer obj c0020f90!
RTMP_TimerListAdd: add timer obj c0020fb8!
RTMP_TimerListAdd: add timer obj c0021210!
RTMP_TimerListAdd: add timer obj c0024104!
RTMP_TimerListAdd: add timer obj c0023cd4!
RTMP_TimerListAdd: add timer obj c00240b0!
RTMP_TimerListAdd: add timer obj c00240d8!
RTMP_TimerListAdd: add timer obj c0024330!
RTMP_TimerListAdd: add timer obj c0027224!
RTMP_TimerListAdd: add timer obj c0026df4!
RTMP_TimerListAdd: add timer obj c00271d0!
RTMP_TimerListAdd: add timer obj c00271f8!
RTMP_TimerListAdd: add timer obj c0027450!
RTMP_TimerListAdd: add timer obj c002a344!
RTMP_TimerListAdd: add timer obj c0029f14!
RTMP_TimerListAdd: add timer obj c002a2f0!
RTMP_TimerListAdd: add timer obj c002a318!
RTMP_TimerListAdd: add timer obj c002a570!
RTMP_TimerListAdd: add timer obj c002d464!
RTMP_TimerListAdd: add timer obj c002d034!
RTMP_TimerListAdd: add timer obj c002d410!
RTMP_TimerListAdd: add timer obj c002d438!
RTMP_TimerListAdd: add timer obj c002d690!
RTMP_TimerListAdd: add timer obj c0030584!
RTMP_TimerListAdd: add timer obj c0030154!
RTMP_TimerListAdd: add timer obj c0030530!
RTMP_TimerListAdd: add timer obj c0030558!
RTMP_TimerListAdd: add timer obj c00307b0!
RTMP_TimerListAdd: add timer obj c00336a4!
RTMP_TimerListAdd: add timer obj c0033274!
RTMP_TimerListAdd: add timer obj c0033650!
RTMP_TimerListAdd: add timer obj c0033678!
RTMP_TimerListAdd: add timer obj c00338d0!
RTMP_TimerListAdd: add timer obj c00367c4!
RTMP_TimerListAdd: add timer obj c0036394!
RTMP_TimerListAdd: add timer obj c0036770!
RTMP_TimerListAdd: add timer obj c0036798!
RTMP_TimerListAdd: add timer obj c00369f0!
RTMP_TimerListAdd: add timer obj c005170c!
RTMP_TimerListAdd: add timer obj c00512dc!
RTMP_TimerListAdd: add timer obj c00516b8!
RTMP_TimerListAdd: add timer obj c00516e0!
RTMP_TimerListAdd: add timer obj c0051738!
RTMP_TimerListAdd: add timer obj c0051764!
RTMP_TimerListAdd: add timer obj c0051790!
RTMP_TimerListAdd: add timer obj c0084088!
RTMP_TimerListAdd: add timer obj c0084060!
RTMP_TimerListAdd: add timer obj c0084038!
RTMP_TimerListAdd: add timer obj c005a924!
RTMP_TimerListAdd: add timer obj c005aa28!
RTMP_TimerListAdd: add timer obj c005a94c!
RTMP_TimerListAdd: add timer obj c0051c74!
RTMP_TimerListAdd: add timer obj c001e468!
RTMP_TimerListAdd: add timer obj c0021588!
RTMP_TimerListAdd: add timer obj c00246a8!
RTMP_TimerListAdd: add timer obj c00277c8!
RTMP_TimerListAdd: add timer obj c002a8e8!
RTMP_TimerListAdd: add timer obj c002da08!
RTMP_TimerListAdd: add timer obj c0030b28!
RTMP_TimerListAdd: add timer obj c0033c48!
RTMP_TimerListAdd: add timer obj c0051990!
Key1Str is Invalid key length(0) or Type(1)
Key2Str is Invalid key length(0) or Type(0)
Key3Str is Invalid key length(0) or Type(0)
Key4Str is Invalid key length(0) or Type(0)
82:2d:c8:29:76:3b:db:35:16:91:80:86:97:80:04:b0:
16:0f:87:f1:ce:51:e1:a3:81:18:bc:2c:78:f0:9b:ea:

1. Phy Mode = 9
2. Phy Mode = 9
3. Phy Mode = 9
MCS Set = ff 00 00 00 01
RTMP_TimerListAdd: add timer obj c0052244!
Main bssid = 00:1c:c2:15:5b:ea
<==== rt28xx_init, Status=0
0x1300 = 00064380
vconfig: ioctl error for rem: Invalid argument
eth2.2: Setting MAC address to  00 1c c2 15 5b eb.
VLAN (eth2.2):  Underlying device (eth2) has same MAC, not checking promiscious mode.
ifconfig: SIOCGIFFLAGS: No such device
brctl: bridge br0: No such device or address
switch reg write offset=14, value=5555
switch reg write offset=40, value=1001
switch reg write offset=44, value=1001
switch reg write offset=48, value=1001
switch reg write offset=4c, value=1
switch reg write offset=50, value=2001
switch reg write offset=70, value=ffffffff
switch reg write offset=98, value=7f7f
switch reg write offset=e4, value=7f
done.
Set: phy[0].reg[0] = 3900
Set: phy[4].reg[0] = 3900
Set: phy[1].reg[0] = 3900
Set: phy[2].reg[0] = 3900
Set: phy[3].reg[0] = 3900
udhcpc (v1.12.1) started
Set: phy[4].reg[0] = 3100
do_cmd_r:mkdir /tmp/led_tmp
BEGIN:=======================================2498 to wait child 2500
/etc/rc.d/rc1.d/S73ddns start
/etc/rc.d/rc1.d/S75fileserv start
/etc/rc.d/rc1.d/S80webd start
/etc/rc.d/rc1.d/S82upnpd start
/etc/rc.d/rc1.d/S99local start

RavAir login:

I'll now assess the various menu of uBoot to see if I can try to boot on WRT image using tftp.

Systemic

Hello,
I have SSK HE-W100 model of WiFi HDD  from your List of VENDORS / MODELS
(http://en.ssk.cn/index.php/Product/show … amp;pmid=0)

What do you think - OpenWRT can start working on my device if it will work on your device?
Best regards,
Andrei

(Last edited by mag_minsk on 16 Jan 2015, 10:58)

Not sure about the other brands and implementation but I do want to document the steps for the Ravpower and with some hope have them easily converted for other models.

I've built my first image and I'm trying to boot on it with no luck for the time being.

Here is the message I got :

IOVST>bootm 0x80100000
## Booting image at 80100000 ...
   Image Name:   MIPS OpenWrt Linux-3.14.27
   Created:      2015-01-13  18:45:07 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3385807 Bytes =  3.2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

I've tried some other openwrt image and all are failing with the same error.
If I use the original kernel image (mtd4) and boot on it then this is working and the router boot as expected.

I'll dig into the forum and google to progress on this.

Systemic

Thanks for your job.
I hope all will work.
I can test an firmware in my device.

Your kernel is too big.....take a few things out and see if it will boot

systemic wrote:

Not sure about the other brands and implementation but I do want to document the steps for the Ravpower and with some hope have them easily converted for other models.

I've built my first image and I'm trying to boot on it with no luck for the time being.

Here is the message I got :

IOVST>bootm 0x80100000
## Booting image at 80100000 ...
   Image Name:   MIPS OpenWrt Linux-3.14.27
   Created:      2015-01-13  18:45:07 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3385807 Bytes =  3.2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

I've tried some other openwrt image and all are failing with the same error.
If I use the original kernel image (mtd4) and boot on it then this is working and the router boot as expected.

I'll dig into the forum and google to progress on this.

Systemic

I just received my MacAlly WifiHDD. I have just wired up the serial port to my Shikra to get serial output from the device.
I believe it's the same as yours (in hardware, hopefully).

I'm building a VM to setup a openwrt build, and hopefully get the device supported out of the box (i had done that for the Patriot Memory wifi HDD, but i killed it).

Looking forward to seeing what happens with this little guy!

Has there been any progress with this project?

Thanks so much for getting started with this. Any progress? smile

systemic wrote:

IOVST>bootm 0x80100000
## Booting image at 80100000 ...
   Image Name:   MIPS OpenWrt Linux-3.14.27
   Created:      2015-01-13  18:45:07 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    3385807 Bytes =  3.2 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

You might try a different address to load your image because it might happen that the kernel got overwritten while it is unpacked.
For example try to load the image to 0x400000 and call then bootm.
I had the same problem and using a lower address range helped.

Good luck!

woolman

I have added instructions on how to flash OpenWrt to the Wiki. Be warned that following these instructions may brick your device and void your warranty. Just because it worked for me does not mean it will work for you.

(Last edited by vernonjvs on 16 Jan 2016, 15:28)

Hello.
I've discovered this great project right now, and i'm very interested on trying it.
Just one question:

As, with stock firmware, we can use ethernet port only in WAN mode ("internet in" from modem\router and share by wi-fi), will i be able to use this port in LAN mode ("internet in" from wi-fi and share by ethernet)??

I'd simply like to use WD02 as PowerLAN device, and make it work with a PC with no wi-fi, or SkyOnDemand for example.

Waiting for your reply, thanks for your help!
Omar

Anyone can help me find the original firmware? 

Thanks,
David

Try TFTP recovery if you are not successful with standard failsafe recovery. The below works for RP-WD02 (Credit goes to Cabalist). This saved my router.

Steps below in case anyone searches for this in the future:
Requires a TFTP server running on your machine.
You need to do the following steps to reflash the firmware.
Start with the firmware you had originally loaded. For our example we will use openwrt-ramips-rt305x-ht-tm02-squashfs-factory-r44945-ws.bin
Convert .bin to .tar.gz archive tail -n +166 openwrt-ramips-rt305x-ht-tm02-squashfs-factory-r44945-ws.bin > openwrt.tar.gz
Extract the files inside. You should see firmware.bin and uboot.bin
Rename firmware.bin to Kernal.bin. (Yes. Kernal.bin Spelling and capitalization count.)
Move Kernal.bin to your TFTP directory
Set your computer to have IP address 10.10.10.3 with subnet mask 255.255.255.0
Power off the router.
Connect ethernet cable
Press and hold router reset pin with paper clip. While holding reset plug power in.
Wifi LED should light up then go out again, 3-5 seconds. Continue holding reset for another 10-15 seconds.
It can take another 3-5 minutes for the firmware to install. Let it sit for a while, up to 10 minutes, then power cycle the router. It should boot up on default config for OpenWRT.

Has anyone had any luck flashing it back to the factory firmware? im on openwrt now and i'd like to go back

Any updates? What about running on WD03? These are great devices, they just stopped short of a couple of things like FTP. Be great to have FTP / NFS support and Zeroconf. I had some success running TFTP via telnet, but can't seem to connect to it.

The discussion might have continued from here.