Bluetooth data synchronization CSPro 7.5

Discussions about syncing data via Bluetooth, Dropbox, FTP, and using CSWeb
Forum rules
New release: CSPro 8.0
emdisala
Posts: 26
Joined: March 16th, 2021, 12:30 pm

Bluetooth data synchronization CSPro 7.5

Post by emdisala »

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 12565 times
SER.jpg
SER.jpg (39.77 KiB) Viewed 12565 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth data synchronization CSPro 7.5

Post by josh »

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: 26
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala »

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 221 times
SyncTest.pdf
(232.83 KiB) Downloaded 229 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Bluetooth data synchronization CSPro 7.5

Post by josh »

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: 26
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala »

Dear Josh

Thank you very much for the information and guidance.

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

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala »

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 234 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Bluetooth data synchronization CSPro 7.5

Post by aaronw »

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: 26
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala »

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 212 times
aaronw
Posts: 561
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: Bluetooth data synchronization CSPro 7.5

Post by aaronw »

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: 26
Joined: March 16th, 2021, 12:30 pm

Re: Bluetooth data synchronization CSPro 7.5

Post by emdisala »

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