Page 1 of 1
Bluetooth synchronization CSPro 7.0
Posted: June 6th, 2017, 6:05 am
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
Re: Bluetooth synchronization CSPro 7.0
Posted: June 6th, 2017, 6:44 am
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\.
Re: Bluetooth synchronization CSPro 7.0
Posted: June 6th, 2017, 7:23 am
by kaif
Thanks for the reply Josh, but there is no such folder under the CSPro folder.
Re: Bluetooth synchronization CSPro 7.0
Posted: June 6th, 2017, 7:32 am
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.
Re: Bluetooth synchronization CSPro 7.0
Posted: June 7th, 2017, 2:11 am
by kaif
Ok Josh, got it.
Thanks
Re: Bluetooth synchronization CSPro 7.0
Posted: June 12th, 2017, 6:44 am
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 (94.49 KiB) Viewed 7502 times
Here is the syncdata code:
if syncconnect(bluetooth) then
setfile(CMPHS17, "./Data/test1.csdb") then
syncdata(PUT, CMPHS17) then
syncdisconnect();
stop(1);
endif;
Re: Bluetooth synchronization CSPro 7.0
Posted: June 12th, 2017, 7:33 pm
by josh
Can you post the sync.log files from both devices. You can find it in the CSEntry folder.
Re: Bluetooth synchronization CSPro 7.0
Posted: June 13th, 2017, 2:50 am
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
Re: Bluetooth synchronization CSPro 7.0
Posted: June 13th, 2017, 6:45 am
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.