-
OK well maybe I have to install Chrome and go through that. Before I do, I updated espruino (0.0.31) and noble (1.7.0). Console output:
houghton:~ mozz$ espruino --list Espruino Command-line Tool 0.0.31 PORTS: TEST (test) /dev/cu.Bluetooth-Incoming-Port houghton:~ mozz$ espruino -p unknown Espruino Command-line Tool 0.0.31 Connecting to 'unknown' Port "unknown" not found Unable to connect! houghton:~ mozz$ espruino -p TEST Espruino Command-line Tool 0.0.31 Connecting to 'TEST' No result found - just got "\u0003\u0010console.log(\"<\",\"<<\",JSON.stringify(process.env),\">>\",\">\")\n" Connected
So I think I'm talking to the correct device ("
TEST
"?) but I get this "No result found..." and I can't issue commands. I tried, but the REPL doesn't seem to be working. Could be because I'm using ssh, terminal settings or something. I have to hit Ctrl+C twice pretty quickly to get out.Thanks for the support.
-
I am using the Mac Mini over ssh - don't really want to put Chrome on there to test the Web IDE, but I might resort to that. (From the laptop, the web IDE connects quite well and fairly quickly.)
It's not about reliability, to be frank: on the mac mini, espruino command line very consistently fails to connect :-(, and when it does "see" the puck, it always reports "unknown" as the address. If it wasn't for the laptop I wouldn't even know what its MAC address was.
So this is the failure I always see on the mac mini. It works about 1 in 2 from macbook.
espruino -p cd:47:aa:41:44:2d Espruino Command-line Tool 0.0.30 Connecting to 'cd:47:aa:41:44:2d' Port "cd:47:aa:41:44:2d" not found Unable to connect!
-
-
On one Mac (recent Macbook pro), from the
espruino
command line tool, withnoble
installed, I can see/connect to puck.js about 50% of the time. (I updated the firmware recently to improve this). For example:>$ espruino --list Espruino Command-line Tool 0.0.30 PORTS: cd:47:aa:41:44:2d (Puck.js 442d) /dev/cu.Bluetooth-Incoming-Port
On another Mac (Mac mini) in the same room, running the same software, I can't ever seem to connect, and I get this when scanning (see "unknown" below) with what feels like a less than 50% success rate:
$ espruino --list Espruino Command-line Tool 0.0.30 PORTS: unknown (Puck.js 442d) /dev/cu.Bluetooth-Incoming-Port
Why is
espruino
on the mac mini able to "see" puck but not work out its address, or connect to it?I've had such limited success connecting to the thing, even with updated firmware, I'm starting to lose faith... can anyone help me understand how this might happen, and how I can fix it? I'd like to use the Mac mini (permanently on) to talk to the puck and have it control things in the real world...
-
I recommend https://ngrok.com as a great quick way to get up a (temporary) https website that you can instantly update by hitting "save" on your computer and then "refresh" in your browser.
It's an easy way to expose a service running on a port inside your home network via an https URL (required for web bluetooth to work). I found it incredibly handy while getting started with puck.js
-
Ah, I'm now on 1v91 and things are much more reliable. Connecting from Chrome seems much, much snappier too.
I think this definitely warrants a mention on https://www.espruino.com/Puck.js+Quick+Start if devices with the older firmware are people's first experience.
Huge thanks for the super quick and helpful response!
-
Ah - no, I assumed as I'd purchased it recently it would have recent firmware. Off to http://www.espruino.com/Puck.js#firmware-updates for me!
I guess this is the same reason why things are slow connecting via Web Bluetooth? Connecting once takes many seconds and using the IDE is ok after that, but I tried developing my own web page app - reconnecting every time I hit refresh in the browser got pretty frustrating.
Will report back and share progress if others are reading this.
-
Very happy with puck.js. I'm thinking about what I can do with it - keen to play with hue lights and sonos - with a Mac making http calls when it gets data from the puck.
How do I reliably establish a connection from the command line?
I've done
npm install -g espruino
and havenoble
installed, so I'm tryingespruino -p cd:47:aa:41:44:2d
Once in a while, this works and I can talk to the puck from my command line. Most often, though, it tries for 1.5 sec (this time interval?) and then says "Unable to connect!".
I'm new to BLE but my understanding is that my puck is advertising itself every so often (?) and the 1.5 sec isn't long enough for my computer to "spot" it and establish a connection?
I've reset the puck with the button held down and made sure my Mac has "forgotten" it after previously trying some HID stuff. Is this expected behaviour? It makes connecting to the thing very hit-and-miss.
The puck isn't connected to the other computer, because that computer is next to me, switched off, and I'm about 5 miles away from the puck! The puck is a few feet away from the mac mini (houghton) into which I am sshing. I might be ready to accept defeat on this...