The read function seems to be working fine, it is reading packetBytes as 0,
byte[] packetBytes = new byte[bytesAvailable];
and per the description on the oracle site, if len is zero,...
Type: Posts; User: baseball07
The read function seems to be working fine, it is reading packetBytes as 0,
byte[] packetBytes = new byte[bytesAvailable];
and per the description on the oracle site, if len is zero,...
This is the code and Logcat. I believe my indexing is correct. I am reading buffer position 0 which is the first index of the buffer where my data should be. I changed the initial Buffer read to 1,...
Hi yes thank you. I have actually tried many different array values and I still get the same thing. The code is reading it fine from the array, as the value of "b" is correct. It is just in that...
Thank you I was unaware of that. Something is still not right though. The buffer value is showing up as [] and the final string is blank in logcat. I confirmed that the buffer position is OK, as...
Thanks for the feedback, its lots of help, I have used println() on many variables to see what is going on, and I found that I was indexing incorrectly as per your suggestion. I am now having issues...
I have printed the variable "i" and "b" at various locations, see the attached logcat and updated code. My bluetooth device is broadcasting 1 byte of data every 1 sec (the value 0x02). "i" is...
Thanks Norm. My initial thought was a problem with the readbuffer array size and/or for loop, however any array size throws an exception, and I also tried changing the loop to for(int i=0;i <=...
Hey guys, my appologies, I was not aware my attachment was so small. Here is logcat. Note the code doesn't reach the if statement
03-08 14:29:02.240: D/libEGL(1652): loaded...
Hi, I have attached a picture of the logcat to my original post.
Hi I have the following code which reads in data from a bluetooth transmitter, however the program is crashing upon read-in. The bluetooth connects to the device just fine, as indicated by the...