-
Notifications
You must be signed in to change notification settings - Fork 7
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
Setting MFG data in for advertising #9
Comments
I'm curious, where did you get the type: |
look at the table below: I would go for {qay} |
the doc says: dict ManufacturerData (A dictionary from uint16 to array of bytes) Thanks! |
Even though you are not getting an error I would still verify bluez is getting what it expects from the advertisingClass.js for mfg-id over dbus. I have seen bluez make a call over dbus and if the format is off at all it will simply reject the call and keep going without the data. I wonder if another approach would be to set the ID some how in the bluez configuration for your Raspberry Pi. |
Okay, I've logged the output from dbus-monitor and compared the outputs between using the code to start advertising and using bluetoothctl ManufacturerData is a dictionary where the key is the mfg-id (uint16) and the value is the array of bytes. When using bluetoothctl we get: See how the code incorrectly parsed the mfg-id to string instead of uint16. |
I have a lot going on right now and not able to spend much time on this. You may want to look at the other classes I have created (I would start with the characteristicClass.js) and see if there is an example of using an array of bytes along with a definition. If not the next step is to try different combinations until you find one that works (trial and error). That is how I figured out all the definitions. If you get it working please share your results. I would love to add this feature! |
I'm unable to set the manufacturer id of the manufacturer data in advertisingClass.js file.
I added:
this._iface1.addProperty('ManufacturerData', { type: { type: '{q(y)}' }, getter: (callback) => { callback(null, { 0xffff : [0x01, 0x02, 0x03, 0x04, 0x05] } ); } });
using nRFConnect, I can see the advertising as should, but the manufacturer id is incorrect.
I get a different id every time I run the app.
I also tried to play with the type with many other combinations ({qay} {say}, {sav} etc.)
I'm using BlueZ 5.50 on Raspberry PI Zero W
The text was updated successfully, but these errors were encountered: