i have small device works bluetooth , want capture command launched device use them on computer, anyway tried use bluecove library
but receive chars, , when try launch commands device, inputstream doesn't receive anything
public void run() { try { // prepare receive data datainputstream inputstream = new datainputstream(mconnection.openinputstream()); system.out.println("waiting input"); while (true) { int command = inputstream.read(new byte[8]); //int donnee = inputstream.read() ; if (command == exit_cmd) { system.out.println("finish process"); break; } processcommand(command); } } catch (exception e) { e.printstacktrace(); }
Comments
Post a Comment