Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Embedded system HW3

  • Team member: 林萬荃 周君桓 陳柏睿
  • This is a python program with bluepy library in attempt to change the CCCD value of a test GATT service on android phone(we use nRF Connect android app).
  • The repository contains the following files:
    • README.md
    • main.py

How to use & Expected behavior

From the android app, we first create an advertiser(which includes the device complete local name)

Example Image

you can see the service uuid and the characteristic uuid in the GATT Configuration page

Example Image

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.py

You 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

Example Image

Send a notification from the android app

Example Image

you should see the following output (sent random data 4 times)

Example Image

Courtesy

beautifulzzzz

bluepy manual

About

This is a bluepy sample program which changes the target cccd value

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages