Bug and fix for firmware v1.04.17


#1

Hi,

I’ve just bought a My Passport Wireless Pro to daily backup my camera SD card and I was really disappointed that the box was just unable to access none of my SD cards nor my camera through the USB cable.

Hopefully, it appears it runs a small embedded linux system and that most of operations are driven by some shell scripts (mainly located under /sbin).

I’ve eventually found the root cause, all scripts are failing because of unexpected content in the /etc/timezone_offset file. For instance mine contains:

2,0

This might be due to my locale settings on my laptop and on my phone, as in France the decimal point is a comma “,” instead of default US dot “.”.

The real fix would be to change the way the file is written (according to the doc the timezone is updated when you log on the web interface or on the mobile app) but I didn’t immediately find where it was done.

So, Here is a quick howto to fix these scripts:

First enable ssh in the web interface
Login through ssh from a terminal in your host pc

ssh root@mypassport.local

Inside the root shell, type the following commands:

$ cd /sbin

List the files to fix:

$ grep -l timezone_offset *.sh                                                                         
SDCard_StorageTransfer.sh
USB_StorageTransfer.sh
automount.sh
mtpmount.sh
sdmount.sh

Fix the files:

$ sed -i -e 's#`cat /etc/timezone_offset`#`cat /etc/timezone_offset | tr , .`#g' *.sh

Check that the changes have been correctly applied:

$ grep timezone_offset *.sh                                                          
SDCard_StorageTransfer.sh:timeoffset=`cat /etc/timezone_offset | tr , .`
USB_StorageTransfer.sh:timeoffset=`cat /etc/timezone_offset | tr , .`
automount.sh:    timeoffset=`cat /etc/timezone_offset | tr , .`
mtpmount.sh:		timeoffset=`cat /etc/timezone_offset | tr , .`
mtpmount.sh:					timeoffset=`cat /etc/timezone_offset | tr , .`
sdmount.sh:    timeoffset=`cat /etc/timezone_offset | tr , .`

You’re done, now:

$ exit

Now SD Cards and my camera are automatically detected and mounted upon insertion. Auto backups work like a charm !

It would be nice if WD would release a firmware update to fix this, in the mean time I hope this quick hack would help you as much as me. It would be rather easy to create a custom firmware .bin file (it’s just a tar file containing a rootfs tar, so changing it is straightforward) but I’m lacking time to do it.


My Passport Wireless Pro won't recognize SD/USB anymore after using MyCloud app
SD Card is not mounted, import fails: one of root causes found
My Passport Wireless Pro won't import from any physical media
#2

After some more experiments:

  • using the web interface from my linux laptop sets the timezone_offset file to ‘2’ which allows the disk to work fine without any modification.
  • using the My Cloud App from my Android 8 device sets the timezone_offset file to ‘2,00’ which makes the mount and backup scripts to fail as stated above.

#4

Hi, I have the same problem.
Can you tell me better how to edit the timezone_offset file without any changes?

Thankyou!


#5

Hi,
If you can’t apply the fix above (I agree this require some basic knowledge in unix shell knowledge), as stated above and in some other posts, the temporary workaround is to open the UI from a browser (from your pc or even from your phone), there is no guarantee but it looks like to set a compatible timezone in most of the cases… until you open the app again.


#7

I installed the previous firmware on my WD (1.03.04) and I can easily transfer files from SD and USB using the app for Android.

Confident for a new firmware with correction of this bug.


#8

I tried this. It was mostly working as well, but some nasty details I don’t remember exactly (either the ptp transfer from the camera, or a time issue in the folder naming upon a sdcard transfer). This is where I identified the bug linked to timezone_offset. After I tried the last firmware, found that issue was the same (even if behaviour was different), fixed it as stated above, and sticked to it.


#9

By the way Dmitry has a better fix here:


#11

Thankyou!!


#12

I’ve built a new custom firmware image with the fix proposed by Dmitry. It’s available here:

https://drive.google.com/file/d/1q3MPGhMITDAi2T7wyRM9NtG3Ecmmdfl9/view?usp=sharing

sha1sum:
1e92992815fb32155fc04c2722bdb1b7b0f38e28 PassportWirelessGen2_1.04.17-fix-tz1.bin

beside the fix itself, I’ve updated the version number to 1.04.17-fix-tz1
I’ve tested the image on my device, so it works fine (the 1st I posted a few days ago was corrupted, sorry about that).


#13

I installed your custom firmware, ggrandou, and I must say it’s great!
Thank you!


#14

Thank you for taking the time to make a fix as Western Digital don’t care at all.
Unfortunately the link is not working anymore.
Is it possible to have back the fix?
Thanks again


#15

I’ve uploaded the file on Google drive and I have updated my original message with the share link. Enjoy :slight_smile:


#16

Thanks, the link is working now.
I will try the firmware this evening!


#17

I’ve just tested it and it seems it’s working!
Thanks again ggrandou :grinning: