Guide: RavPower WD03 as portable wireless File Hub for iOS etc. (Samba share)

Dear Community,

lately I gave an another try to use my old RavPower File Hub RP-WD03 as a wireless mobile file server to stream videos mainly ti iOS devices. I gut frustrated quite quickly as Samba v1 is not supported by iOS any more and the original firmware of the File Hub is limited to SMB1.

So I decided to give OpenWrt a try and spent several frustrating hours with trial and error untill I finally got it work! It was not quite a straightforward procedure because of the several limitations of my setup. Unfortunately I did not find any complete guides or tutorials how to do this, so I decided to post my solution here to save you some time if you want to do the same.

The main culprits to overcome were:

  • how to flash OpenWrt at all, mainly which files are needed
  • setup Exroot as the WD-03 has very limited flash storage which does not suffice to install all the packages needed
  • how to install Samba as the official Samba 4 package crashes the WD-03 right on install
  • how to mount and automount an external USB thumb drive and share it over Samba (preferably formatted as NTFS so it can be used on a PC too)

Hardware you need:

  • a RavPower RP-WD03
  • a windows PC with an ethernet port and an ethernet cable
  • an SD-Card (can be a small one)
  • the USB Drive which you are intending to share over SMB

Software you need:

  • Putty to ssh into the WD03 here
  • TFTPD64 to flash OpenWrt on the WD03 -> https://pjo2.github.io/tftpd64/ (go to downloads and get the zipped version tftpd64.xxx.zip)
  • OpenWrt for the WD03 from here , you need only two of them: ROOTFS and KERNEL (SQUASHFS)

Before you flash OpenWrt backup your preinstalled original FW!!!
You cannot do that any more after flashing OpenWrt. There are no download links of the unpacked kernel files available on the internet! Just follow this tutorial from Badzz

1. Flashing OpenWrt to the WD03 File Hub

There is a good tutorial on youtube how this works here, but the files mentioned there did not work for me with the newer, 21er OpenWrt versions. The principle ist the same though.

  1. install Putty
  2. unpack TFTPD to a folder anywhere of your liking
  3. copy these two firmware files into this TFTPD root folder:
  1. change the IpV4 settings of your LAN adapter in windows from automatic to manual with theses parameters:
    *IP-Adresse 10.10.10.254
    *subnet Mask 255.0.0.0

you are ready to go!

  1. make sure that the WD03 is powered off
  2. connect the WD03 to your windows PC over the ethernet cable
  3. start the TFTPD server by running tftpd64.exe from its folder, switch to the "log viewer" tab to be able to monitor the flashing proozess in the next steps
  4. insert a pin to the reset pin hole and get ready to push and hold it (don´t push it yet)
  5. push and hold the round power button on the WD03 with one hand
  6. as the first white LED goes on push and hold the reset pin with the other hand
  7. release the power button after all for LEDs light up, but hold the reset pin for further 30-40 sec
  8. after about 15 sec you will see in the log windows that the WD03 downloads the kernel and rootfs files
  9. wait for some more seconds (ca. 30-40 in total) and release the reset pin
  10. just wait. If everything went well, the WD03 will reboot. As it does this, the WiFi LED will blink blue fast. You can disconnect the LAN cable.

2. configuring OpenWrt
This tutorial won´t cover every steps of this, just look it up in the Wiki. For this you have to connect to the WD03 again over the lan cable as WiFi is not activated by default.

  1. reconfigure your LAN adapter in windows to "automatic/DHCP" (or manually to IP 192.168.1.2 and subnet mask 255.255.255.0)
  2. connect the WD03 to your PC with LAN cable and visit the LuCI config Page by opening 192.168.1.1 in a browser
  3. setup the root password, setup a wireless network for the WD03 and join the WD03 to your home Wifi network (the WD03 needs internet connection for the further steps to download packages)
  4. insert the empty (fresly formatted) SD-Card into the card slot of the WD03
  5. I recommend a reboot of the WD03 here
  6. you can now disconnect the lan cable and put it aside, from here on you can use the wireless connection for furter usage/configuration

3. Setting up ExRoot
this step is necessary as the WD03 does not have enough flash memory to house the packages needed. For further informations check out this wiki. The following steps will format the SD-Card as ext4 and the card must remain inserted from now on.

  1. ssh to the WD03 over Putty
  2. use these commands in a row to prepair the SD-Card:
    opkg update
    opkg install kmod-usb-storage
    opkg install usbutils
    opkg install block-mount

you can test now if the SD-Card is correctly recognized: lsusb -t should produce a line with "Driver=usb-storage" in it

another test with block info | grep "/dev/sd" lists your SD-card properties
now you can procede to exroot setup.

  1. to setup exroot run these commands one after the another:
    opkg install kmod-fs-ext4 e2fsprogs fdisk
    DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
    uci -q delete fstab.rwm
    uci set fstab.rwm="mount"
    uci set fstab.rwm.device="${DEVICE}"
    uci set fstab.rwm.target="/rwm"
    uci commit fstab
    DEVICE="/dev/sda1"
    mkfs.ext4 ${DEVICE}
    eval $(block info ${DEVICE} | grep -o -e "UUID=\S*")
    uci -q delete fstab.overlay
    uci set fstab.overlay="mount"
    uci set fstab.overlay.uuid="${UUID}"
    uci set fstab.overlay.target="/overlay"
    uci commit fstab
    mkdir -p /tmp/cproot
    mount --bind /overlay /tmp/cproot
    mount ${DEVICE} /mnt
    tar -C /tmp/cproot -cvf - . | tar -C /mnt -xf -
    umount /tmp/cproot /mnt

and finally reboot the WD03 with the command reboot

After reboot please login again to LuCI and check out the free space under System>Software. You should see several GBs free space now (=size of your SD-Card). The SD-Card must remain inserted from here on.

4. Setting up the USB Drive formatted as NTFS
see also this Wiki article

  1. ssh in to WD03 again with Putty
  2. insert your USB thumb drive, formatted as NTFS (you can do this in Windows, put some test files for SMB sharing on it too )
  3. istall the ntfs drivers with this command:
    opkg install ntfs-3g
  4. create a new folder in the root of the WD03. You need this directory as the target to mount the USB drive into in the next steps. In my case I called it simply "usb":
    mkdir -p /usb
  5. check out your USB drives with the command block info, you should see the SD Card as /dev/sda1 (ext4 formatted and mounted to "overlay") and your USB drive as /dev/sdb1
  6. now mount the usb drive over LuCI (this could be done with console commands too if you prefer)
    go to System/Mount Points (this is a new menu item if you successfully installed blockmount package)
    scroll down to Mount Points
    click "Add" and
    *check enabled checkbox
    *choose the UUID for your USB Thub Drive (see block info above)
    *as Mount Point choose "custom" and type in the folder name you created above: /usb
    *under advanced settings you can choose ntfs-3g as file system or leave it as auto
    click save (and be sure you always apply any saved but pending changes in the header of the LuCI interface)
  7. check out if the drive is correctly mounted, it should be listed under Mounted File Systems in LuCI
    you can check this too in Putty with block info (the line of your drive should include "MOUNT=/usb")
  8. save the actual configuration by clicking the "save config" button on in LuCI>System>Mount Points (this saves the fstab config file, you can check the result with cat /etc/config/fstab)

all we need to do is to make sure, that the usb thumb drive gets mounted on reboot. We need a script for this:

  1. install nano editor first with the command opkg install nano
  2. open the autostart script of openWrt with the command nano /etc/rc.local
  3. insert these lines:
sleep 1
ntfs-3g /dev/sdb1 /usb -o rw,lazytime,noatime,big_writes
exit 0

save and exit with cmd+O and cmd+X

  1. make a reboot of the WD03 and chek out if the USB thumb drive automounts correctly to the folder /usb by using block info in putty again or on the Mount Point page of LuCI
  2. you can experiment with longer scripts to enable NTFS automount on hot plug, see the Wiki linked above. I did not bother myself with that as I did not want to screw up my exroot.

5. Finally! setting up Samba!
aware: you cannot use the official samba4-server package as it crashes the WD03! trying to do that makes it crash and reboot. Do not follow this Wiki article 1:1, you must replace the samba packages with ksmbd-server and luci-app-ksmbd. The rest of the guide can be used.

  1. install ksmbd over Putty or LuCI>System>Software:
    opkg install ksmbd-server
    opkg install luci-app-ksmbd
    opkg install wsdd2
  2. go to Services > Network Share in LuCI and setup your samba share as written in the wiki
    *give the share a name under "Name", you can choose freely
  • as Path enter "/usb" (the name of the folder in root you mounted your drive to)
    *check "browsable" and "allow guests"
  1. test your samba share in Windows by opening "//192.168.1.1" in the file explorer
  2. setup your apps like Files or VLC on your iPhone / iPad

Please comment if some steps can be optimized or do not work. I am not a linux expert, I just collected these peaces of informations together. I wish you fun with your cheap portable wireless file hub with cross-plattform compatibility!

2 Likes