Search:

Type: Posts; User: baseball07

Search: Search took 0.18 seconds.

  1. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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,...
  2. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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,...
  3. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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...
  4. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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...
  5. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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...
  6. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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...
  7. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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 <=...
  8. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    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...
  9. Replies
    21
    Views
    1,434

    Re: Help with serial read-in

    Hi, I have attached a picture of the logcat to my original post.
  10. Replies
    21
    Views
    1,434

    Help with serial read-in

    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...
Results 1 to 10 of 10