duxiyao/android-serialport-api

I receive only 4 byte in input when i send some bytes

Opened this issue · 0 comments

As title, i get my problem when i write some data on serial port and then i get 
some bytes in input. I receive only 4 bytes when they should be 7 or more...  

What steps will reproduce the problem?
1.I send some bytes on serial port
2.I get a response
3.onDataReceived() has its buffer size = 4 every time

What is the expected output? What do you see instead?
I expect a buffer with 7 bytes or more, but i see only 4 bytes. e.g. i have a 
feedback program that send this array [0x10,0x02,0x00,0x06,0xF9,0x10,0x03] 
(this is what i expect in input from serial port) but i get every time this one 
[0xF9,0x10,0x03,0x06]. It seems that after 4 bytes the other ones overwrite the 
exitsing 4 bytes. I need to extend the size of input buffer

What version of the product are you using? On what operating system?
I'm using the original code provided by this project. My embedded system has 
Android 4.0.3

This is my first approach with rs232 port so please help me :D 


Original issue reported on code.google.com by ngazz...@gmail.com on 21 Mar 2015 at 9:45