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
Ran into a device we couldn't see on btleplug, decided to try bluey. Luckily you have more error logging than I did. :)
We have a device that puts an invalid UTF-8 string in advertisements. On Windows/macOS/iOS/Linux, apparently this is handled below the OS APIs. However on Android, both bluey and btleplug get back the raw buffer. bluey will throw an error trying to parse this advertisement.
I'm fixing this in btleplug but calling String::from_utf8_lossy then filtering out the replacement character, like so:
String::from_utf8_lossy(device_name_str.to_bytes()).chars().filter(|&c| c != '\u{fffd}').collect()
Dunno if you're interested in doing the same (or if you're even still working on this), but just in case you run into it, thought I'd report it.
The text was updated successfully, but these errors were encountered:
Ran into a device we couldn't see on btleplug, decided to try bluey. Luckily you have more error logging than I did. :)
We have a device that puts an invalid UTF-8 string in advertisements. On Windows/macOS/iOS/Linux, apparently this is handled below the OS APIs. However on Android, both bluey and btleplug get back the raw buffer. bluey will throw an error trying to parse this advertisement.
I'm fixing this in btleplug but calling String::from_utf8_lossy then filtering out the replacement character, like so:
String::from_utf8_lossy(device_name_str.to_bytes()).chars().filter(|&c| c != '\u{fffd}').collect()
Dunno if you're interested in doing the same (or if you're even still working on this), but just in case you run into it, thought I'd report it.
Hey, yeah I can look at folding a similar fix into Bluey, thanks for the heads up!
As you no doubt saw, I haven't been working on Bluey actively recently though have had a few things in mind recently that might lead me to pick it back up.
Glad Bluey was useful to you as a point of reference at least!
Ran into a device we couldn't see on btleplug, decided to try bluey. Luckily you have more error logging than I did. :)
We have a device that puts an invalid UTF-8 string in advertisements. On Windows/macOS/iOS/Linux, apparently this is handled below the OS APIs. However on Android, both bluey and btleplug get back the raw buffer. bluey will throw an error trying to parse this advertisement.
I'm fixing this in btleplug but calling String::from_utf8_lossy then filtering out the replacement character, like so:
Dunno if you're interested in doing the same (or if you're even still working on this), but just in case you run into it, thought I'd report it.
The text was updated successfully, but these errors were encountered: