example-gatt-server question/clarification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Having played with the example-gatt-server code, I have two basic questions that I need some help/clarification with:

1) I am writing a custom service with a single characteristic. Do *I* need to add any of my own descriptor stuff? Or is the basics handled by the library. The example is ambiguous because the interfaces to the stock attributes (e.g. heart rate, etc), do NOT add any descriptors. But the Test* variants, which are the only custom attributes in the example, does add a descriptor or two. So I’m left wondering is the purpose that these were added because A) you have to add descriptors for your own custom characteristics or B) because the example is demonstrating/testing additional things that you *could* do with additional descriptors.

2) In all WriteValue() implementations found in the code, a self.method() is never invoked. self.state might be adjusted/updated, but never is a method called. Is this just the way it turned out, or are there actual reasons not to do that? I’m finding that a pattern like:

    class MySubclass(Characteristic):

        def myOwnMethod(self):
            print(“Hello World”)

        def WriteValue(self, value):
            self.myOwnMethod()

seems to stop at the invocation of myOwnMethod. I don’t know if this is a dbus call back issue or something else.

TIA--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux