Page 1 of 1

Synctime Function with Bluetooth

Posted: October 24th, 2024, 3:52 am
by khurshid.arshad
Dear Team;

When i use the live ip or domain name, the synctime fuction works, but it does not workth with the bluetooth. Here is my code.

Get the value notappl;

Thanks.
a.


if designation=1 then
getsyntime=synctime(HHINTERVIEW_DICT, "http://servername/synchapp/api");
else
getsyntime=synctime(HHINTERVIEW_DICT,"Bluetooth");
endif;

Re: Synctime Function with Bluetooth

Posted: October 24th, 2024, 10:55 am
by justinlakier
Hello,

See the SyncTime documentation. This should be returning the last sync with any BlueTooth device, giving notappl if there was no synchronization. Have you had any BlueTooth synchronizations with this device? If not, then notappl is the expected return value. You can test this by doing a BlueTooth synchronization and then checking if synctime(HHINTERVIEW_DICT) matches synctime(HHINTERVIEW_DICT, "Bluetooth"), as the latest synchronization time should also match the latest BlueTooth synchronization time.

Hope this helps,
Justin

Re: Synctime Function with Bluetooth

Posted: October 24th, 2024, 11:43 am
by khurshid.arshad
I have already tried all the scenario but with no result. When I use the Bluetooth for synchronization, the data transfers from one device to another but it shows the notappl for the synchronization timing.

Here is my code

Function SendSupervisor()

dirlist(db_files, "..\103 - Data\","HH_"+ edit("9999",SYNCHLOGIN_ID)+"*" +".csdb");

If designation=2 and db_files.length()=0 then
errmsg ("You dont have the Household Data to send the Supervisor");

reenter;
else

If designation=1 then //Login as Supervisor

If syncserver (Bluetooth, "..") then // Get the Household data from enumerator
syncdisconnect();
else

endif;

elseif designation=2 then //Login as Enumerator
if syncconnect(Bluetooth) then // Send the Household Data to the supervisor
syncfile(PUT, "..\103 - Data\HH_4321_0011.csdb", "/103 - Data/");
syncdisconnect();
endif;
endif;
endif;

reenter; //add new line

end;

Re: Synctime Function with Bluetooth

Posted: October 25th, 2024, 11:59 am
by justinlakier
Hello,

Try using SyncData(PUT, HHINTERVIEW_DICT) instead of SyncFile. SyncData should be used for CSPro data files. This way cases of the dictionary will be synced and the dictionary's synctime will be updated, rather than a new file being uploaded.

Hope this helps,
Justin