Thursday, March 6, 2014

Did run android serial communication about!


Google android official website for serial communication program that is now able to send data, but can not accept the data!
 
try {
byte [] buffer = new byte [64];
if (mInputStream == null)
return;
size = mInputStream.read (buffer);
if (size> 0) {
onDataReceived (buffer, size);
}

The problem lies in the size = mInputStream.read (buffer), the implementation of this step is not performed down solving!<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
I top! Can not sink! ~ ~

Reply:
You download an android-serial-api open source look!
Reply:
Try, but also not receiving data!
 
size = mInputStream.read (buffer)

Perform this step is not performed down solving!
Reply:
After performing this step, we've been waiting for this news sent over the serial port. You can try to send data to the serial port using the software wizard to try
Reply:
I send data on the pc in the past or not show ah? Do what actions need to terminate him?
Reply:
references, 5th Floor zhaokanghui reply:
I send data on the pc in the past or not show ah? Do what actions need to terminate him?


Are you sure the serial port on it? After executing the READ this step, the thread has been parked waiting for this data sent from the serial port, it is not down to proceed.
Reply:
references, 5th Floor zhaokanghui reply:
I send data on the pc in the past or not show ah? Do what actions need to terminate him?


While do like this feeling. When single-step debugging will find that when the serial port has received the message, it will continue down the next sentence.
Reply:
reference to the 6th floor l7890590p reply:
Quote: references, 5th Floor zhaokanghui reply:

I send data on the pc in the past or not show ah? Do what actions need to terminate him?


Are you sure the serial port on it? After executing the READ this step, the thread has been parked waiting for this data sent from the serial port, it is not down to proceed.


I'm sure the serial port, because I was able to send the data over, but that is less than acceptable! ~ ~ ~ Board a little problem, usb not identify! ~ ~
Reply:
reference to the 8th floor zhaokanghui reply:
Quote: references to the 6th floor l7890590p reply:

Quote: references, 5th Floor zhaokanghui reply:

I send data on the pc in the past or not show ah? Do what actions need to terminate him?


Are you sure the serial port on it? After executing the READ this step, the thread has been parked waiting for this data sent from the serial port, it is not down to proceed.


I'm sure the serial port, because I was able to send the data over, but that is less than acceptable! ~ ~ ~ Board a little problem, usb not identify! ~ ~


You can put the problem into focus Why not receive the above, the code does is stopped at the line waiting for news of this right. Good luck to you.
Reply:
And I found that I send data to the serial port inside, he still will not go down, because I read () function is one that is under Wangwaimian send data through the serial port, but he did not send, so I feel like he is stuck in this one simply do not go below executed! ~ ~
Reply:
Top that did seek help answer! ~ ~
Reply:
Line may be broken chant. Oscilloscopes measure it.
Reply:
reference to the 12th floor shukunn reply:
line may be broken chant. Oscilloscopes measure it.

Line absolutely no bad students that you want more,
Reply:
Sorry, just saw your message to me, you look there are no other ports occupy your port,
May be the reason the port is occupied or not, if you email me, I returned promptly reply yangtingpretty@163.com, please share.
Reply:
size = mInputStream.read (buffer)
This code is blocking IO, if the data has not been heard, they will have to stop here, and other data have been waiting for the highest power.
It is recommended to use serial debugging software to try if there is data transfer over.
Reply:
The landlord Hello! I also use the google official website of the serial communication program, also encountered the same problem, I do not know you do not have to solve, and would like to talk to you next, my QQ: 402906079
Reply:
reference to the third floor zhaokanghui reply:
tried, it does not receive data!
 
size = mInputStream.read (buffer)

Perform this step is not performed down solving!


You should perform this second step to the number of stopped it, stream is null, and then directly out of the way!
Reply:
inputStream.avalible is empty, there is no data to be read, in the end what is the reason? Solving a
Reply:
LZ Hello, can you put your current hardware and software to let us know about, I encountered a similar problem, I just can not read, but read a card that will not move until the
Reply:
Amount, ladies shoes upstairs, I am sorry, that I changed my strategy directly used to send the data entered, I do not send, receive that do not get now and then did not get up, prepare for the exam to review it! ~
Reply:
I have encountered this problem solved, ah,

No comments:

Post a Comment