2

Blackberry(BB) device running Blackberry 10. Trying to read the data sent by the USB accessory using AOA protocol. /dev/aap0 created, which is a character file containing data sent by the USB accessory. While reading from this file, some data seems to be lost. For example, data from 1,2..10 is sent then 5,7,9 is lost while being read.

Debugging has not thrown light on why this data loss is happening. Could someone please let me know why this data loss is occurring and what can I do to avoid it ?

Alexander
  • 25
  • 5

2 Answers2

0

Ohh Ic. How about checking the data with a USB sniffer.

0

The data is not actually lost in BB10 but it appears so ,the reason behind the mentioned statement is the dissimilar packet size on receiver and sender side, BB10 usb works on packet size of 16kb(this is purely practical), while most of the sender transfer msg in packet size of 512b,change the sender packet size to 16kb and you no longer will be facing data loss.

user2910111
  • 342
  • 2
  • 3
  • 11
  • in order to be sure you can actually keep transferring data in a while loop with a counter ,in my case with sender pkt size of 512b the count value was 32 when the 1st msg was received on BB side ,thus changed the sender pkt size to (32*512b=16384b) and every thing worked. – user2910111 Nov 21 '14 at 05:19
  • How about trying to send a Zero Length Packet (ZLP) after each packet transmission ? – skylinedreamer Nov 21 '14 at 14:02