-
-
-
Thanks Gordon. Hadn't realised that about Eddystone.
I suspect the issues were a mix of user error and the start.sh script not updating the names displayed. When it refreshes, it spots new devices ok, but doesn't seem to switch from "?" to actual name (e.g. when I tried NRF.SetAdvertising to try and force a name whilst trying to figure out what was going wrong).
Still not sure why the Pi and Windows with Bluetooth polyfill were showing hex ids instead of names.
So maybe a bunch of red herrings.
It's fantastic to have this now. All my Windows issues are a thing of the past!
-
-
I tried an old 1v95 on the generic nRF device. It still appears as "?". When I try NRF.setAdvertising({},{name:"Puck 2"}) it stays as "?" on EspruinoHub but switches to the new name in the IDE on OSX.
I've also tried some of the very new 1v95 nrf52832 builds but they refuse to connect at all (unrelated to this thread, I just noticed it last weekend).
I'll try updating the badge now to see how that fares with latest 1v95.
-
Progress! The Puck update to 1v95.153 caused it to be correctly identified by EspruinoHub (once) and it appeared as a connectable device on Windows. Unfortunately then it disappeared again and was just showing "?" for name, as above. Reboot of Pi didn't help.
Then I did a full reset of the Puck and now all seems to be fine. Running Led on/off as we speak :-)
But there is definitely some issue with names. I just tried a NodeConf EU badge running a pretty old version of the firmware from the event and it's showing up as "?" too. But a Garmin that came into the room immediately showed up in the Hub logs with the correct name.
Does this new approach only work with 1v95.150+?
-
I did all of that (and disabled Web Bluetooth and rebooted). I also re-ran setcap to be sure.
I also stopped the Hub service and ran it manually. It's showing 3 BLE devices including the two Espruino ones. But nothing appearing in IDE.
Do I have to add anything to the IDE config to make the websockets-based "ports" appear?
Or could it be related to the Pi not being able to see the Puck's name (and the generic nrf device running the DK firmware)? Does it filter by name to show the connection list?
I'll update Puck now to latest firmware just in case. It's on official 1v95.
-
-
I cleared a lot of the errors in Chromium on the Pi with a good old reboot. Now saying "Websockets> Connected" in Chromium console but still showing "Searching...No Ports Found" in the connection pop-up if I try to connect to anything (same on OSX and Windows trying to access http://raspberrypi.local:1888/ide)
-
Quick update when testing on OSX:
- It sees the names properly in the Web Bluetooth pop-up on the online IDE, not just hex
- It can connect fine to the two devices using the online IDE
- It gives same failure as Pi and Windows trying to use http://raspberrypi.local:1888/ide and can't see any ports
So I guess the issue may be on something to do with the config of the Pi itself? This was an all new clean install of latest Raspbian from this morning and following all the steps for setting up Hub and WebIDE.
- It sees the names properly in the Web Bluetooth pop-up on the online IDE, not just hex
-
-
Ooh I hope so re Windows! Do I have to still re-pair every time I take the battery out of the Puck?
If I can get the Pi method working, I'm definitely sticking with that.
Ah the problem is http vs https. Chromium on Pi (and Chrome on PC) refusing to use Web Bluetooth when accessing IDE over http. Anything we can do with self-signed certs or something?
Also has something changed in the online IDE very recently? I'm only getting Mac addresses now, not names. It still connects on Chrome/Windows. But on Chromium/Pi I get "Error NotFoundError: No services matching UUID blah-blah-blah found in device" in console.
-
After seeing your video Gordon, I had to go set up a Pi3 with the Hub software! I'm hoping it gets rid of all my Windows BLE/Puck issues.
However I've hit a glitch. When I access localhost:1888/ide and try to connect to my Puck, Chromium reports no ports available. But if I go to the usual http://www.espruino.com/ide, it works fine and I see the Web Bluetooth port. I've obviously enabled experimental web features on Chromium on the Pi.
Is the online IDE running a slightly different version of the code or am I misunderstanding something?
-
That NRF52832 board arrived last week. I can find absolutely no information about it online except that it's intended as a plug-in module for their bigger development board.
There are no pin markings but a bit of continuity testing found VDD/GND/SWDIO/SWDCLK and I was able to flash the stock espruino_1v95.166_nrf52832.hex - Seems to work fine.
With a pin spacing of 2mm and double rows of pins, it can't be used with breadboards. Having all the pins exposed is handy. I just have to figure out the rest of the layout! It'll probably end up being fitted inside a ring of RGB LEDs.
-
-
-
That's definitely not the bulb. Can they re-use URLs like that on eBay for different products?
Ah no, the message at the top of the page is that the original product is gone and they are showing a possible alternative.
I think this is the thing I ordered: http://www.ebay.co.uk/itm/E27-RGB-4-5W-LED-Bulb-Light-Wireless-Bluetooth-Control-Home-Bar-Lamp-Decor/292209739874
-
Running the code connected via Serial-USB shows that it's just an "error: Connection Timeout" happening. Not sure why that would cause such issues for the PC-Puck connection.
Here's what NRF.findDevices returns for that light:
BluetoothDevice { "id": "e1:fb:c1:6b:81:6f random", "rssi": -64, "services": [ ], "data": new ArrayBuffer([8, 9, 75, 117, 76, 105, 103, 104, 116, 3, 25, 52, 18, 2, 1, 6]), "name": "KuLight" }
Ah wait a sec, just changing the ID to "e1:fb:c1:6b:81:6f random" did the trick! What does that even mean?
Now happily communicating with the light. Managed to turn it off. Now to figure out the rest of the config settings via the nRF Connect App.
-
-
-
Slightly different on Mac. Again the console freezes but then the IDE says Disconnected and it takes 10-20 seconds before I can reconnect again. The problem only seems to occur when trying to connect. I can do this no problem:
var devices; NRF.findDevices(function(d) { devices = d; console.log(devices); }, 1000);
-
Same result if I paste. Console freezes, and then recovers after a few keypresses and gives that <-Serial1 message.
I'm not sure if they are BLE at all. Should that still work?
Going to check Puck itself too. I had some stuff soldered which I removed and I wonder if I've bridged two pads or something.
-
I've been struggling with some basic attempts to connect to a "KuLight" (BT 4.0 RGB LED light from here: http://www.ebay.co.uk/itm/332254514323)
Any attempt at connecting seems to kill the console connection to the PC. The IDE prompt hangs until I hit Enter a few times and often prints out "<- Serial1" or "ERROR: Prompt not detected - upload failed. Trying to recover"
This is with code as simple as:
NRF.connect("e1:fb:c1:6b:81:6f").then(function(gat) { console.log("Gat: " + gat); }).catch(function(e) { console.log( "catch caught an error!"); console.log( "error:", e ); });
Tried on 1v92. 1v93 and master.
I have no issues communicating with the light using either its own ColorfulLight App or nRF Toolbox.
This is on standalone IDE on Windows 10. New battery etc.
Do I need to setup a hardwired serial connection to Puck to really get to the bottom of it?
Feels like I'm missing something very obvious.
This may be a tough one to get to the bottom of since it might only happen once a week (sometimes more sometimes less).
I have a Puck that I use as a Bluetooth "button". Pressing the button causes it to advertise "on" or "off". Then I have a simple NodeRed setup that reacts to the change and turns on/off a light.
However at random intervals on the Node Red RaspberryPi, Noble crashes and takes down EspruinoHub. I've tried updating to latest EspruinoHub master a few times but that hasn't helped. Console output below.
I know it's probably more a bug for the Noble author but I wondered if anything obvious jumped out or if there was more debug output I could generate?