I did all the steps one by one, I also tried with the new 2017 Raspbian version, but at the end I always get "Waiting for socket connection" :-\ . I have a Moteino connected using GPIO with the "PiGateway" sketch.
When I type "ps aux | grep gateway", the output is like:
pi 12345 0.0 0.4 1234 1234 tty1 S+ hh:mm 0:00 grep --color=auto gateway
What should I report to figure out where the problem is?
Thank you.
There might be a problem with the latest raspbian image that was released. I plan to check this when I get some free time.
In the meantime you can investigate why the gateway.js nodejs app is not running. Check that nodejs in installed and also check the gateway.sys.log for any errors.
Hello, thank you for fast response, neither of the two images are working (Jan2017 and May2016), I only got the app working using the pre-built image, but since it will be abandoned, I will still try the other option.
gateway.sys.log sometimes has nothing, and sometimes has lots of identical lines like: usr/bin/node not found
I will investigate more, thank you.
usr/bin/node not found
this means node was not installed correctly or not installed at the expected location.
Hello, after installing some modules that showed on gateway.sys.log as unable to find, I managed to establish connection (no more waiting for socket connection), but now in gateway.sys.log appears:
[12345] [INFO] LOADING USER METRICS...
[12345] [ERROR] FAIL ACCESSING USER METRICS: Cannot find module 'merge'
[12345] [ERROR] Cannot open /dev/ttyAMA0
And I can't connect any nodes. Any hints? Thank you.
Almost done, I managed to get a node. The problem now is that I get this message on gateway.sys.log:
/home/pi/gateway/gateway.js:59
console.error(error.message);
^
TypeError: Cannot read property 'message' of undefined
at SerialPort.serialCloseHandler (/home/pi/gateway.js:59:22)
at emitNone (events.js:67:13)
at SerialPort.emit (events.js:166:7)
at SerialPortFactory.SerialPort.disconnected (/home/pi/gateway/node_modules/serialport/serialport.js:438:10)
at /home/pi/gateway/node_modules/serialport/serialport.js:236:18
After that error the gateway restarts and everything reconnects, until same error occurs.
What is this error coming from?
Thank you!
I can confirm the current gateway setup script works with the latest January 2017 Jessie image.
This was tested with a new Pi and this last Jessie image.
Does that also mean you can upgrade && update in console, image from mid 2016?
I dont know for sure, I just know the latest release works with the latest Jessie image.
There is still an old raspbian wheezy image (https://lowpowerlab.com/guide/gateway/prebuilt-image/) that will work with older Pi's, I used to run that on a Pi1 as well. But the gateway software is also old so you will need tto manually upgrade that.