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

skip uart service check for devices requested by name or MAC #162

Closed fanoush closed 1 year ago

fanoush commented 1 year ago

Do not check for advertised Nordic UART service for BLE devices that are requested directly by -p ma:ca:dd:re:ss or -d devicename. This is how it already works for official devices with known names.

This is both a workaround for bug in noble-winrt and also way to force connection to device with missing advertising info.

This was the most straightforward solution. Feel free to cleanup/fix poor javascript coding.

gfwilliams commented 1 year ago

Thanks! Sorry for the delay - I was wondering whether to add some comments the code but I've run out of time so just merging now.