Waiting for socket connection [solved]

Started by Richelsdorfite, April 21, 2017, 01:24:05 PM

Richelsdorfite

Hi,

I try to install IoT Gateway.

My setup is:

- Raspi 3
- Linux Pi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
- PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)"
- Raspberry Pi reference 2017-03-02 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, f563e32202fad7180c9058dc3ad70bfb7c09f0fb, stage4


During the setup (
sudo bash gatewaysetup.sh && sudo rm gatewaysetup.sh
) I catch something like
npm WARN package.json


As I try to connect with Chrome or IE but : "Waiting for socket connection..."

I edit /bott/config.txt and change
enable_uart=1
to 1

I edit /home/pi/gateway/logs/gateway.sys.log and find this log :
module.js:327
    throw err;
    ^

Error: Cannot find module 'async'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/pi/gateway/node_modules/nconf/lib/nconf.js:9:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)


How can I fix this ?

Yours,

Michel

Felix

Did you use the setup script to install it?
Not 100% sure what your distro is, did you install latest raspbian-jessie from here?

In your case it looks like some packages are missing.

I just tried it on a Pi3 and it works. The npm WARN is ok.

Richelsdorfite

Did you use the setup script to install it? Yes from https://lowpowerlab.com/guide/gateway/?view=all#setup-software and
sudo wget https://raw.githubusercontent.com/LowPowerLab/RaspberryPi-Gateway/master/.setup/gatewaysetup.sh
[/color]

Not 100% sure what your distro is, did you install latest raspbian-jessie from here? I used Pibakery and kernel version seems to be good: 4.4

Richelsdorfite

As for now, I am not using a Moteino so there is no serial com.

Felix

No moteino is OK, you should see no nodes/data.
Can you please try the official distribution?
PiBakery may use an older distribution and if you dont update it, problems can surface.

Richelsdorfite

I just install May 27 2016 Jessie Lite image and use the script to install the Gateway.

Chrome/IE always prompt "Waiting for socket connection.. "

Am I missing something ?

Richelsdorfite

Quote from: Felix on April 21, 2017, 02:56:58 PM
No moteino is OK, you should see no nodes/data.
Can you please try the official distribution?
PiBakery may use an older distribution and if you dont update it, problems can surface.

I will try tomorrow morning.

Felix

The image may or not be good. Not sure, I mentioned that I tried it on the latest with a Pi3, and it works. So ... rather than debugging why it doesnt work on older images, lets go from a known working point.

Richelsdorfite

#8
Good advice  :)

I am trying !

And with the last raspbian-jessie it's working !!!

As I config my raspi through SSH, the new raspbian distrib install disable SSH. So to enable it :
- with Notepad / Notepad++ or others, create an empty file named SSH.txt
- rename SSH.txt to SSH without .txt extension
- copy this file the top level folder of the sd card (root partition)
- then eject card and insert it into raspi slot.

SSH  is enable !

So, with last Jessie.img, the installation of IOTGateway advocating anything else than :
- Download last Jessie.img
- Enable SSH
- Enbale Wi-fi connection if used
- Run script like Felix website https://lowpowerlab.com/guide/gateway/?view=all#setup-software
cd /home/pi
sudo wget https://raw.githubusercontent.com/LowPowerLab/RaspberryPi-Gateway/master/.setup/gatewaysetup.sh
sudo bash gatewaysetup.sh && sudo rm gatewaysetup.sh



Thanks a lot Felix !

Now, I can play with Moteino !

Felix