Bluetooth synchronization CSPro 7.0

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
Post Reply
kaif
Posts: 5
Joined: June 6th, 2017, 5:55 am

Bluetooth synchronization CSPro 7.0

Post by kaif »

Hi

I am trying to setup bluetooth synchronization between two android devices. One acting as server and the other as client. Where should the "syncserver" function be located on the server device and how do we execute it?

Thanks,

Kaif
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth synchronization CSPro 7.0

Post by josh »

Usually you would put the syncserver() call in a menu application. The interviewer then chooses that option from the menu at the same time that the other user chooses a menu option that calls syncconnect(). You can see an example of this in the "Synchronization in Logic" example in the CSPro 7 examples folder which can be found in Documents\CSPro\.
kaif
Posts: 5
Joined: June 6th, 2017, 5:55 am

Re: Bluetooth synchronization CSPro 7.0

Post by kaif »

Thanks for the reply Josh, but there is no such folder under the CSPro folder.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth synchronization CSPro 7.0

Post by josh »

On my computer it is in C:\Users\josh\Documents\cspro\Examples 7.0\1 - Data Entry\Synchronization In Logic

You can also open the examples folder from the Help menu in CSPro designer.
kaif
Posts: 5
Joined: June 6th, 2017, 5:55 am

Re: Bluetooth synchronization CSPro 7.0

Post by kaif »

Ok Josh, got it.

Thanks
kaif
Posts: 5
Joined: June 6th, 2017, 5:55 am

Re: Bluetooth synchronization CSPro 7.0

Post by kaif »

Hi

I am using setfile to attach a csdb file to my dictionary and perform syncdata afterwards. The file is being attached correctly but the synchronisation is not working. Here is a screen shot.
Screenshot_2017-06-12-14-35-22.png
Screenshot_2017-06-12-14-35-22.png (94.49 KiB) Viewed 7444 times
Here is the syncdata code:

if syncconnect(bluetooth) then

setfile(CMPHS17, "./Data/test1.csdb") then

syncdata(PUT, CMPHS17) then

syncdisconnect();

stop(1);
endif;
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth synchronization CSPro 7.0

Post by josh »

Can you post the sync.log files from both devices. You can find it in the CSEntry folder.
kaif
Posts: 5
Joined: June 6th, 2017, 5:55 am

Re: Bluetooth synchronization CSPro 7.0

Post by kaif »

Hi Josh

Sending you the 2 log files. The interviewer log is from the client device while the supervisor log is from the server device.

Thanks
sync(interviewer).log
(530 Bytes) Downloaded 364 times
sync(supervisor).log
(387 Bytes) Downloaded 326 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth synchronization CSPro 7.0

Post by josh »

On the server log you are getting the following error:

13/06/2017 09:51:07.282 ERROR: Error: dictionary CMPHS17 is not syncable

This means that the data file associated with the dictionary CMPHS17 is not a csdb file. It may be a text file or it may not be associated with a file at all. Make sure you add the dictionary CMPHS17 as an external dictionary in your server application and that you associate it with a csdb when you run the application.
Post Reply