psa: sysrq hang setting up new image

Started by aw, November 19, 2016, 05:52:21 PM

aw

Hey folks, I'm setting up a new MH and trying to recreate the setup based on the latest raspbian image (2016-09-23).  A stumbling block I ran into was that I couldn't boot the Pi with the MH connected.  The culprit seems to be the default serial login configuration.  Somehow that serial login interacts with MH to create a constant stream of sysrq help messages that pretty much prevent the Pi from booting.  The solution is simple enough once you recognize the problem, remove the MH and run rasp-config to disable the serial login.  I suppose there's probably also a non-disassembly option if you flash another program into the MH via ftdi that doesn't interact with serial.  Hope this saves the headache for someone else.  Felix does mentioned serial configuration in the guide, but it clearly wasn't obvious to me that improper configuration (ie. the default) can prevent the Pi from booting.  Thanks

Felix

Yes the serial login console has to be disabled otherwise you can't use it with the MHat, or anything else that interfaces to the serial GPIO.
Why not install a new raspbian (jessie)?

See my Gateway setup, I show how to run PiBakery to prime your image before installing and disabling the serial console:
https://github.com/LowPowerLab/RaspberryPi-Gateway/tree/master/.setup

aw

Raspbian jessie is exactly what I'm starting from.  I was not aware of the PiBakery.  Have you tried to setup a gateway instance using the distro versions of nginx and nodejs on jessie, stretch, or another distribution?  I can't get nginx and the socket.io proxy talking to each other.  One of the most appealing things to me about a Moteino based IoT infrastructure to me is being able to setup and manage the software myself.  To that end, I find it much more maintainable if I can manage my gateway software within the distribution rather than pulling down tarballs and building them myself.  I can understand and appreciate that the wheezy packages are too old, perhaps even the jessie packages, but it seems like stretch should at least work.  My nginx log shows:

2016/11/20 17:41:32 [error] 2303#2303: *2 peer closed connection in SSL handshake while SSL handshaking to upstream, client: 192.168.1.63, server: default, request: "GET /socket.io/socket.io.js HTTP/1.1", upstream: "https://127.0.0.1:8080/socket.io/socket.io.js", host: "mightyhat.home", referrer: "https://mightyhat.home/"

Wondering if you know of any tips or pitfalls to using stock distro packages now that it seems like they ought to be new enough (nginx 1.10.2-1, nodejs 4.4.7~dfsg-2+rpi1).  BTW the serialport  instantiation has changed how autoOpen is specified upstream.  Thanks

Felix

If you indeed want to install the Gateway Iot stack, please try the setup script and follow the instructions posted here.

I wanted to use the stretch but there were some issues. I put a lot of hours into developing that script and all the different versions of the packages it installs, making sure they all work together on a Pi2 and Pi3. If you start from a raw image you should get a working setup when the script is done.

aw

I note that the script still builds nodejs from tar ball for armv6, ie. rPi 1, such as my B+.  Am I ahead to just scrap this Pi and get a Pi 2 or 3 (v7 or v8) for better long term distro support?

Felix

The setup script installs nodeJs from the official tarball on armv6. On PI2 it's the same as B+. I would go with Pi3 for armv7 and the multi core huge speed increase as well.

aw

Right, tarballs are what I want to avoid, even the non-v6 path is adding sources.list entries from elsewhere, which is better, but less than ideal if those packages don't get updates.  Even doing the npm installs following the instructions I found quite a few comments that debian was fairly broken wrt nodejs, and going with a Pi 2/3 seems like it might have better long term support and more distro options.  AIUI both Pi2 & 3 are quad-core, 2 is v7 while 3 is v8, adding 64bit support and a clock boost as well (plus builtin wifi and bt).  Thanks


Felix

Weird, my Pi3 Model B is reporting armv7l

aw

Perhaps you only see v8 if you're running 64bit.

Felix

Yeah, maybe, I don't know  ::)
Anyway I know the script works with the jessie distro which is the latest, on B+, Pi2 and Pi3.
Suggestions to improve are always welcome.