Raspberry PI 2 EspruinoHub install errors #1931
Replies: 18 comments
-
Posted at 2017-01-09 by dklinkman I installed first on an RPi2 and the Hub install went well. Lots of warnings and all that but it did start up in the end. Just curious, are you on the latest OS build for the Pi? Did you update and upgrade all packages before the install? That's one place where I deviated from the instructions. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-09 by @gfwilliams Yes - I think it's possible that you could be using an old version of the OS? I'd re-install the latest version of Raspbian onto the SD card. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-09 by Eric Yes, I did what most guidelines recommend and that is to apt-get update / upgrade etc. So the sequence as far as I remember I tried twice was:
For the node, nodered, npm, mosquitto and bluetooth installs I did each stage one at a time and followed any recommendations to run apt-get autoremove. Each stage was straight forward with one or two warnings all the way except for EspruinoHub. Prior to git cloning, I needed to run apt-get install git as it was not included on the jessie image. The rest of the problems appeared following the node install of EspruinoHub. The fact that it was exactly the same on two clean attempts made me think it could be the hardware platform was out of step. It uses a third party bluetooth USB dongle, but the OS was happy with the dongle in the full graphics install of Raspbian as I could see the Pucks in the list of devices to pair to. If anyone else has any clues or needs a fuller description of what I did, I have included the entire install log in this response. Perhaps it will give some clues as to where I have gone wrong. Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-09 by Eric Following on from some online searching I decided to upgrade node from 0.10.12 to the latest version using the following commands: After a re-compile it all worked! sudo npm -g install npm node-gyp I think this is where node goes down to 0.10?? Anyway, the package complied with lot's of depreciated warnings but now runs. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-09 by dklinkman Interesting that our experiences were so different in virtually the same environment. Only possible difference I see is that I don't think I downloaded a 'minimal' Jesse. I don't recall the link but the image file I downloaded was 2016-11-25-raspbian-jessie.img with a file size of 4,269,056 KB as reported by Win7. I checked my terminal history so I know for sure I did not have to separately install git. The version of node on my working system is v0.10.29 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-10 by @gfwilliams Yes - that could be it. Maybe the docs should be more explicit not to install the minimal version. I wonder what other packages the minimal version is missing that make installing fail though |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-10 by Eric I am working on this now @gordon. I am trying to work out exactly what the right sequence is for getting a Pi working correctly and it is proving to be a challenge. The problem I am having now is that the EspruinoHub builds and runs but any write attempt to a Puck produces a connection error:
I am not completely happy with nodejs at version 0.10.12 and have just managed to find a way to upgrade it to 7.4 on the Pi, but I have yet to build the rest of the packages based on this version. I will report back when I have an update. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-10 by @gfwilliams Ok, thanks for the update! Is this on the Pi 2? Have you ever had it working? I guess potentially there may be some problem with the Bluetooth Dongle you're using? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-10 by Eric Hi Gordon, |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by @gfwilliams What's the type of dongle? It's unlikely to be broken, but I guess there could be some driver issues with it. And exactly the same install steps work fine on a Raspberry Pi 3? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by Eric The dongle is a Trust 18187 bluetooth 4 dongle. I have now duplicated a working install flow for the Pi3 and Pi2 that throws virtually no errors and installs more up to date versions of node and npm and node-red. The first thing I did is NOT use the Raspian Lite build. Instead I installed Raspian Jessie full version to the sd card and proceeded with the following steps: node-red-stop curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - node -v npm -v sudo npm -g install npm node-gyp sudo npm cache clean sudo apt-get install mosquitto mosquitto-clients git clone https://github.com/espruino/EspruinoHub To get node-red running from the command line: node-red-pi --max-old-space-size=128 Both Pi's ran and could see all the devices, but the Pi2 could not write any data. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by @gfwilliams Please could you try updating EspruinoHub again (the Espruino version). I just made some changes that might help, or at least might give some error more helpful than What I think could have been happening is that the recent stuff started listening for advertisements again before the connection had completed, which then broke the connection. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by Eric Hi @gfwilliams, Error Connecting: Error: Command Disallowed The Rp3 build using exactly the same OS and versions of node etc, does not return an error as it does connect OK, but is still very flakey. The scan stopped and scan started messages are displayed as you hinted to, but it will possibly work once on first launch, but after a few unsuccessful attempt to write, it exits due to no scan results: Scanning stopped. BTW, was this update intended to help fix the RP2 disconnection thread |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by @gfwilliams I'd hoped it might help with either. I forget what I did but I managed to get 'Error Connecting', and this fixed it. I am however still using Node |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by @gfwilliams Just to add, how near are your Puck.js devices to the Pi? If they're some distance away or on the other side of walls the connection might be bad just because there's bad radio reception |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by Eric It's a bit of a mix of fortunes really. The older Rpi2 would not compile EspruinoHub using v0.10.27 hence the drive to go up in revision. Now its on node v4.7.2 everything compiles and works in read mode, but not write. I still think you may have something about the dongle drivers etc. I think it's worth getting a second BLE dongle and re-try. Thank you for all your efforts. It must be a nightmare trying to juggle so many OS versions and hardware revisions. FYI When we spoke about this during the Kickstarter funding, I did ask about doing this as a bridge to get the Pucks into an IoT system that is web connected. node-red does a good job at bridging this technology, but you also recommended backing the new Onion project, which I did. I expect my Onion to be in Spain next week, so am intrigued to know if EspruinoHub will work for the Onion also. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-11 by Eric Forgot to add that the Pucks are on the same table as the Pi's. All within a metre or two. One thing did come to mind in that in the scan there are around 10 advertising devices near the Pi. If there are so many, could they be delaying the responses, or blocking the responses from the Puck that is trying to respond? Perhaps I should increase the power to 0dBm to see if it improves the results? Also, having the EspruinoHub report the results of the scan does seem an additional overhead in the timing. I wonder if it's possible to mute the scan results to see if the writing to console may be making a difference? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-12 by @gfwilliams wrt Onion: I got mine about the same time as everyone else and haven't had time to get it working yet. It should work about the same, but as there's no BLE I imagine you'll have the exact same BLE dongle issues! EspruinoHub does provide the HTTP proxy service (if enabled in the config), so you can use it to send stuff to the net. It's quite limited at the moment due to the size of the URL/data being limited to 20 chars, but I hope to fix that at some point. Also, eventually I will be adding proper IPv6 support to Puck.js, which will then give you proper internet access (however that'll require some other software to be set up on the Pi!). EspruinoHub only reports once a second or so (advertising is handled silently as it comes in), so it's unlikely to be a problem I think. I wouldn't have thought 10 devices cause trouble, however if they are all advertising quickly (100ms or so) I guess it's more likely they'd interfere. Bluetooth LE uses 3 distinct channels and spreads advertising over all 3 of them - I'm starting to wonder if maybe some Bluetooth LE adaptors only listen on one channel, which would make connecting far worse. If you can log into your Pucks from another device, maybe you could use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-08 by Eric
I have a Raspberry Pi 3 and 2 and have successfully installed the EspruinoHub software on the Pi 3, but am having real problems in compiling the code on the Pi2. The following is an extract of the install and errors following the compile. Any help to diagnose why it is failing to compile would be very gratefullly received.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions