我现在是要实现开发板与电脑实现通信,我现在无法获取的到CASE1中的数据 ,我得到的是 nullh 无论我发什么都是返回这个数据 null,求助高手帮忙 谢谢
int len = HardwareControler.read(fd, buf, 300);
String string = new String(buf, 0, len);
byte[] bs = string.getBytes();
for (int i = 0; i < bs.length; i++) {
String hex = Integer.toHexString(bs & 0xFF);
if (hex.length() == 1) {
hex = '0' + hex;
}
case1 = hex.toUpperCase();
}
new readThread().start();// 处理完消息后立即开启监听线程
Log.d(thread, "接收到数据,新线程启动");
commucationView.append(case1 + "h\n");