What I want to do is sending 42 bytes binary data from mbed LPC1768 to my Android smartphone. The code I use is as follows.
usbIoManager = new SerialInputOutputManager(port,musbListener);
final ExecutorService executor = Executors.newSingleThreadExecutor();
executor.submit(usbIoManager);
As you can see, a serial port listener is set. "musbListener" implements SerialInputOutputManager.Listener. The callback function (a musbListener's method) is as shown below.
@Override
public void onNewData(final byte[] DataBuff) {
Log.d("DataBuff",DataBuff.toString());
final float[] Data = decode(DataBuff);
...
}
Let's see Logcat.
D/SerialInputOutputManager: Read data len=14
I expect for Android to receive full 42 bytes data, but only 14 bytes are received.
Please tell me what I should do to solve this problem.
What I want to do is sending 42 bytes binary data from mbed LPC1768 to my Android smartphone. The code I use is as follows.
As you can see, a serial port listener is set. "musbListener" implements SerialInputOutputManager.Listener. The callback function (a musbListener's method) is as shown below.
Let's see Logcat.
D/SerialInputOutputManager: Read data len=14
I expect for Android to receive full 42 bytes data, but only 14 bytes are received.Please tell me what I should do to solve this problem.