HanSooloo

Can iOS client do LAN-ONLY sync

Recommended Posts

Have a relatively simple setup with FreeNAS running BTSync plugin at version 2.3.8.  Also running the iOS client 2.3.4.

If I do the following, I cannot get the iOS device to find the FreeNAS server and start doing a camera roll backup:

  1. Configure the FreeNAS btsync plugin to disable non-LAN connections:
    1. folder_defaults.use_relay = false
    2. folder_defaults.use_tracker = false
    3. folder_defaults.use_lan_broadcase = true
  2. Enable "Camera backup" on iOS device, email myself the link.
  3. Go to browser UI for FreeNAS btsync plugin, go to cogwheel at top right corner, select "Manual connection".
  4. Paste link from email, choose storage location.
  5. btsync web UI shows added folder and shows "Pending approval".
  6. Go to iOS device and approve the connection.

Observed Results:

  1. FreeNAS btsync UI shows folder with "No peers".
  2. iOS device shows "Camera backup" with "Connect to a device" notice.

Expected Results:

iOS device should see the folder on the FreeNAS btsync service and start backing up the items from the camera roll.

 

Alternate Flow:

If I enable relay and tracker, it starts syncing.

 

Can this work with LAN-ONLY setup?

Share this post


Link to post
Share on other sites

Quick update:

After I enable/disable relay+tracker, the iOS device is now able to talk to the server inside the LAN based on server logs. 

I don't see any external IP address in the logs.

Is the initial enabling of relay+tracker somehow allowing the 2 peers to "see" each other that wasn't possible via the LAN broadcast pings?

In the first instance without relay+tracker, the server peer's broadcast pings were left unanswered, as if the iOS device never "got" them.

Share this post


Link to post
Share on other sites

Yes, if the peers connected once, they remember each other's address. and then connect directly. Relay and Tracker and necessary only for peers to know each other's location. Later peers won't need them, even if you disable tracker and relay, of course, unless one of the peers changes its address. Or is offline for some 7 days. 

LAN only shall be possible through multicasts: one node sends them, the other shall receive. I suspect your server is wired, iOS wireless? check broadcasts between these. 

Share this post


Link to post
Share on other sites
On 7/15/2016 at 4:50 AM, Helen said:

Yes, if the peers connected once, they remember each other's address. and then connect directly. Relay and Tracker and necessary only for peers to know each other's location. Later peers won't need them, even if you disable tracker and relay, of course, unless one of the peers changes its address. Or is offline for some 7 days. 

LAN only shall be possible through multicasts: one node sends them, the other shall receive. I suspect your server is wired, iOS wireless? check broadcasts between these. 

Thank you for the detailed explanation.

I tried this on a MacBook Air (wifi) and iPhone6 (wifi) on the same SSID ... and still couldn't get the 2 devices to recognize each other.

I can see the MacBook Air sending broadcast packets to 239.192.0.0 at port 3838 .. but there doesn't seem to be any response from the iPhone.

Share this post


Link to post
Share on other sites

As an alternative, would it be possible to send the LAN Sync broadcast to the subnet's .255 style IP address, e.g., 192.168.1.255? 

Seems like some routers cannot handle certain broadcast scenarios.

As an example, on my Verizon FiOS Quantum Gateway router, if I manually send a UDP packet to 239.192.0.0, no other client receives the packet.  However, if I do the same to 192.168.1.255, then all devices receive the packet.

Test bed is using 'socat' program to generate UDP packets.

WORKS

socat - UDP-DATAGRAM:192.168.1.255:3838,broadcast

DOES NOT WORK

socat - UDP-DATAGRAM:239.192.0.0:3838,broadcast

 

Share this post


Link to post
Share on other sites

Confirmed with Verizon FiOS support (using Quantum Gateway, FiOS-G1100, 1.3.0.47.64) and the router vendor that broadcast packets sent to 239.192.0.0 are not supported.

 

Can the team look into providing an option to send broadcast packets to the .255 address of the subnet where the app is running?

Share this post


Link to post
Share on other sites

Thanks for the update. The team will look into it. 

 

UPDATE: the address is hardcoded, so it a bit troublesome to change it. We will take your case into account, and perhaps in future Sync configuration will be changed. 

 

So for you now tracker - is the way for peer discovery, I guess.

Share this post


Link to post
Share on other sites
On 7/27/2016 at 9:37 AM, Helen said:

Thanks for the update. The team will look into it. 

 

UPDATE: the address is hardcoded, so it a bit troublesome to change it. We will take your case into account, and perhaps in future Sync configuration will be changed. 

 

So for you now tracker - is the way for peer discovery, I guess.

Be happy to test a Beta build with the 192.xxx style IP address.

Thank you for the consideration.

Share this post


Link to post
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.