Trees | Indices | Help |
---|
|
Class that represents a Bluetooth socket based client. To connect a client via Bluetooth, the Bluetooth MAC address (12 hex characters) and the Bluetooth port (channel) of the server must be known (server info). All other server information is irrelevant (Bluetooth friendly name, Bluetooth service name), but the server info may be retrieved by a Bluetooth search from the server name or the service name.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|
|||
isVerbose = False
|
|||
CONNECTING = "CONNECTING"
|
|||
CONNECTION_FAILED = "CONNECTION_FAILED"
|
|||
CONNECTED = "CONNECTED"
|
|||
DISCONNECTED = "DISCONNECTED"
|
|||
MESSAGE = "MESSAGE"
|
|
Creates a Bluetooth client prepared for a connection with a BTServer. The client uses an internal handler thread to detect incoming messages. State changes invoke the callback onStateChanged(state, msg) where state is one of the following strings: "CONNECTING", "CONNECTION_FAILED", "DISCONNECTED", "MESSAGE". msg is a string with additional information: CONNECTING: serverInfo, CONNECTED: serverInfo, CONNECTION_FAILED: serverInfo, DISCONNECTED: empty, MESSAGE: message received
|
Sends the information msg to the server (as String, the character (ASCII 0) serves as end of string indicator, it is transparently added and removed).
|
Performs a connection trial to the server with given serverInfo. If the connection trial fails, it is repeated until the timeout is reached.
|
Perform a device inquiry for the given server name. The Bluetooth channel is not inquired, always assumed to be 1.
|
Perform a service inquiry for the given service name.
|
Closes the connection with the server. The endOfTransmission message is sent to the server to notify disconnection.
|
Returns True of client is connnected to the server.
|
Returns the library version.
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Apr 16 12:46:33 2017 | http://epydoc.sourceforge.net |