cause i have to send only a few bytes beach packed... for simplification like a ping or a deathmans switch. But for this data ists absolutly nessesary to put them in an special given frame.
Am Freitag, 20. Juli 2012 19:52:06 UTC+2 schrieb bob:
--Why not append your data into one big buffer and do one send of the big buffer?
On Friday, July 20, 2012 6:51:01 AM UTC-5, superpsycho wrote:Hey devs,
i would like to know if it´s possible to sent data over bluetooth without interruption.
With the source below i got fragmented packages on the reciverside.
CODE:
OutputStream outStream = serialSocket.getOutputStream(); Log.d(TAG,"outStream created success!");
byte[] buffer ={0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42};
outStream.write(buffer);
byte[] buffer ={0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42};
outStream.write(buffer);
byte[] buffer ={0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42};
outStream.write(buffer);
RESULT:
Connectionindicator: 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42
Connectionindicator: 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42
Connectionindicator: 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42
WANTED RESULT:
NO_Connetionindicator: 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x33, 0x34, 0x42, 0x34, 0x42, 0x33, 0x34, 0x42 and so on and so on...
My BT-chip on the reciverside supports a streammode where all the redudant AT-Commands become supressed but only if booth sides support the type of sending. The application for this provided service is a connection via bluetooth nobody is able to differentiate from an real cable.
My usecase is an selfmade protocoll i need to speak with the ARM connected to the reciverchip.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment