LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

bluetooth read problem

Hi,
I'm developping a pda application that reads serial data from a bluetooth connection. The device that sends data to the pda has a baud rate of 19200, and its data are strings of 28 byte each.My application performs a loop and reads 28 chars at a time.But it seems that the pda is loosing data. In 70 seconds it should read 5000 strings, instead it reads about 4600, in 140 seconds it should read 10000 strings, instead it reads about 8900(28 chars at 19200 are sent in about 14ms). The more the time increases, the more the pda is slow and looses data. Do I have to clear any buffer or something like this? Where is the problem? Thank you. Eli
0 Kudos
Message 1 of 3
(2,989 Views)
Hi,

checking the error cluster, do you see warnings and/or errors?
If you don't receive errors, try to change the input "mode" of the Bluetooth Read function to "buffered".
Also, try to do a very simple code in which you use the open and close functions outside of the while loop and only the read function inside it.
Try to use the wait function setted to 1msec.
Regards
AmbuA
0 Kudos
Message 2 of 3
(2,989 Views)
Hi,
the cluster error says anything, there are no errors.
I tried to change from standard to buffered mode, but it didn't happened anything different. The open and close function are of course out of the while loop.
It seems that the rx buffer of the pda became blocked. Even if I do a read operation every 70ms and set the wait function to 14ms the delay in receiving data is the same. Is there any buffer to clear? Thank you. Eli
0 Kudos
Message 3 of 3
(2,989 Views)