This sample app for python bluetooth shows the basic use of Python HMKit to authenticate with the car emulator, send and receive a command through bluetooth. Parking Meter App to demonstrate Python SDK with Head unit-Notification capable cars.
Developer Center: https://developers.high-mobility.com/
Getting Started with Python Bluetooth Beta SDK: https://high-mobility.com/learn/tutorials/sdk/python/
Code References: https://high-mobility.com/learn/documentation/iot-sdk/python/hmkit/
Set Python 3.7 as default in alternatives.
Install python hmkit sdk in the "Raspberry Pi Zero W or Pi Model3 B or Pi Model3 B+" board from github repo: https://github.com/highmobility/hmkit-python
Before running the parking meter app, make sure to configure the following in the app: (Refer Getting Started: https://high-mobility.com/learn/tutorials/sdk/python/)
- Initialise hmkit with a valid Device Certiticate from the Developer Center https://developers.high-mobility.com/
- Find the Access Token in respective emulator from https://developers.high-mobility.com/ and paste it in the source code to download Access Certificates from the server.
Disable system default Bluetooth software elements (run once per reboot) $./sys_bt_off.sh
Run the app on your raspberry board, to see the basic flow:
- Initialising the SDK
- Getting Access Certificates
- Bluetooth Connecting and authenticating with an emulator
- Sending and receiving commands
$./parking_meter_app.py Raspberry Pi device need internet access to be able to download Access Certificate.
We would love to accept your patches and contributions to this project. Before getting to work, please first discuss the changes that you wish to make with us via GitHub Issues, Spectrum or Slack.
See more in CONTRIBUTING.md
This repository is using MIT license. See more in LICENSE