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

Cannot find bangle.js with espruino --list #144

Open
Inc0n opened this issue Nov 30, 2021 · 7 comments
Open

Cannot find bangle.js with espruino --list #144

Inc0n opened this issue Nov 30, 2021 · 7 comments

Comments

@Inc0n
Copy link

Inc0n commented Nov 30, 2021

https://banglejs.com/apps/ says web bluetooth is disabled on firefox (the browser I am using).
The quick start guide says that it is disabled current on my laptop.

Getting started with espruino cli and the following output is observed.

$ espruino --list         
Espruino Command-line Tool 0.1.40
-----------------------------------

PORTS:
  /dev/tty.debug-console  (undefined)
  /dev/tty.wlan-debug  (undefined)
  /dev/tty.Bluetooth-Incoming-Port  (undefined)
zsh: abort      espruino --list
@MaBecker
Copy link

Hmm, I can see mine

$ uname -a 
19.6.0 Darwin Kernel Version 19.6.0: Tue Oct 12 18:34:05 PDT 2021; root:xnu-6153.141.43~1/RELEASE_X86_64 x86_64
$ espruino --list
Espruino Command-line Tool 0.1.40
-----------------------------------

PORTS:
  /dev/tty.Bluetooth-Incoming-Port  (undefined)
  e5-3d-15-af-39-bd  (Bangle.js 39bd) RSSI -36
  c6-1d-10-f4-59-57  (Bangle.js 5957) RSSI -68

@gfwilliams
Copy link
Member

My guess is you don't have noble installed properly on your laptop. If you run with --verbose it may give you some hints.

But CLI is definitely the most painful way to get started with Bangle.js. Firefox does not support Web Bluetooth - if you could just install Chrome (even if you only use it for Bangle.js) everything will work great

@MaBecker
Copy link

That's what I think too.

$ npm list -g --depth=0
/usr/local/lib
├── @abandonware/noble@1.9.2-13
....

@Inc0n
Copy link
Author

Inc0n commented Nov 30, 2021

Hi, apology for the late response...
noble is installed:

$ npm list -g --depth=0
/opt/homebrew/lib
├── espruino@0.1.40
├── noble@1.9.1
...

uname output, I should have specified my platform earlier, but here it is:

$ uname -a 
20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64

I thought it was some sort of configuration that I may be missing here. Sadly, chrome does seem to have the best support for almost everything I need, such as the Stetho debug bridge with Chrome Developer Tools to now this Web Bluetooth.

@gfwilliams
Copy link
Member

Argh, that's interesting. So you're saying that Chrome on ARM Macs doesn't support Web Bluetooth?

What does espruino --list --verbose show? It might give some hints as to why Noble isn't working...

@gfwilliams
Copy link
Member

Another easy option to get started is: https://www.espruino.com/ide/relay/

But I guess you probably have an iOS phone, so even that may not be straightforward...

@Inc0n
Copy link
Author

Inc0n commented Dec 1, 2021

Argh, that's interesting. So you're saying that Chrome on ARM Macs doesn't support Web Bluetooth?

No, sorry, I meant that Chrome has the support for everything I need. Whereas firefox doesn't.

What does espruino --list --verbose show? It might give some hints as to why Noble isn't working...

Log output
$ espruino --list --verbose
0.1.40
Espruino Command-line Tool 0.1.40
-----------------------------------

Acorn library not found - you'll need it for compiled code
Found /opt/homebrew/lib/node_modules/espruino/libs/targz.js
Found /opt/homebrew/lib/node_modules/espruino/libs/utf8.js
Found /opt/homebrew/lib/node_modules/espruino/libs/esprima/escodegen.js
Found /opt/homebrew/lib/node_modules/espruino/libs/esprima/esmangle.js
Found /opt/homebrew/lib/node_modules/espruino/libs/esprima/esprima.js
Found /opt/homebrew/lib/node_modules/espruino/espruino.js
Found /opt/homebrew/lib/node_modules/espruino/core/codeWriter.js
Found /opt/homebrew/lib/node_modules/espruino/core/config.js
Found /opt/homebrew/lib/node_modules/espruino/core/env.js
Found /opt/homebrew/lib/node_modules/espruino/core/flasher.js
Found /opt/homebrew/lib/node_modules/espruino/core/flasherESP8266.js
Found /opt/homebrew/lib/node_modules/espruino/core/modules.js
Found /opt/homebrew/lib/node_modules/espruino/core/notifications.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_chrome_serial.js
No chrome.serial - Chrome Serial disabled
Found /opt/homebrew/lib/node_modules/espruino/core/serial_chrome_socket.js
No chrome.sockets - Chrome Socket disabled
Found /opt/homebrew/lib/node_modules/espruino/core/serial_frame.js
serial_frame: Not running in a browser
Found /opt/homebrew/lib/node_modules/espruino/core/serial_noble.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_node_serial.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_node_socket.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_web_audio.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_web_bluetooth.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_web_serial.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_websocket_local.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_websocket_relay.js
Found /opt/homebrew/lib/node_modules/espruino/core/serial_winnus.js
Not on Windows, Winnus not needed
Found /opt/homebrew/lib/node_modules/espruino/core/terminal.js
Found /opt/homebrew/lib/node_modules/espruino/core/utils.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/assembler.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/boardJSON.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/compiler.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/getGitHub.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/localModules.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/minify.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/pretokenise.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/saveOnSend.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/setTime.js
Found /opt/homebrew/lib/node_modules/espruino/plugins/unicode.js
UTF8 Library loaded successfully
Found /opt/homebrew/lib/node_modules/espruino/plugins/versionChecker.js
Initialising CodeWriter
Initialising Config
Initialising Env
Initialising Flasher
Initialising FlasherESP8266
Initialising Modules
Initialising Notifications
Initialising Serial
  - Initialising Serial Noble Bluetooth LE
  - Initialising Serial Node Serial
  - Initialising Serial Node Socket
  - Initialising Serial Web Audio
  - Initialising Serial Web Bluetooth
  - Initialising Serial Web Serial
Initialising Utils
Initialising Status
Initialising Assembler
Initialising BoardJSON
Initialising Compiler
Initialising GetGitHub
Initialising LocalModules
Initialising Minify
Initialising Unicode
Initialising VersionChecker
Initialising CoreModules
Initialising Pretokenise
Initialising SaveOnSend
Initialising SetTime
Searching for serial ports...
Noble: getPorts - initialising...
PORTS:
  /dev/tty.debug-console  (undefined)
  /dev/tty.wlan-debug  (undefined)
  /dev/tty.Bluetooth-Incoming-Port  (undefined)
zsh: abort      espruino --list --verbose

Another easy option to get started is: https://www.espruino.com/ide/relay/

I will definitely resort to this, and I do have an android phone actually :), M1 really is worth getting IMO.

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

No branches or pull requests

3 participants