Bluetooth LE

I want to build a Raspberry Pi app to communicate with 3 or 4 Bluetooth LE servers (which will be Arduino 101’s, in fact). The Bluez library on the Pi (and elsewhere) is notoriously short on documentation, particularly for the API. I can communicate with my 101’s fine using command-line tools, but these are not, unfortunately, direct commands – first I have to invoke a special environment (eg bluetoothctl). Otherwise I could look at Soft Declare or Spawn.

But rather than use command-line tools via one of these mechanisms I feel it must be better to use a direct API.

Does anyone have any experience, advice, examples or working code which implements BLE on the Pi in Xojo?


I’m almost sure bluetoothctl can setup serial port trough bluetooth and arduino. You could then connect the Serial class in xojo to a /dev/rfcomm0 or so. Not sure ablout the name of the port.

You can try the serial examples on the pi perhaps?

Edited the port name.
Setup the pi using this:
RAspberry blutooth serial

Thanks, I’ll try this, to get some more experience. However, if I understand it, if i do that I’ll lock my single RPi Bluetooth port into the one device to which I’m paired.

However, what I want to do is use the capabilities of BLE to have 3 or 4 servers (these are the peripheral devices) simultaneously sending their data to the RPi.