espruino-cli not working (Windows 10, BLE, winnus/noble) #6705
Replies: 1 comment
-
Posted at 2023-04-19 by @gfwilliams What are you actually trying to connect to? A Bluetooth device? And you're on a Windows system by the look of it? which version? It looks like despite the errors, Serial is still working ok. If it's windows and you want Bluetooth, your issue is that the modules that would handle Bluetooth LE on windows haven't installed properly. Best bet is to remove espruino again using NPM, then re-install it and see what the log message displays. Note: If anyone knows of a module that handles Bluetooth LE on windows properly, and that actually installs without trouble then I'm very happy to include this in the CLI Posted at 2023-04-20 by neshanjo2 As the title says, it's Windows 10. Espruino Command-line Tool 0.1.46 I like to access my Bangle.js 2, but I thought this is some generic problem. I don't know what the COM-ports actually are on my system. I've already reinstalled the cli and still get the error. I also assume that no bluetooth modules are installed, since AppData\Roaming\npm\node_modules\espruino\node_modules\ does not contain folders winnus or noble, and the @abandonware subfolder is empty. The By the way, while looking at the code where the noble error comes from, I discovered serial_noble.js lines 58ff
where the exception from Posted at 2023-04-20 by @fanoush
I briefly tried https://github.com/Timeular/noble-winrt mentioned here EDIT: It even says "On non-Windows platforms or Windows versions lower than 10.0.15063 this will use the regular noble implementation" Posted at 2023-04-20 by @gfwilliams Sorry - I missed the title.
Ok, wow, that's strange then. I guess because they're listed as 'optional' it now doesn't show you if they fail to install. The idea with the code you posted is to allow it to work with Please can you try again now? I just updated the If that doesn't work, maybe try I should add that even if that fails, you can still use the CLI by using your phone as a Bluetooth connection: https://github.com/espruino/EspruinoTools#web-ide-relay Posted at 2023-04-20 by neshanjo2 Thank you, Gordon! It now works. That's so great! I'm always impressed how quickly and well you reply to any issue here! BTW, I first tried Posted at 2023-04-20 by @fanoush
I just installed latest LTS node from https://nodejs.org/en/download and did not check the checkbox to install those extra tools on last screen. Then I run Looks like the When logging advertising data in There is even PR for that bug waiting here Timeular/noble-winrt#29 :-( Can I force the device address/name somehow from command line? When I added device name to https://github.com/espruino/EspruinoTools/blob/master/core/utils.js#L665 it connected and seems to work. maybe when passing Well, at least it works for all official devices in the list for now, which is good :-) Posted at 2023-04-21 by @gfwilliams
Thanks! I'll get a fix in for that.
Yes, you just do
What's concerning actually is I'm using https://www.npmjs.com/package/noble-winrt but maybe I should actually be using https://www.npmjs.com/package/@jefflloyd/noble-winrt instead? It seems more actively maintained - and it's possible that even without that change it would behave better? But it's also odd that the current solution works for us, but not for you Posted at 2023-04-21 by @fanoush
It is because for official devices you skip the check for advertised service uuids here I am trying with custom board name not in the list here So that's why I suggested to skip this EDIT: as for https://www.npmjs.com/package/@jefflloyd/noble-winrt yes, it is worth trying Posted at 2023-04-21 by @gfwilliams
Sorry, I missed that. That sounds good - do you want to do a PR for it? Posted at 2023-04-21 by @fanoush
ok, here it is espruino/EspruinoTools#162 Posted at 2023-04-23 by @fanoush I tried the https://www.npmjs.com/package/@jefflloyd/noble-winrt but unfortunately it needs to compile it from C sources via node-gyp (unlike the previous version). After installing build tools it fails to compile it. Looks like current LTS node uses VS2019 compiler which is more strict and does not like the source code so I gave up on this. Posted at 2023-04-24 by @gfwilliams Thanks - that's a shame... But the whole Node.js native addition stuff is (or at least was) a mess. I basically gave up on Winnus in the end :( Posted at 2023-05-04 by @fanoush
maybe you missed that one in post #11? https://github.com/espruino/EspruinoTools/pull/162 With that it is actually quite usable for me on Windows 10 with https://www.npmjs.com/package/noble-winrt you have there now. Fortunately this one does not need native compilation and just pulls some binary. Posted at 2023-05-04 by @gfwilliams Just merged. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2023-04-19 by neshanjo2
Hi!
I try to get espruino cli working.
I ran
and get several errors. The complete log is in the attachment, the problematic parts are shown here (the actual user dir was masked to by me before posting this):
Any suggestions?
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions