Reference   Examples   Installation   Download

Reference



bluetoothDesktop allows Processing sketches to send and receive data via Bluetooth wireless networks. It is an adapted version of Mobile Processing bluetooth library, written by Francis Li. The code and documentation material (except the examples) are almost entirely his work. Classes and methods are almost the same as in Mobile Processing Bluetooth library.

bluetoothDesktop works great together with mobile phones using Mobile Processing and its bluetooth library, but should be able to communicate with any other Bluetooth enabled device.

Bluetooth is a radio standard for short-range "personal area networks." The standard includes communication protocols for discovering other devices and the software services running on those devices.

Using this library, a Processing sketch running on a computer with a JSR-82 implementation can connect to other Bluetooth devices as well as act as a service that other devices can connect to.

Bluetooth

This class provides the primary interface for discovering and establishing a Bluetooth network connection.

Bluetooth
cancel()
discover()
find()
start()
stop()


Device

Objects of this class represent nearby devices discovered on the Bluetooth network.

Device
name
address
cancel()
discover()


Service

Objects of this class represent software running on devices that can be connected to via the Bluetooth network.

Service
name
description
provider
device
connect()


Client

Client objects are used to communicate with other devices and services.

Client
read()
readBoolean()
readBytes()
readChar()
readInt()
readUTF()
skipBytes()
stop()
write()
writeBoolean()
writeChar()
writeInt()
writeUTF()




Events

Callback methods that get called when things happen in the bluetoothDesktop library.

deviceDiscoverEvent()
deviceDiscoveryCompleteEvent()
serviceDiscoverEvent()
serviceDiscoveryCompleteEvent()
clientConnectEvent()