Search code examples
bluetoothbluetooth-lowenergyalexa-skills-kit

What language/libraries best for BLE connectivity?


Operating system: MacOS

Just for some context on what I am trying to do, I have an Ikea standing desk which has bluetooth. I am able to control the desk with a built in app. I want to create a server running on a raspberry pi that connects to desk and controls it, I then want to create an Alexa skill which will control the desk by calling the server endpoints.

What's the best language/library you would suggest I use? Ideally something that would run on MacOS and Ubuntu.

I don't know anything about BLE yet which is why it is hard for me to find a good answer. If you have resources, books or tutorials that will help me get running with BLE please recommend them.

My use case:

  • Get desk to go up
  • Get desk to go down
  • Get current position of desk

Solution

  • If you want to write one app that works for both MacOS and Ubuntu then as ukBaz said, python and Bleak are your best options. If you want to use the native way of writing BLE apps for each OS, then you can use CoreBluetooth on MacOS and BlueZ on Ubuntu. The advantage of the former is that you can get an application up and running quickly, and the advantage of the latter is that you will find a lot more resources and advanced functionality.

    Below are some resources that can help you in your development:-

    Theoretical Bluetooth:

    CoreBluetooth

    BlueZ

    Python