I'm doing a project, is the Android phone and stollman series Bluetooth module for communication. The Bluetooth SPP protocol data transmission module, that is, the data package, and serial transmission, how can I receive Android end to this data, the need to achieve serial SPP agreement? What changes in the program do?
Reply:
Brothers, solved? I have encountered this problem
Reply:
Finally themselves, and upload their own code snippets about
private static final UUID MY_UUID = UUID.fromString ("00001101-0000-1000-8000-00805F9B34FB");
BluetoothServerSocket bss = BluetoothAdapter.getDefaultAdapter () listenUsingRfcommWithServiceRecord (NAME_SECURE, MY_UUID);.
You can read and write operations on the SOCKET
Reply:
Finally themselves, and upload their own code snippets about
private static final UUID MY_UUID = UUID.fromString ("00001101-0000-1000-8000-00805F9B34FB");
BluetoothServerSocket bss = BluetoothAdapter.getDefaultAdapter () listenUsingRfcommWithServiceRecord (NAME_SECURE, MY_UUID);.
You can read and write operations on a SOCKET.
00001101-0000-1000-8000-00805F9B34FB is UUID for serial operation from ANDROID help documentation can be found.
Reply:
Finally themselves, and upload their own code snippets about
private static final UUID MY_UUID = UUID.fromString ("00001101-0000-1000-8000-00805F9B34FB");
BluetoothServerSocket bss = BluetoothAdapter.getDefaultAdapter () listenUsingRfcommWithServiceRecord (NAME_SECURE, MY_UUID);.
You can read and write operations on a SOCKET.
00001101-0000-1000-8000-00805F9B34FB is UUID for serial operation from ANDROID help documentation can be found.
Reply:
Brothers can leave a contact number? My Q: 5072639, need advice, can provide paid compensation.
Reply:
I can connect, but can not read data ...
Log.d ("examle", "start read"); / / execute
if (mmInStream == null) {
Log.d ("example", "mmInstream is null"); / / do not perform
} Else {
Log.d ("example", "mmInStream is ok"); / / execute
}
/ / Read from the InputStream
bytes = mmInStream.read (buffer);
Log.d ("example", "read over"); / / not executed
No comments:
Post a Comment