IOBox - PC File Syncing (xorg tools)

Overview
In/Outbox (iobox) is a Xorg Tools function that allows syncing webOS files/folders to a Windows PC or any other OS/NAS device that supports cifs/samba. It sets up /media/internal/iobox with inbox/outbox folders. Drop a file in the outbox on either end and it shows up in the inbox on the other end.

How this method works
This uses Xorg Tools to setup the configuration.

It uses existing cifs filesharing and rsync to perform the syncing.

In a nutshell, it mounts a Windows fileshare onto webOS device and uses rsync to sync. Cron scheduling (limited) is used to periodically check for updates.

Requirements
You need the following tools/knowledge to use this service...

- A Windows PC or OS/NAS device that supports cifs or samba - PC terminal access to phone, or webOS Quick Install - Need to know the local IP address of the PC - Helps to know how to setup Windows print/filesharing -- though the xt wizard walks you through setup

How to install
Install Xorg Tools

Paste this in a terminal session or use webOS Quick Install Linux Command line...

cd /tmp && wget -qO- http://dl.dropbox.com/u/3812896/xt.setup | /bin/sh

In Terminal app (available on Preware) or in a Terminal session...

- Run 'xt' from linux

Find the IP address of the computer before continuing. If you don't know how to find the local IP address on your computer, this is not for you. Use the local IP address, not the WAN address. Best to start with local segment and then once working, tinker with router port forwarding to maybe use over EVDO and external WiFi.

Initial Setup

- adv) advanced menu - iob) iobox menu - ios) iobox initial setup

Follow all instructions very carefully.

Once installed, run a manual sync.

Manual Sync

- adv) advanced menu - iob) iobox menu - isn) iobox sync now

If this is successful, setup scheduling.

Scheduling

- adv) advanced menu - iob) iobox menu - sis) schedule iobox sync

There is an issue with cron that it doesn't consistently run jobs when asleep. It will sync when you use your phone or if charging. Am working on it.

Using the Inbox/Outbox Folders
This method cannot sync in both directions to the same folder so inbox and outbox folders are created.

webOS inbox and outbox locations: /media/internal/iobox/inbox /media/internal/iobox/outbox

Drop a file on webOS outbox and it will appear on Windows inbox. Drop a file on Windows outbox and it will appear on webOS inbox.

To delete files, you must do it from the outbox side. If you delete from the inbox side, it will be updated again. I hope to find a way around this in a future release.

Create Music/Video folders within the Windows outbox. When you drop media into those folders, the webos media apps will find them.

Use Internalz app (available on Preware) to manage moving files/folders in and out of iobox.

Troubleshooting
Permission Errors

If you get permission errors when doing a manual sync, check the following...

- Make sure the Windows backup folder share has 'full control'. Must have read/write access to the share. - Ensure the Windows folder _sharename_ is 'webos'. It must be named this. - The Windows user account cannot have a space in the name or password. If so, create a new Windows user with no space/password and re-run backup initial setup.

If you're unable to mount the drive and have all permissions set (ie: "... /mnt/iobox failed: No such device Mounting /mnt/iobox failed")

- Confirm if you're running a CIFS or NFS able Kernel. Earlier versions of UberKernel for instance, do not support CIFS or SMB. To update add the kernel testing feeds

Caveats
- The username and password on the Windows PC cannot have any spaces. You'll need to use or create an account on Windows that has no spaces for the user id and password.

- The username/password of the Windows PC appear in /etc/fstab. Anyone know how to hide this?

Layout Details
These are the configuration/script files involved if you want to make manual changes.

/media/internal/xorgtools/etc/iobbox.cfg (stores ip, username, passwd, etc) /var/spool/cron/crontabs/root (cron schedling)

/media/internal/xorgtools/iob.mnu (the iobox menu) /media/internal/xorgtools/iob (directory of iobox scripts)

How to Remove
Remove the backup setup... - adv) advanced menu - iob) iobox menu - rib) remove iobox setup

This remove the iobox related entries in...

/var/spool/cron/crontabs/root /media/internal/xorgtools/iob.mnu /media/internal/xorgtools/iob

You can re-install with 'iobox initial setup' menu item.

ToDos/Requests
Please post other ideas and feature requests here.

Credits
Thanks much to testers... Vincent Law, navinaq, Kyusaku