B4J Programming Press on the image to return to the main documentation page.

jBluetooth

List of types:

Bluetooth
BluetoothConnection

Bluetooth


Events:

DiscoveryFinished
DeviceFound (Name As String, MacAddress As String)
Connected (Success As Boolean, Connection As BluetoothConnection)

Members:


  CancelDiscovery As Boolean

  Connect (MacAddress As String)

  Connect2 (MacAddress As String, UUID As String)

  Initialize (EventName As String)

  IsEnabled As Boolean [read only]

  IsInitialized As Boolean

  Listen

  Listen2 (UUID As String)

  StartDiscovery As Boolean

  StopListening

Members description:

CancelDiscovery As Boolean
Cancels the current discovery process.
Connect (MacAddress As String)
Connects to the device with the given address.
Note that the device must be first found.
The service UUID is set to: 00001101-0000-1000-8000-00805F9B34FB (default SPP).
The Connected event will be raised when the device is connected or if there was a problem to connect.
Connect2 (MacAddress As String, UUID As String)
Similar to Connect. Allows you to use a different UUID.
Initialize (EventName As String)
Initializes the object and sets the subs that will handle the events.
IsEnabled As Boolean [read only]
Returns true if the Bluetooth adapter is powered on.
IsInitialized As Boolean
Listen
Starts listening for connections.
The service UUID is set to: 00001101-0000-1000-8000-00805F9B34FB
The Connected event will be raised when a client is connected.
Listen2 (UUID As String)
Similar to Listen. Allows you to use a different UUID for the service.
StartDiscovery As Boolean
Starts searching for devices. The DeviceFound will be raised for each device.
Note that paired devices will also be listed (even if they are not nearby).
The DiscoveryFinished event will be raised at the end.
StopListening
Stops listening for incoming connections.

BluetoothConnection


Events:

None

Members:


  Disconnect

  InputStream As InputStreamWrapper [read only]

  MacAddress As String [read only]

  Name As String [read only]

  OutputStream As OutputStreamWrapper [read only]

Members description:

Disconnect
Closes the connection.
InputStream As InputStreamWrapper [read only]
MacAddress As String [read only]
Name As String [read only]
OutputStream As OutputStreamWrapper [read only]

Top