- Team member: 林萬荃 周君桓 陳柏睿
- This is a
pythonprogram with bluepy library in attempt to change theCCCDvalue of a test GATT service on android phone(we usenRF Connectandroid app). - The repository contains the following files:
- README.md
- main.py
From the android app, we first create an advertiser(which includes the device complete local name)
you can see the service uuid and the characteristic uuid in the GATT Configuration page
Write them into the main.py line 4 and 5 together with the complete_local_name of the device at line 6
test_service_uuid = "Your GATT Service UUID"
test_service_char_uuid = "Your GATT Service Characteristic UUID"
complete_local_name = "Your Device's Complete Local Name"For example:
test_service_uuid = "0000aaa0-0000-1000-8000-aabbccddeeff"
test_service_char_uuid = "0000aaa1-0000-1000-8000-aabbccddeeff"
complete_local_name = "vivo V25 Pro"In Raspberry Pi, run the program with sudo privilege
sudo python3 main.pyYou shoud see the following output, as you can see the CCCD value has been changed from 0x0000 to 0x0002 and the service is waiting for notification
Send a notification from the android app
you should see the following output (sent random data 4 times)




