Tuesday, February 25, 2014

Android Bluetooth Receive data loss problems


Andrews younger self for some time, the recent Android Bluetooth program in the series, hoping to make the phone and Bluetooth communication module for data transmission. Program service mobile terminal is mainly written in reference to an instance inside the doc, and now the problems encountered, the mobile terminal receives data sent from the Bluetooth module has a data loss situation, generally losing the first one, and so a large amount of data, it will Random lost ... asked a great God, and he simply said to use string to do the cache, the cache rather than using a byte array to do ...
I have changed a long time ... did not get ... seek the guidance of the great God! ! ! !<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
How to implement the program, how to lose, how much data?
Reply:
The reply was deleted at the moderator 2012-02-28 17:11:30

Reply:
Has now been resolved - let me send data to the following students in the frame inside added some flags, and then check the header frame position to judge, you can receive a complete frame ~ Thank you for answering!
Reply:
Canadian flag header and trailer inspection to determine whether a detailed point of it recently, I also get discovered phenomenon is lost Thanks
Reply:
The landlord, can elaborate, I also met this problem, always close insufficiency ~ ~
Reply:
How to solve the same problem of looking landlord landlord answered twelve-mail yaoqingyun168@163.com
Reply:
The landlord speaks more detailed pleading
Reply:
With the landlord seeking 1028690597@qq.com
Reply:
I have encountered this problem, as the landlord to resolve, add header and trailer, if the test frame head and tail are incorrect, incomplete data is considered, this can normally be acceptable to parse the string, no problem , but have not thought about such a problem, if the data transmission time is important, but just incomplete data can not be used, when the next transfer miss this information, and how to do? QQ: 475542598 want to encounter the same problem and I can discuss.

No comments:

Post a Comment