Git Product home page Git Product logo

Comments (4)

WayneKeenan avatar WayneKeenan commented on May 26, 2024

the core of the fix might be as simple as:

diff --git a/bluezero/peripheral.py b/bluezero/peripheral.py
index 4ae3cc0..8054f2c 100644
--- a/bluezero/peripheral.py
+++ b/bluezero/peripheral.py
@@ -330,7 +330,7 @@ class Characteristic(dbus.service.Object):
         # print('Update prop')
         self.PropertiesChanged(
             GATT_CHRC_IFACE,
-            {'Value': [dbus.Byte(self.value)]}, [])
+            {'Value': self.value}, [])

from python-bluezero.

ukBaz avatar ukBaz commented on May 26, 2024

Thanks for raising this.
I suspect that it needs to be changed to a dbus.ByteArray. I will take a look

from python-bluezero.

ukBaz avatar ukBaz commented on May 26, 2024

Take a look at 4af7aac as I think this solves it. I've not fully tested it but it is looking promising.

I'll test it some more and if it is good I'll tidy it up and push it to the master branch

In summary, I created a new function called int_to_dbus_bytes

I'm open to suggestions of a better name. Anyway, it gets used like this:
{'Value': bluezutils.int_to_dbus_bytes(self.value)}, [])

from python-bluezero.

ukBaz avatar ukBaz commented on May 26, 2024

@WayneKeenan can we close this? is this still a problem?
If it is, can you create a simple test?

from python-bluezero.

Related Issues (20)

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.