Author Topic: Will Gateway image work on Raspberry Pi 3?  (Read 7669 times)

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Will Gateway image work on Raspberry Pi 3?
« on: March 24, 2016, 06:56:12 PM »
I see that it reportedly works on the Pi 2:  https://lowpowerlab.com/forum/index.php/topic,1588.msg11302.html#msg11302

Does that mean it will also work on the Pi 3 too?  Anyone know?  I'd like to take the LPL Pi Gateway for a test drive, so I want to make sure that whatever hardware I get for that purpose remains truly turn-key simple.  FWIW, the Pi-1 always felt sluggish to me, but the buzz on the Pi-3 paints the Pi-3 as having plenty of pep.
« Last Edit: March 24, 2016, 07:04:14 PM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #1 on: March 24, 2016, 08:10:04 PM »
Yeah I just ran some tests on Pi3 and it's fast. I tried jessie though.
I will need to load the gateway image and I will report back with results. The hardware is definitely compatible, but there's a catch - they introduced a bluetooth module which is tied to /dev/ttyAMA0 which is the default serial, so you have to run a command and add a line in a file to make it available to the MightyHat/Moteino. See details here.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #2 on: March 25, 2016, 07:54:37 AM »
I see that it reportedly works on the Pi 2:  https://lowpowerlab.com/forum/index.php/topic,1588.msg11302.html#msg11302

Does that mean it will also work on the Pi 3 too?  Anyone know?  I'd like to take the LPL Pi Gateway for a test drive, so I want to make sure that whatever hardware I get for that purpose remains truly turn-key simple.  FWIW, the Pi-1 always felt sluggish to me, but the buzz on the Pi-3 paints the Pi-3 as having plenty of pep.

@WhiteHare.....FWIW, I'm running the gateway code on both a Pi1 and a Pi2, and the Pi2 is much more responsive.  Especially when talking to my weather station which is exporting about 20 metrics on a 2-3 second interval.  As soon as the Pi3 is a little more available I'm definitely going to try it out.

syrinxtech

  • Sr. Member
  • ****
  • Posts: 347
  • Country: us
    • Syrinx Technologies
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #3 on: March 25, 2016, 07:57:21 AM »
Yeah I just ran some tests on Pi3 and it's fast. I tried jessie though.
I will need to load the gateway image and I will report back with results. The hardware is definitely compatible, but there's a catch - they introduced a bluetooth module which is tied to /dev/ttyAMA0 which is the default serial, so you have to run a command and add a line in a file to make it available to the MightyHat/Moteino. See details here.

Felix, I'm assuming that means the Bluetooth port will no longer be usable?  Is there a way to assign it to another port?  If you're using the USB port can you still use the Bluetooth device?

jra

  • Jr. Member
  • **
  • Posts: 81
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #4 on: March 25, 2016, 08:46:53 AM »
Follow the threads in https://openenergymonitor.org/emon/node/12311 and https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=138120 for some discussion on this topic.  I think the long term answer will be yes but it may take awhile to filter down to the various distributions.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #5 on: March 25, 2016, 10:19:57 AM »
Maybe just sidestep the problem by having the Pi3 communicate with the MightyHat/Moteino using I2C instead of serial?

Here's one how-to for connecting an Arduino to a Pi, and thus pretty much the same should also work for connecting a Pi and a Moteino:  http://blog.retep.org/2014/02/15/connecting-an-arduino-to-a-raspberry-pi-using-i2c/
« Last Edit: March 25, 2016, 11:25:09 AM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #6 on: March 25, 2016, 12:25:38 PM »
UPDATE: Unfortunately my stock V8.1 image does not work at all on a Pi3. Nor does a vanilla Raspbian-Wheezy (the distro that V8.1 is based on). So this eventually forces me to move on to Jessie which works. I am working on upgrading the gateway app and moving to Jessie. I don't have an estimate when this will happen, there are lots of details to iron out. I am looking to use ExpressJS instead of Nginx to make it even simpler and easier to install.

@WhiteHare:
I2C is too slow and harder to debug and I can't change the whole serial reading/settings to i2c in gateway.js - not even sure how to do that or how it would work, so serial it is. What happens when they change the i2c? Go to SPI? Then what next? Serial is such a trivial and ubiquitous protocol that it's vital to have a usable one on such a computer as Pi. I can't change a design every time Pi changes their default image and maps things differently. This affects everyone using their GPIO serial, so it's making it a moving target, too bad on the part of the Pi foundation. I'm surprised they only offer 1 hardware serial on the GPIO header, and that is tied to the BT module. Fortunately it's easy to disable.
For those that use a MoteinoUSB or Moteino+FTDIAdapter plugged into a USB port, this is not a problem at all, they just have to edit the serial port setting in the UI (to match the serial port emulated by that USB Moteino) and restart the app.



WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #7 on: March 30, 2016, 05:00:06 PM »
Not sure, but this appears to be a newer update on how to re-map the pins using just software:  http://www.briandorey.com/post/Raspberry-Pi-3-UART-Boot-Overlay-Part-Two
« Last Edit: March 30, 2016, 06:52:06 PM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #8 on: March 31, 2016, 08:25:08 AM »
Interesting guide but it has a million steps. How about just 3 steps?

ssmall

  • Full Member
  • ***
  • Posts: 158
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #9 on: March 31, 2016, 09:57:26 AM »
Would you need to follow those steps if you had a Pi 2 running Raspbian-Jessie?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #10 on: March 31, 2016, 10:11:00 AM »
Hmm, not sure. I haven't tried it. For Pi 2 I suggest using my v8 image, or an older jessie release (pre 2/26/16).

ssmall

  • Full Member
  • ***
  • Posts: 158
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #11 on: March 31, 2016, 10:39:59 AM »
That's what I am running now Debian-Wheezy on a Pi 2 with V8.  I have a Pi B+ that I am playing around with running Raspbian-Jessie.  I'm trying to learn more about how hardware and linux interact.  Thanks

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #12 on: March 31, 2016, 10:43:48 AM »
So, to summarize, does there exist a gateway image of any type that does work on the Pi 3?  I mean http://lowpowerlab.com/gateway/#image and post #6 above says that LPL's v8.1 gateway image will not work on the Pi 3 (which I'm reading as don't even bother trying to load it on a Pi 3--correct?), but is there an earlier or later gateway image somewhere that will work on the Pi 3 (either with or without the extra 3 steps you refer to in post #8 above, or some other "million steps" solution)?  The only link I see to an LPL gateway image appears to be the the v8.1 LPL gateway image on the google drive link in http://lowpowerlab.com/gateway/#image.  i.e. AFAIK, none of the gateway images (assuming there was ever more than just the v8.1 gateway image) are on the LPL github. 

Now there's MightyHat, but before MightyHat there were gateway images of some kind for whatever preceded MightyHat (e.g. a USB Moteino plugged into a Pi)?  Or not?  At least I thought there were or might have been.  I'm confused about the evolution of it all and whether it's now MightyHat or nothing as far as LPL images is concerned, or if people are running the gateway software in various  hardware configs (like maybe a Moteino connected to a Pi using an FTDI connected to USB, or perhaps hand wired directly to the Pi GPIO pins), and MightyHat is just one of those.
« Last Edit: March 31, 2016, 11:18:53 AM by WhiteHare »

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #13 on: March 31, 2016, 11:17:59 AM »
@WhiteHare:
No, there is no preloaded image that will work on Pi3, not at this moment. The image I have is debian wheezy, and as I said before, wheezy will not work on Pi3 at all, even without any addition, will not boot, they don't even offer that any more.
MightyHat is a hardware piece, nothing to do with the gateway image. The gateway software will work with anything, even just a simple moteino hooked up to a serial port or USB.
Getting a jessie image ready is a pretty tricky task. Jessie uses boots with systemd, very different than wheezy.
I will post updates when I have something solid to share. Even the guide is probably obsolete in certain regards because it uses upstart, which conflicts with systemd. So a lot of work for me to do to update that and test it on Pi2 and Pi3 etc, i have no help, and lots other work to do.

Simon

  • NewMember
  • *
  • Posts: 7
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #14 on: May 14, 2016, 10:19:45 AM »
The Foundation just released a new version of Raspbian Jessie; at this rate they should think about LTE releases so guys like you aren't always playing catch-up.

WhiteHare

  • Hero Member
  • *****
  • Posts: 1300
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #15 on: June 07, 2016, 01:11:23 PM »
Any ETA yet as to when this might be working?

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #16 on: June 07, 2016, 01:24:17 PM »
The Foundation just released a new version of Raspbian Jessie; at this rate they should think about LTE releases so guys like you aren't always playing catch-up.
Yeah unfortunately such a moving target makes it very difficult to follow and stay up to date with whatever the OS flavor is doing. I used to have a guide (which is still there now) which would just work when followed to the letter, on raspbian wheezy.
With Jessie, unless you know your way around the jessie changes (especially init) you will get stuck and think the guide is bad. When jessie is done with, are we faced with another major revamp?

Simon

  • NewMember
  • *
  • Posts: 7
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #17 on: July 24, 2016, 01:24:44 PM »
I would expect the init changes in Jesse will become the only supported service framework in a few years, probably sooner.

jordantallent

  • NewMember
  • *
  • Posts: 1
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #18 on: August 02, 2016, 11:40:34 PM »
I have hit a road bump trying to go through the setup steps but using a RPi3.  I started with 2016-05-27-raspbian-jessie-lite image.  Did an update and upgrade and followed the steps on the Gateway page but when it came time to verify that nginx was working, I went to my PIs IP address and nothing.  'Refused to connect'.  I am SSH into my PI so I know it's connected.  Could it be an issue with Jessie lite?  I tried with nginx 1.8 as in the step-by-step then tried again with the current stable release 1.10.1.  Any ideas???

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6866
  • Country: us
    • LowPowerLab
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #19 on: August 03, 2016, 10:22:35 AM »
@jordantallent:
Did you use all the default configurations? Are you sure everything is loaded up correctly on the Pi side?
The error you get indicates that either nginx isn't running or nothing is listening at the port you connect to (HTTP port 80?).

duane1

  • NewMember
  • *
  • Posts: 10
  • Country: us
Re: Will Gateway image work on Raspberry Pi 3?
« Reply #20 on: September 29, 2016, 06:46:57 PM »
@jordantallent:
Well I made it this far also with nginx 1.10.1 on a Pi3 and got the same error as you.   The solution which worked for me is deleting the current content of ngnix.conf before adding the new config contents.  Then it worked fine to this point (make sure you restart nginx after the change:  sudo service nginx restart ).  I'm sure Felix spends a lot of time trying to make it work for all possible idiots.  Missed one (me)   :)   The change is in red below. Now to see if I can press on to get the remaining steps working on the Pi3.

sudo nano /etc/nginx/nginx.conf

Delete the current nginx.config file contents and then Dump this configuration in the nginx.config file, and save it:
« Last Edit: September 30, 2016, 11:12:17 AM by duane1 »