Skip to content

Use Python

yingjie2018new edited this page Jan 30, 2019 · 5 revisions

Discover Devices

In this sample we will show you how to have the Router scan and discover the sensors nearby. The sample uses dbus and bluetoothd as a bridge to communicate between your application and the BLE chip. So, please make sure that services dbus-daemon and bluetoothd are running before starting your application.

sudo dbus-daemon --system
// Please run “sudo rm -f /var/run/dbus/pid” if it prompts the file exist
sudo bluetoothd -d -E &

Please find python test script in ~/test-python, and then run python test-discovery.py in your console to obtain BLE scan data.

Clone this wiki locally