Espruino Hub on Raspberry Pi no Ports Found #5990
Replies: 1 comment
-
Posted at 2018-08-11 by Robin Sat 2018.08.11 Hello @PapaTech and appreciate the 'New guy alert...' ;-)
Although I'm not able to provide insight using the Pi or non-Win10, were you able to resolve accessing the Puck via the IDE? BTW, the link in #1 above https://www.espruino.com/ide/, returns 404 Are you using a Bluetooth BLE dongle? https://www.espruino.com/Quick+Start+BLE#puckjs "Neither the Online IDE espruino.com/ide nor the Chrome Web App will work to access Bluetooth Low Energy devices on Windows unless Posted at 2018-08-11 by PapaTech Robin, Perhaps I am misunderstanding how this all works. I installed Espruino Hub with the IDE and Node-RED on the Raspberry Pi and can access both through the web interface of the raspberry pi. The Bluetooth, I thought is running on the Pi since I am basically remotely running the IDE from there. Maybe I am mistaken and need to install more onto my Windows 10 PC to make this work. Are you suggesting that I need to install more onto the Windows PC since that is not in the instructions that I read. Thanks again. Posted at 2018-08-11 by Robin
Not necessarily. Just had a thought that as you were able to re-flash firmware, that communication to the Puck via Bluetooth BLE In that way, one could confirm that communication/connecting with the Puck was occurring, remove that wonderment from the equation,
So, to clarify, the Bluetooth issues were on the Pi only? Would you be so kind as to provide the link for the 'Espruino Hub' documentation as search didn't provide that detail for me to follow along. > re: 'Perhaps I am misunderstanding how this all works' Probably not. Gordon does an excellent job in documenting his tutorials, and I'm going to guess they have been tested a bazillion times, His availability is sometimes limited on weekends, so thought that providing some pre-power-debug detail would help speed things up, rather than have to re-visit the same questions, once he and others are able to assist early next week. > re: 'but when I try to connect to the Puck I get 'No ports found'' This is a common error that is seen when attempting to access via Bluetooth BLE and using the wrong IDE. Just wanted to make sure Posted at 2018-08-11 by PapaTech Robin, Thank you so much for working with me on this. I appreciate your thoughts and insights. Here is the link where I found the Espruino Hub information... Yes I think the issue is with the bluetooth on the Pi since I was able to access the Puck to do the firmware upgrade. I will take a look at installing the Native IDE and see if I can, well... see the Puck. Thanks Posted at 2018-08-12 by Robin PapaTech,
More for information purposes here, I had a Win10 PC that was supposed to be Bluetooth compatible, but in order to get communications going with the Puck, I eventually had to pick up a Bluetooth BLE dongle as the docs indicate to get that to work. Hope that's not too much of a Buzz-Kill should the same issue occur with the PC the native IDE is installed on. See: 'Requirements' heading 'For Bluetooth LE you need a . . . ' 'Tutorials' heading for a few quick start projects Thanks for the 'EspruinoHub' link, should have used Google and removed the whitespace before the local search!! After a quick perusal, that content is more Pi specific and I'm not going to be able to assist there. Remember I did start out #2 with "Although I'm not able to provide insight using the Pi . . ." Was hoping someone with Pi experience would have chimed in by now, but may have to wait until the heavy hitters are around earlier in the week. Looks like you have a fun, but a bit of challenge project ahead of you. I wish you success, with a bit of patience, of course. Robin Posted at 2018-08-12 by PapaTech Robin, Now at least I can play around a little bit and then hopefully figure out the Rasp Pi usage next week. Now if I could just figure out how to make it stop blinking... ;-) Thanks for all your help. Posted at 2018-08-13 by @gfwilliams Hi - sorry for the late reply on this... I'm not usually checking the forum at weekends. What you're doing all looks good to me. If you're doing stuff on the Pi there shouldn't be any issue with Windows at all. Which type of Raspberry Pi did you install EspruinoHub on? Only the Pi 3 and Pi Zero W have Bluetooth built-in... So when you set up the Pi, did you go to http://raspberrypi.local:1888/ide or http://www.espruino.com/ide to get to the IDE? The first one is the one you want - and could you try doing it in Chrome, in case it's some issue with the browser you're using? And what happens if you go to http://raspberrypi.local:1888/status ? At the bottom of the page, after the current time, does it show a Puck.js device? Hope some of that helps! Posted at 2018-08-13 by PapaTech Gordon, No worries on the reply. This is a new project for me so I am pushing through a bunch of hours while working the rest of the project I have for my company. I was accessing the ide on the raspberry pi 3 and there were signs that the Bluetooth was up and running. I am not sure if I have to pair the Puck to the Pi or to the PC. I was able to get the standalone IDE to work and find the Puck and have done a couple of quick examples using the magnetometer that way. Unfortunately I am at the airport headed to Texas (early flight) and won’t be back to the office until Wednesday morning. I will update you once I get back and some more testing. Thanks for the help. This looks like it might e perfect for our project. Tom Posted at 2018-08-13 by @gfwilliams The Pi 3 should work great with EspruinoHub, so no worries there. I think next step would be to check out that status page.
The Puck needs pairing with the PC to work with the standalone IDE, but it doesn't need pairing with the Pi at all. Only thing to watch out for is you can only have one connection at a time - so if you're connected to the PC then the Pi won't be able to see the Puck... But that wouldn't have been an issue when you first tried. Posted at 2018-08-13 by PapaTech That is what I thought. When I get back I will unpair it from the PC and then get more info from the pi status. Posted at 2018-08-15 by PapaTech Here is what it says on the status screen at http://raspberrypi:1888/status: Config loaded Wed Aug 15 2018 18:23:38 GMT+0000 (UTC) Posted at 2018-08-15 by PapaTech When I run systemctl status bluetooth on the Pi this is what I get. bluetooth.service - Bluetooth service Aug 11 05:03:36 EspruinoHub systemd[1]: Starting Bluetooth service... Posted at 2018-08-16 by @gfwilliams The status you get from However EsspruinoHub isn't seeing anything. For instance I get the following:
So there's stuff after the text. Can you try running
That's usually the culprit if Node.js apps aren't seeing any bluetooth devices. Posted at 2018-08-16 by @gfwilliams Also try running Posted at 2018-08-16 by PapaTech Thanks for the suggestions Gordon. I ran the which mode line above and nothing seemed to change. I then ran sudo hcitool lescan and got the following: pi@EspruinoHub:~ $ sudo hcitool lescan So at least it is seeing the Puck.js...right? Posted at 2018-08-17 by @gfwilliams Did you restart EspruinoHub after running EspruinoHub should have:
Near the top of the status screen, and yours doesn't seem to have that so there's been some issue initializing Bluetooth from Node. If it's not the permissions with Could you try doing:
and see if you get any errors? There will be some warnings about Posted at 2018-08-17 by PapaTech Thanks...again... I hate being a noob...but I guess you have to start at the beginning. Posted at 2018-08-17 by @gfwilliams Sorry, my bad - it should have been
I just corrected the original post as well. Posted at 2018-08-18 by PapaTech Back on the road this week...might take it along with me. I tried the above and find the same issue. Thinking I might format the SD card and start from scratch. Posted at 2018-08-20 by @gfwilliams Argh, shame it's still not going. So Posted at 2018-09-01 by PapaTech Well finally got some time to work on this project again. I bought a Pi Zero W and installed everything on it. I can run the software just like before but I still get no ports. I do however get the following when I look at status: Config loaded Sat Sep 01 2018 19:54:01 GMT+0000 (UTC) 1d:48:7c:0a:04:d4 - ? (RSSI -60) So that is good. Just don't know why I can't connect on the IDE running on the Pi. Really just want to start learning how to program this Puck... Posted at 2018-09-01 by PapaTech Here are some errors when I started the service... sudo systemctl start EspruinoHub.service && sudo journalctl -f -u EspruinoHub Posted at 2018-09-01 by PapaTech Here is where I did the nmp install npm install
node-pre-gyp WARN Using needle for node-pre-gyp https download
make: Entering directory '/home/pi/EspruinoHub/node_modules/bluetooth-hci-socket/build'
make: Entering directory '/home/pi/EspruinoHub/node_modules/websocket/build' added 86 packages in 231.7s Posted at 2018-09-02 by PapaTech Found that perhaps I needed another source/library so I ran the following to take a shot. $ sudo apt install libudev-dev Once I did that there was some warning messages about deprecated modules and some skipping optional dependency but it got past the errors. I started everything and under Status I could see Bluetooth items including the puck but when I ran the ide it said NO PORTS FOUND...OMG! I am sure it is something I am doing or not doing but I have followed the instructions 10 times and still... Posted at 2018-09-03 by @gfwilliams Can you try running It looks from the log messages like If you followed the instructions at https://github.com/espruino/EspruinoHub it really should have worked though. Specifically the Posted at 2018-09-03 by PapaTech Gordon, I reinstalled everything, one more time...slowly and checked for errors. There were a couple of path errors but once I went through the complete process for the 4th or 5th time (I am a bit slow)... I then started everything...and it finally worked for me. Thank you so much for hanging with me on this. I appreciate it. Now I need to learn more about the programming side and sending information back to a main server for access in a dashboard. Looking forward to getting it going. Tom Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-08-11 by PapaTech
New guy alert...
I ordered a Puck.js for a new project I am working on and have installed the Espruino Hub onto a Raspberry Pi. I can access the IDE and I can access Node-RED but when I try to connect to the Puck I get 'No ports found'. I was able to use the nRF Toolbox to upgrade the firmware on the Puck.
When I look in the console I find the following:
Handling URL "https://www.espruino.com/ide/"
No navigator.bluetooth - Web Bluetooth not enabled
ERROR: getURL("/serial/ports") error : Not Found
/serial/ports doesn't exist - disabling WebSocket support
Couldn't connect to wss://localhost:31234 - disabling websockets for this session
I followed, or at least I thought I followed the instructions to install everything onto the Pi correctly but after much reading and attempts I have not got it working.
This is what I get on the Pi when I run -
systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2018-08-11 05:03:36 UTC; 8h ago
Docs: man:bluetoothd(8)
Main PID: 467 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─467 /usr/lib/bluetooth/bluetoothd
Aug 11 05:03:36 EspruinoHub systemd[1]: Starting Bluetooth service...
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Bluetooth daemon 5.43
Aug 11 05:03:36 EspruinoHub systemd[1]: Started Bluetooth service.
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Starting SDP server
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Bluetooth management interface 1.14 initialized
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Failed to obtain handles for "Service Changed" characteristic
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: Sap driver initialization failed.
Aug 11 05:03:36 EspruinoHub bluetoothd[467]: sap-server: Operation not permitted (1)
I appreciate any guidance. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions