Author Topic: Can't setup with Raspberry Pi 1 Model B  (Read 1603 times)

Atalonica

  • NewMember
  • *
  • Posts: 8
  • Country: es
Can't setup with Raspberry Pi 1 Model B
« on: February 08, 2017, 11:16:06 AM »
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.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #1 on: February 08, 2017, 11:56:35 AM »
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.

Atalonica

  • NewMember
  • *
  • Posts: 8
  • Country: es
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #2 on: February 08, 2017, 12:05:45 PM »
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.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #3 on: February 08, 2017, 01:41:38 PM »
Code: [Select]
usr/bin/node not found

this means node was not installed correctly or not installed at the expected location.

Atalonica

  • NewMember
  • *
  • Posts: 8
  • Country: es
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #4 on: February 09, 2017, 02:05:24 PM »
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:
Code: [Select]
[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.

Atalonica

  • NewMember
  • *
  • Posts: 8
  • Country: es
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #5 on: February 09, 2017, 03:55:55 PM »
Almost done, I managed to get a node. The problem now is that I get this message on gateway.sys.log:
Code: [Select]
/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!

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #6 on: February 26, 2017, 03:55:27 PM »
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.

LukaQ

  • Sr. Member
  • ****
  • Posts: 302
  • Country: si
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #7 on: February 27, 2017, 02:44:17 AM »
Does that also mean you can upgrade && update in console, image from mid 2016?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6867
  • Country: us
    • LowPowerLab
Re: Can't setup with Raspberry Pi 1 Model B
« Reply #8 on: February 27, 2017, 08:54:04 AM »
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 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.