12/17/2023 0 Comments Radbeacon connect to triplog![]() Just like the uart_service.py example this will connect to the first found UART device, send a string, and then print out messages that are received for one minute. low_level.py - This is a lower-level example that interacts with the services and characteristics of a BLE device directly.Note this example only works on Mac OSX! Unfortunately a bug / design issue in the current BlueZ API prevents access to the device information service. device_info.py - This example will connect to the first BLE UART device it finds and print out details from its device info service.The example uses a simple syncronous BLE UART service implementation to send and receive data with the UART device. uart_service.py - This example will connect to the first BLE UART device it finds, send the string 'Hello World!' and then wait 60 seconds to receive a reply back.list_uarts.py - This example will print out any BLE UART devices that can be found and is a simple example of searching for devices. ![]() This will install the library so it can be used by any script on your system.Īlternatively you can run sudo python setup.py develop to have the library installed in develop mode where changes to the code (like doing a git pull) will immediately take effect without a reinstall.Īfter the library is installed examine the examples folder to see some examples of usage: The steps below describe how to install BlueZ 5.33 on a Raspberry Pi running its Raspbian operating system. Release for your distribution, or install into a virtual machine that can protect your desktop machine from conflicts. Ubuntu in particularĬan get into a very bad state since core components depend on BlueZ. The distribution's older BlueZ installation and wreaking havoc with package dependencies. You might cause an issue with the new BlueZ version conflicting with Warning: Be careful compiling and installing a later version of BlueZ on top of an existing version if you useĪ Linux desktop OS like Ubuntu, Debian, etc. It's important to use this more recent version of BlueZ as the BLE APIs are still in development and a bit experimental. To gain access to the Bluetooth LE API it exposes. On Linux (like with a Raspberry Pi) you'll need to compile and install the latest version of BlueZ, currently version 5.33, Windows 10 appears to have a more capable BLE API but it has not yet been invesigated to see if it can be supported by this library yet. Windows 8 does not have BLE device search and pairing APIs. The library currently does not support Windows since BLE support is limited on that platform. Note that if you're using a different Python, like the one provided by Homebrew, be sure to install PyObjC for that version of Python. The library depends on PyObjC which Apple includes with their Python version on OSX.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |