Thursday, January 23, 2014
android bluetooth problems, how to cancel or skip adapter to connect the adapter directly communicate!
Daniel seeking advice, a recent study of Bluetooth communication, I do not know how to solve two problems encountered
A Bluetooth adapter is connected to separate bound and how to skip directly connected to the adapter binding
2, the end of the current program can receive data as a service and timely response to a request sent by the client, but as a request sent by the client can not get a response
Which gets advice cattle, gratitude
Reply:
1 What you say is a Bluetooth device pairing it? Security considerations, this pairing is necessary
2 what phone you use, ah, is said to start the service end Android phones Bluetooth socket MTK platform, there is a problem, you can use Bluetoothchat demo sdk bands try.
Reply:
1, that a Bluetooth device pairing is not possible, or that can not be directly connected to skip pairing, right?
2, I use the company's own research and development of our logistics machine equipment, I was learning Bluetoothchat demo, but the demo is used to manage these three threads, I want to ignore the thread, but there will always be a problem, that is return data when a client sends data to the server, the server is able to receive data, but I would like to receive the data at the server to the client again, this time the client is not receiving the
Please large cattle guidance
Reply:
Reference Bluetoothchat on the line, Bluetoothchat connect two devices to send data that is initiated client, you look at the process, not what's the problem.
Reply:
In fact, this process I know, I now have a little do not understand, please cattle little guidance about:
Client creates a connection request, the request Server instance of an object through a call to connect method BluetoothSocket received the request to call the accept method by BluetoothServerSocket Server instance object and returns a BluetoothSocket object returnSocket, in this returnSocket Demo is entrusted to a thread, read and write input and output streams in the thread. A process is this request as Client B, and the first send a data "This is A" to B, when B receives this data, you need to return a piece of data to A, for example, "has received a letter from A's" , and this is how data is parsed A? I hope Daniel guidance
Reply:
Use the Observer pattern
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment