Bluetooth data synchronization CSPro 7.5

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Bluetooth data synchronization CSPro 7.5

Post by emdisala » March 16th, 2021, 12:49 pm

Dear CSPro team

This is regarding Bluetooth data synchronization

Bluetooth server side I ran

Code: Select all

syncserver(Bluetooth);
and the client side

Code: Select all

    if syncconnect(Bluetooth) then
        syncfile(PUT,"abc.txt");
        syncdata(PUT,DE_DICT);
        syncdisconnect();
    endif;
This program worked with CSPro 7.3

But with CSPro 7.5 it gave error with syncdata function.

Syncfile function worked fine.

Server side error Client side images are attached.

Please guide me

Thank you

Disala Ekanayake
Attachments
CLI.PNG
CLI.PNG (6.02 KiB) Viewed 1080 times
SER.jpg
SER.jpg (39.77 KiB) Viewed 1080 times

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

Re: Bluetooth data synchronization CSPro 7.5

Post by josh » March 16th, 2021, 3:33 pm

Can you post your application or send it to us at cspro@lists.census.gov? Also please send steps to reproduce the problem and let us know whether you are using Android for client and server or if it is Windows and Android.

emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala » March 17th, 2021, 4:15 am

Dear Josh

Thank you for your prompt reply.

Herewith attached the applications and test results with different device combinations. Said error @ last test (Test four).

Thank you again

Disala
Attachments
CSPBT75.zip
(78.97 KiB) Downloaded 45 times
SyncTest.pdf
(232.83 KiB) Downloaded 50 times

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

Re: Bluetooth data synchronization CSPro 7.5

Post by josh » March 17th, 2021, 8:00 am

Thank you for the very excellent test application. I was able to easily reproduce the problem. This is a bug that occurs because the server application opens the data file as read-only. We will fix it in the next release.

In the meantime there is a workaround. If you add a writecase statement somewhere in the server application this will force CSPro to open the data file as read-write instead of read-only. So if you add a function like this one in your PROC GLOBAL it will fix the problem. You don't need to actually call the function. Just the fact that it is there is sufficient.

Code: Select all

PROC GLOBAL
function makeCSProOpenExternalDictAsWriteable()
	writecase(EXTDATAFILE_DICT);
end;
Note that you may need to delete the existing data file on the server in receivedData when you run this the first time. This is because the earlier failure leaves that data file in a corrupt state.

emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala » March 17th, 2021, 10:09 pm

Dear Josh

Thank you very much for the information and guidance.

Disala

emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala » April 15th, 2021, 1:12 am

Dear Josh / CSPro Team

I tried with new version of CSPro (CSPro 7.6.0 Release Date 2021-03-31) and got errors with the same attached (CSPBT75.zip / March 17th, 2021) program.

Errors are attached (SyncTest2.pdf), please guide me

Thank you all


Disala Ekanayake
Attachments
SyncTest2.pdf
(121.81 KiB) Downloaded 34 times

aaronw
Posts: 419
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Bluetooth data synchronization CSPro 7.5

Post by aaronw » April 15th, 2021, 5:47 pm

I wasn't able to reproduce your issue. I rebuilt both PENs with CSPro 76, then installed CSEntry 76 on both devices. Verify:
  • both PENs were built with CSPro 76
  • both devices are running CSEntry 76

emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala » April 16th, 2021, 12:44 am

Dear Aaronw

Thank you for your prompt reply.

This time I used different two tablets to test the synchronization. As you suggested PEN files built with CSPRO 76. I regenerated pff files and the database using CSPro 76. It is strange, same happening. (Error in SyncTest3.pdf)

Any clue please.

Thank you

Disala
Attachments
SyncTest3.pdf
(91.15 KiB) Downloaded 32 times

aaronw
Posts: 419
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Bluetooth data synchronization CSPro 7.5

Post by aaronw » April 16th, 2021, 4:43 pm

I retested the issue and I was able to reproduce the issue. We thought this issue was fixed, but let us take a bit more time to take a look at it. As Josh mentioned previously, your workaround is to add the writecase. Thanks for reporting this again.

emdisala
Posts: 20
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala » April 17th, 2021, 4:43 am

aaronw wrote:
April 16th, 2021, 4:43 pm
I retested the issue and I was able to reproduce the issue. We thought this issue was fixed, but let us take a bit more time to take a look at it. As Josh mentioned previously, your workaround is to add the writecase. Thanks for reporting this again.
Thank you, hope good news.

Disala

Post Reply