D2xx Library & Android, packets buffered too long
Hi,
has anyone, apart from @Florian, ever tried to use the D2xx Library to communicate with the OpenBCI Dongle with an Android smartphone? I'm experiencing some issues and I would like to know if anyone would be able to help me in solving them.
The problem that I'm experiencing is that I cannot achieve a real-time communication between the smartphone and the dongle. This could be caused by the fact that the data packets are received in "groups" of packets rather than as single packets. I try to explain it better: if I check the number of available bytes to be read, I can notice that, from time to time, it bumps up to (current number of bytes to be read) + 15872. This number, 15872, corresponds to ~481 packets. For this reason, I can correctly read all the packets, but it is impossible to achieve a real-time communication.
I think that the problem is with the FTDI driver (the D2xx library), because the protocol that I implemented to read the data is equal to the OpenBCI C driver, and my data packets are all parsed correctly. Has anyone ever encountered this problem?
Another idea that I had was to use an HC05 module with the serial1 port: do you think that that would be a better approach?
Thanks.
Davide
