Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Set ArrayBuffer Value for Descriptor #5

Open
drewcovi opened this issue Feb 13, 2019 · 1 comment
Open

Unable to Set ArrayBuffer Value for Descriptor #5

drewcovi opened this issue Feb 13, 2019 · 1 comment

Comments

@drewcovi
Copy link

Attempting to set the following descriptors fails on the second descriptor. This approach works flawlessly on Linux, assuming something is getting lost in translation for the second descriptors arraybuffer

descriptors: [
                new Descriptor({
                    uuid: '2901',
                    value: Buffer.from('Volume', 'utf8')
                }),
                new Descriptor({
                    uuid: '2904', // https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
                    value: new Buffer([
                        0x04, // Uint8 0-255 value is allowed (numeric keypad)
                        0x00, // no exponent (value === value)
                        0x27, 0x25, // https://www.bluetooth.com/specifications/assigned-numbers/units joules (energy)
                        0x01, // Bluetooth SIG Assigned Numbers
                        0x00, // No description
                        0x00])
                })
            ]
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Expecting NSData value type for Format descriptor'
@drewcovi
Copy link
Author

@notjosh might this be related to xpc-connection? it looks like https://github.com/jongear/xpc-connect is more up to date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant