I just want to share fix for a bug that was annoying me for a long time.
This will probably affect you only if you have a smartphone with locale settings with number delimiter set to comma “,” instead of dot “.”.
I’m using my My Passport Wireless Pro usually only for SD card backups while traveling.
I’ve noticed that sometimes my WD My Passport Wireless Pro stops recognizing SD cards and not being able to do an SD card backup.
Finally I’ve decided to troubleshoot this issue prior to my next journey.
Luckily this device is linux-based box with SSH access.
I found that device is detecting SD card without issues, but later it’s fails at mount step with next error:
ufsd: failed to mount “mmcblk0p1”. bad option “bias=”
I’ve checked mount script and found that it’s caused by invalid value stored in /etc/timezone_offset file.
I have an android phone with Russian locale settings, with comma being used number delimiter by default.
WD My Passport Wireless Pro updates /etc/timezone_offset each time you’re accessing it through mobile app or web interface.
After you’re logging in using web interface everything works fine and /etc/timezone_offset is populated with “3” value and mount procedure works well, SD card import is started, but when I start mobile app and connect to device, /etc/timezone_offset if populated with “3,00” value, which is not correctly processed inside FW, since FW expect number delimiter to be a dot “.”, instead of comma “,”.
As a big picture it was seen that after you’re logging to device using web interface, SD card import starts working, but when you’re logging in to device using mobile app, SD card import stops working.
To make device to work again, simplest was is to login using web interface again, but I have a patch for REST api inside My Passport Wireless Pro.
How to patch you device to work correctly (you need to know how to use SSH and vi):
- login using SSH to your My Passport Wireless Pro
- open /var/www/rest-api/api/System/src/System/DateTime/Model/Configuration.php file using vi
- apply next patch around line 105:
$output = $retVal = null;
- $cmdString = "echo " . $changes['time_zone_offset'] . " > /etc/timezone_offset";
+ $timezone_offset = $changes['time_zone_offset'];
+ $timezone_offset = preg_replace('/,/', '.', $timezone_offset);
+ $cmdString = "echo " . $timezone_offset . " > /etc/timezone_offset";
exec_runtime("sudo bash -c '($cmdString)'", $output, $retVal, false);
This patch will replace all commas to dots in REST api that changes timezone_offset each time you’re logging into your device using either web interface or mobile app.
Hope this will help someone to solve their issues too and hope WD will integrate this patch into new FW update.
Here is a patched version of Configuration.php: http://ge.tt/9Qj4QEr2