Page 1 of 2

FTP Sync

Posted: October 30th, 2014, 10:35 am
by adisa
Hello,

I am trying to sync data from android device to ftp server, but it isn't working.
Does anyone tried to sync data using ftp server? :?

Re: FTP Sync

Posted: November 3rd, 2014, 1:17 pm
by Gregory Martin
I have synced many files between my Android phone and my FTP server. Have you looked at the sync instructions here:

http://www.csprousers.org/help/html/dat ... zation.htm

Remember that you first have to download a .pnc (sync file) to your device, and then you can perform a synchronization.

Re: FTP Sync

Posted: November 18th, 2014, 2:09 am
by MrTaco
HI, How do i download pnc.file to my device... coz i have been trying to sync ftp with my smartphone?

Re: FTP Sync

Posted: November 18th, 2014, 2:40 am
by adisa
You should put .pnc file on ftp server and after you connect your smartphone with the server you should see the .pnc file listed

Re: FTP Sync

Posted: November 21st, 2014, 1:56 am
by MrTaco
okay thanks will do....

Re: FTP Sync

Posted: November 24th, 2014, 6:41 am
by MrTaco
So one another thing is it possible to assign each and every user to login, so they could work on their Folder or Batch numbers?

thanks

Re: FTP Sync

Posted: November 24th, 2014, 7:46 am
by josh
Yes it is. You would have to create a separate sync file for each user since the login username is included in the sync file.

Alternatively you could use the same login for all users and include %UID% in the path for the folder that each user syncs to (for example

Code: Select all

ServerPath=/%AppName%/Data/%UID%
). This way each user's data will get written to a different folder on the server based on the username set on the Android device.

Re: FTP Sync

Posted: December 9th, 2014, 5:11 am
by arkagwa
Dear Josh
everything is working perfect for mein FTP, expect two issues.
1.The data entry allows duplicate questionnaire id (identifier) in mobile form while same app in PC can detect duplicate identifier
2.I have entered 4 cases and iwant to download back the file to Pc but when i download it , the file with my use name is empty. How do i get the data file???

Here is my code in mynsyncftp.pnc file allocated in ftp://ftp.research-eperts.org/CSPROSYNC
[SyncFile]
Version=CSPro 6.0
AppName=UG FORM FTP
[Server]
Type=FTP
Host=ftp://ftp.research-experts.org/
Username=arkagwa
Password=***********
[Sync]
ServerPath=/%AppName%
CreateClientPath=/%AppName%
CreateClientPath=/%AppName%/Data
ClientPath=/%AppName%
Get=*.*

the other two files are located here:
ftp://ftp.research-experts.org/UG FORM FTP/UG FORM.pen
ftp://ftp.research-experts.org/UG FORM FTP/UG FORM.pff

Re: FTP Sync

Posted: December 9th, 2014, 7:49 am
by josh
CSPro should never allow duplicate case identifiers either on the PC or on Android. I would have to see your application code in order to see why this is hapening.

The reason that you are not seeing your data file downloaded from the device is because yor sync specification file is not correct. You are using Get *.* in your sync which downloads from the FTP server to the Android device (the client). To transfer from the Android device to the server you need to use the Put command. Also make sure that you use the CreateServerPath and ServerPath to set the correct directory on the FTP server to upload your data files to and to also use the ClientPath command to point the directory on your Android device that contains the data files.

Re: FTP Sync

Posted: December 9th, 2014, 8:43 am
by arkagwa
Ooooh could be nice to get a pdf doc or video tutorial for this or give clear commands here and root directory. See attached file