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

Has 1.7.5 broken 16 bit service UUID's on iOS? #1031

Closed
ml-imas opened this issue Sep 9, 2024 · 7 comments
Closed

Has 1.7.5 broken 16 bit service UUID's on iOS? #1031

ml-imas opened this issue Sep 9, 2024 · 7 comments
Assignees
Milestone

Comments

@ml-imas
Copy link

ml-imas commented Sep 9, 2024

Hi,

The fixes in #1021 for #905 and #1014 seem to have broken 16 bit service UUID's like 180a (Device Information Service). Calling ble.read with "180a" as service_uuid used to work fine, but now results in an error saying

Malformed UUID: 180a

This looks like l. 1104 in BLECentralPlugin.m , and it matches with the change from using CBUUID's UUIDWithString to NSUUID's initWithUUIDString .

Using the full 128 bit UUID (like in UUIDHelper.java) doesn't work. The UUID is no longer rejected but we end up with

Could not find service with UUID 0000180A-[...]

instead; it doesn't seem to match the services reported by the device.

@gwhenne
Copy link

gwhenne commented Sep 9, 2024

We're having the same issue with 1.7.5 - it was working fine in 1.7.4. Here is what is showing on the Safari remote console:

Screenshot 2024-09-07 at 9 06 43 AM

@sam-higgs
Copy link

Also experiencing this issue with versions 1.7.5 and 1.7.6.

@peitschie peitschie self-assigned this Sep 9, 2024
@peitschie peitschie added this to the 1.7.7 milestone Sep 9, 2024
@peitschie
Copy link
Collaborator

Can confirm the regression. Will get out a fix shortly.

peitschie added a commit that referenced this issue Sep 10, 2024
Additional UUID validation on iOS inadvertantly prevented 16 & 32-bit UUID
formats from being accepted.
peitschie added a commit that referenced this issue Sep 10, 2024
Additional UUID validation on iOS inadvertantly prevented 16 & 32-bit UUID
formats from being accepted.
@peitschie
Copy link
Collaborator

A fix has been released in 1.7.7 (and I've added some more test cases to cover this!)

Thanks for the quick reports!

@gwhenne
Copy link

gwhenne commented Sep 10, 2024

Thank you! The main problem is solved.

The message "Malformed UUID: 180F" is gone, but ble.startNotification still shows the second message, "The attribute could not be found."
Something is still wrong.
Although it looks connected and works okay, ble.isConnected fails. But once the device turns off, the app receives the "Peripheral disconnected" message.

@peitschie
Copy link
Collaborator

@gwhenne is this issue on iOS or Android?
Are you able to raise a new issue with some more detail, and potentially confirm if the behaviour was different with a previous version of the plugin?

What you are describing sounds unrelated to this particular regression.

@gwhenne
Copy link

gwhenne commented Sep 12, 2024

Thank you. Yes, it does appear to be a different problem. A new issue has been opened here:

#1035

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

No branches or pull requests

4 participants