espruino / EspruinoTools

JavaScript library of tools for Espruino - used for the Web IDE, CLI, etc.
Apache License 2.0
150 stars 89 forks source link

Remove '-' in service uuids to properly match NORDIC_SERVICE #164

Closed Totalus closed 11 months ago

Totalus commented 11 months ago

The services UUID reported by Noble contain hyphens, therefore not properly matching the NORDIC_SERVICE defined without hyphen.

https://github.com/espruino/EspruinoTools/blob/1b9109dcd847c8354d96316fa990133f13ba6fa6/core/serial_noble.js#L12

This cause the espruino --list call to not list devices that advertised the service.

This PR removes the hyphens from the UUIDs before comparing them.

gfwilliams commented 11 months ago

Thanks! That looks good! Which version of noble and which platform are you on out of interest? I seem to recall that different platforms report with/without dashes - which is why this would have worked for some people but not others I guess.

Totalus commented 11 months ago

@gfwilliams I'm on Windows 11 with noble 1.9.1.