Bittorrent Sync On Miwifi?


huahang

Recommended Posts

I have noticed that BitTorrent Sync is available on many NAS devices. There is a very well selling device from XiaoMi in China named MiWiFi. It's a wireless router with a 1TB storage attached. 

 

http://www.mi.com/miwifi

 

XiaoMi provides a plug-in development/publishing platform officially:

http://dev.xiaomi.com/doc/?page_id=2511

 

And the SDK package could be downloaded here:

http://bigota.miwifi.com/xiaoqiang/sdk/tools/package/sdk_package.zip

 

Is it possible for BitTorrent Sync to compile a runnable binary and provide a plugin for MiWiFi?

 

Link to comment
Share on other sites

  • 1 year later...

I would like to make the same request.

MiWiFi is a modern router with built-in NAS in two versions: 1TB or 6TB. The device is made by a rising brand in China called Mi which has gained humongous popularity. It comes with iOS, Android and desktop apps that provides access to the NAS. But for whatever reason the desktop versions only provide access in LAN mode, which effectively kills off the cloud storage capability. Many users are disappointed and are searching for alternatives. The first reaction is to create a VPN, however China being what it is, all ports are blocked thus making it impossible with VPN solution. Right now the solution is Syncthing which is a breeze to install, but it doesn't support iOS. A lot of people would be interested in BT Sync with iOS client to backup Camera Roll.

For me though, it doesn't have to be a plugin. There are two install versions supporting ARM and ARMHF, but none of them works. I always get the -bash: ./btsync: No such file or directory.

Link to comment
Share on other sites

6 hours ago, Yobytae said:

For me though, it doesn't have to be a plugin. There are two install versions supporting ARM and ARMHF, but none of them works. I always get the -bash: ./btsync: No such file or directory.

You typically get this error when the dynamic loader cannot be found. Sync (on ARM HF) expects /lib/ld-linux-armhf.so.3:

% file btsync
btsync: ELF 32-bit LSB executable, ARM, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, stripped
~/Downloads/sync % strings btsync | grep lib.ld-
/lib/ld-linux-armhf.so.3

If this file is not present, you have to find the path of the dynamic loader and symlink it:

% find /lib -name 'ld-linux*'
<dynamic loader path>
% sudo ln -s <dynamic loader path> /lib/ld-linux-armhf.so.3

Then the 'No such file or directory' message should go away.

Link to comment
Share on other sites

7 hours ago, iswrong said:

You typically get this error when the dynamic loader cannot be found. Sync (on ARM HF) expects /lib/ld-linux-armhf.so.3:


% file btsync
btsync: ELF 32-bit LSB executable, ARM, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, stripped
~/Downloads/sync % strings btsync | grep lib.ld-
/lib/ld-linux-armhf.so.3

If this file is not present, you have to find the path of the dynamic loader and symlink it:


% find /lib -name 'ld-linux*'
<dynamic loader path>
% sudo ln -s <dynamic loader path> /lib/ld-linux-armhf.so.3

Then the 'No such file or directory' message should go away.

Thanks for the reply. file doesn't work, nor does readelf.

% find /lib -name 'ld-linux*'

...does not yield anything. I only have two 'ld-*' files in that directory:

ld-uClibc-0.9.33.2.so 

ld-uClibc.so.0

This is the reply when I try to link:

% ln -s /lib/ld-uClibc.so.0 /lib/ld-linux-armhf.so.3

ln: /lib/ld-linux-armhf.so.3: Read-only file system

Link to comment
Share on other sites

Ah. I had this issue on Linux ARM with glibc and a read-write root filesystem. This may be a bit more work on such a constrained environment. Another thing you can try (except for hoping that Resilio creates a package) is to update the dynamic linker path in the btsync binary to /lib/ld-uClibc.so.0. You can do this e.g. with patchelf:

https://nixos.org/patchelf.html

Of course, it will probably be hard to do this from the NAS, but you could do this from another Linux machine and copy the patched binary to the NAS. Some Linux distributions (e.g. Debian) have patchelf in their repositories.

Link to comment
Share on other sites

Thanks iswrong. I am running Mac OS X with parallels, so I created a new virtual machine with Ubuntu. For those interested, here's a link on how to install patchelf on Ubuntu: http://installion.co.uk/ubuntu/vivid/universe/p/patchelf/install/index.html

Now here's the result of this "hack":

parallels@ubuntu:~$ patchelf --print-interpreter btsync

/lib/ld-linux-armhf.so.3

parallels@ubuntu:~$ patchelf --set-interpreter /lib/ld-uClibc.so.0 btsync

parallels@ubuntu:~$ patchelf --print-interpreter btsync

/lib/ld-uClibc.so.0

 
...so that worked. But then another problem.
 

# ./btsync -h

Segmentation fault (core dumped)

 
Sorry for all these followup questions. I'm new to Linux environment.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.