You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I’m working with a bluetooth peripheral device that is programmed to use custom gatt services and characteristics. I’m trying to see if it might be possible to find out what the UUIDs for them are by first calling device.discoverAllPrimaryServices() and then having each service in the array print out it’s uuid as well as all of it’s characteristics UUIDs using a function like this:
const getAllUUIDs = (arr) =>{
for(let i = 0; i<arr.length; i++){
trace(UUID is ${arr[i].uuid})
}
}
But the output is [object ArrayBuffer]
I’ve tried various methods to convert it into a string but none of them have worked
If I can get some pointers on how this might be done please let me know, thanks!
The text was updated successfully, but these errors were encountered:
In JavaScript, an ArrayBuffer is an array of bytes. You wrap it in a TypedArray to access the content. Here's a small example that outputs the bytes of an ArrayBuffer as hex bytes:
Hi, I’m working with a bluetooth peripheral device that is programmed to use custom gatt services and characteristics. I’m trying to see if it might be possible to find out what the UUIDs for them are by first calling device.discoverAllPrimaryServices() and then having each service in the array print out it’s uuid as well as all of it’s characteristics UUIDs using a function like this:
const getAllUUIDs = (arr) =>{
for(let i = 0; i<arr.length; i++){
trace(
UUID is ${arr[i].uuid}
)}
}
But the output is [object ArrayBuffer]
I’ve tried various methods to convert it into a string but none of them have worked
If I can get some pointers on how this might be done please let me know, thanks!
The text was updated successfully, but these errors were encountered: