Dbus & Bluez Programming Language

For the project I am doing, I have to connect my Linux PC to the Bluetooth LE device. Designing the application I will be deployed to the embedded ARM system when it is completed. Searching for documentation on the Internet means that Python is the preferred programming language for such applications. All Bluez / test examples are written in Python, and there are quite a few sources of information about creating BLE applications in Python. Not much in C.

My boss and I had arguments in favor of whether to use Python or C. One of his arguments was that using Python to set up Bluetooth LE connections was unacceptable and that Bluetooth LE had to be very timely to work properly. My argument was that the overhead would not matter much since there were no time limits for bluetooth LE connections; The application will find the device, connect to a specific one and read several attributes that it saves in the file.

My question is: is there any reason to prefer a low-level C approach using a high-level Python implementation for a base application that reads GATT services and their characteristics? What will be the implications for the embedded device?

+4
source share
2 answers

This is a fairly open question, because when making such a decision, there are many things to consider. Therefore, the best β€œanswer” may be an attempt to narrow the discussion:

Based on the question, I proceed from the assumption that the system you are aiming for has D-Bus and Python, available with all the necessary dependencies.

, , BlueZ API. API D-Bus, API libbluetooth, , , Python . , /, , Python D-Bus .

API C , D-Bus, , C .

" " , , . , .

, , . ( ), ..

+3

- :

  • BlueZ (, 5.36+), BLE - "" , "-E" ( )

  • API C, , GPL ( 100% ). DBus ( )

0

Source: https://habr.com/ru/post/1609320/


All Articles