Will Gateway image work on Raspberry Pi 3?

Started by WhiteHare, March 24, 2016, 06:56:12 PM

WhiteHare

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.

Felix

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

Quote from: WhiteHare 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.

@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

Quote from: Felix 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.

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

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

#5
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/

Felix

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

#7
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

Felix

Interesting guide but it has a million steps. How about just 3 steps?

ssmall

Would you need to follow those steps if you had a Pi 2 running Raspbian-Jessie?

Felix

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

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

#12
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.

Felix

@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

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.