Git Product home page Git Product logo

bluepy_cccd's Introduction

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

bluepy_cccd's People

Contributors

ericlin0123 avatar rakechen-0307 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.