Archive for June, 2017

Starting over

Posted in Linux, Orange Pi on June 30, 2017 by asteriondaedalus

So, now scrubbing the armbian.com distro and going back to the orangepi.org distro.

Yes, after the frag it wouldn’t boot but who knows if I rewrite it with Etcher.

By the by, the orangepi.org have no idea of config control.

I thought to download new copy of image of debian server for OPiZ.

 

Still, orangepi.org distro burnt with Etcher still has same old problem.

It would boot before I had used the expansion board in the device.  It would not boot with the expansion device in.  It would no longer boot even after expansion board was taken out.

Now, on brand new SD card using Etcher and not WIN32DiskImager same problem.  It still won’t boot without expansion board inserted.

So, burning image onto brand new brand name SD card using Etcher does not fix problem – problem is therefore unlikely to be SD card corruption.

In fact, burning the orangepi ubuntu instead of debian server also sees the card not boot up even if it is burnt with Etcher.

This is so weird, the official distros worked up until the expansion board was plugged in and now neither ubuntu nor debian distros will boot.

Locked out of Armbian forum!!

Posted in Armbian, Orange Pi on June 30, 2017 by asteriondaedalus

adminbully

I am locked out of Armbian forum now??

So I guess I cannot recommend Armbian as a Orange Pi Zero distro.

Given all the problems I am having it seems suspiciously like censorship or bullying.

Strange though because a couple of people on that group appeared to be invested in fixing the problems I am seeing.

Oddly, I was blown over by actually getting responses on the forum as one chap at least was providing good technical challenges.  They might actually have something to get their teeth into given we’ve gotten over the usual lazy guesses and now getting to the knitty gritty.

In fact my “crime” was, apparently, responding individually to people who offered help with acknowledgement of yes/no whether their ideas helped.

The inference in the “warning” I received on the forum was that I was all “higgledy piggledy” in my responses.

Hard not to be given I was using the forum “quote” mechanism over top the responses from forum members to ensure individual user responses had my succinct response to their help.

Members were grabbing snippets themselves of the thread to quote in their responses so the forum members did contribute quite a lot to the thread becoming “messy”.

So, in short, my “crime” was using forum software built in functionality the same way other members were.

Mind you I was locked out by someone whose “help” was clearly off the mark.  When I pointed out factually that what they had suggested was, in fact, not going to work, because it actually was the steps that elicited the problem, their response was a tirade of hysteria.

Turns out it was a forum moderator.

So, there is probably at least a problem with ethics as it looks like I am being targeted because I pointed out to the moderator his suggestion was not helpful.

I am not sure why a moderator is moderating a thread they are responding to, or responding to threads at all.  This chap does not seem to be able to self moderate.

He needs to step down as a moderator.

As you might be aware I am not fussed with forums since most times your questions remain idle for yonks.

Remember my spanking on stack exchange, for example, I had a question that sat idle for 6 months.  I worked out the answer. Posted it.  Not half a hour later some dolt panned my answer I think entirely oblivious 1) that I raised the question and 2) that it was the actual answer to the question since I had to sort it myself.  So, I did make a pointed comment …

So, I have muddle through, got enough ideas.  I just got a ping on my post box app so I suspect my two new OPiZ have turned up.

What?  Yeah well they are cheap and I am still 60/40 it’s a hardware frag.  The expansion board wasn’t needed so no need confounding things again.

I haven’t tried the ubuntu distro yet – though I am a big debian fan I have already gone over to the dark side since the parallella official distro is parabuntu.

There is a debian distro for parallella but the board is fiddly enough I think without winging it with rabble rousers.

 

Never ending story

Posted in Armbian, Orange Pi on June 30, 2017 by asteriondaedalus

So, to date, flaky behaviour using Armbian 5.25 debian server on Orange Pi Zero.

Claims of file system corruption due to SD burn are likely debunked because:

  1. SD are brand new.
  2. SD are genuine out of the box SanDisk Ultra microSDHC UHS-1 parts.
  3. 5.25 image has been burnt to SD with both WIN32DiskImager and Etcher.
  4. Etcher is supposed to baulk if SD does not verify and it does not baulk.
  5. Problem occurs regardless of SD used so since file system corruption is random it is hard to argue, statistically, two SD burns with exactly the same corruption, let alone three or four serial burns of same SD with same corruption.

So, for some reason the eth0 connection eventually goes kaput.

I found to the problem I thought was with nmtui (where it hung) was actually the board dropping the USB connection.  The quirk is nmtui can break the connection every time, it just so happened that the problem manifest halfway through scrolling a log using nano.

Why I came to this was that eth0 would come good, for a time, after doing nothing but two or three reboots in a row.  The USB dropped out while eth0 was up so I was able to ssh into device and run nmtui with no problem – so nmtui isn’t hanging, the usb link is.

The problem with the usb is then of same ilk as the problem with eth0 since they are both devices so that might point to where the problem resides.

On weekend I will get out 3-pin serial as I keep getting hounded to use that since you get more login garbage.  I am guessing it doesn’t act as a device so might also be immune to any lergy affecting devices.

WTFO

Posted in Armbian, MQTT, node-red, Orange Pi on June 28, 2017 by asteriondaedalus

Given my journey here, to have node-red and emqttd running as services on Orange Pi Zero, I have to say the finale was not unexpected.

Re-burnt SD with Etcher as people were convinced I had caused problems with FS corruption using WIN32DiskImager.

Built node-red and emqttd as services (again).

I then started the Orange Pi Zero and left it running for two days.

I went to open on node-red in my browser this morning.

No connection.

Same for emqttd.

They were running last night.

The COM port to the OPiZ is still up as it shows up on the TerraTerm drop down.

I start up a console but not a sausage.

It should drop straight through to the root prompt for password.

For the halibut I tried sshing in via its static IP.

Nada.

What The Frack Over?

And, pulling power then reapplying sees the board not come up without IP address – but with node-red and emqttd running.

no connection

Setup for home automation server

Posted in Linux, MQTT, node-red, Orange Pi on June 25, 2017 by asteriondaedalus

So, setup for house server on Orange Pi Zero 512kB using:

Armbian_5.25_Orangepizero_Debian_jessie_default_3.4.113.img

Ignore my previous posts where I use WIN32DiskImager.  Seems it has fallen out of favour (and might be the root of all the other problems I was seeing??!!).

Use Etcher as directed on the Arbian.org site, as well as a good quality Class 10 SD card.

On Windows you will get a fright because dopey Etcher does not nominate your SD card as a drive number (J: for example on my PC) – heaven forbid.   So it takes a while to work out it is happily point ONLY at your SD card.

Given all the warnings about using WIN32DiskImager (and trashing your computer) it was a bit arrgh! of the authors of Etcher.   I think they are trying to be hip *yawn*.

<RETRACTION>

I just notice the windoze drive letter on Etcher.  You have to swipe your mouse over a tiny group of pixels accidently for a hovering text to show up.

Once I saw that I did go back to the drive selection to find a very light gray “j” over a dirty white background in contravention I suspect of accessibility laws – if not plain old simply human factors and HCI design rules.  I am 50+ and have glasses (often smudged) so what can I say … I easily miss things.

</RETRACTION>

Login into armbian.org distro for first time and set up root and user accounts.

Setup static IP for your Orange Pi Zero using nmtui or nmcli (for power users).

Reboot and  then run:

apt-get update

Grab binaries for nodejs and install them:

wget https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-armv7l.tar.xz
tar -xf node-v6.10.3-linux-armv7l.tar.xz --directory /usr/local \
      --strip-components 1

Check install with:

node -v
npm -v

Use npm to install node-red with:

npm cache clean
npm install -g --unsafe-perm node-red

Test node-red out with:

node-red

Then go to your OPiZ static IP with your browser on another computer in your network.

1880 node-red Port

Next we are going to setup PM2 so as to start node-red as a service on boot:

npm install -g pm2
whereis node-red
node-red: /usr/local/bin/node-red
pm2 start /usr/local/bin/node-red \
      --node-args="--max-old-space-size=128" -- -v
pm2 save
pm2 startup
export PM2_HOME="/root/.pm2" # because I installed in root 
reboot #takes a while after rebooting but it should come up

Then go to your OPiZ static IP with your browser on another computer in your network – you should see node-red running.  Be brave, close the browser tab and re-open it, or refresh it.

Now let’s add erlang with:

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb &&
dpkg -i erlang-solutions_1.0_all.deb &&
rm erlang-solutions_1.0_all.deb

Then

apt-get update && sudo apt-get install erlang erlang-dev elixir

Note you can leave elixir at the end of the previous command but emqttd following will rebuild elixir blindly over the top – bad citizen!

Now fetch and build emqttd:

git clone https://github.com/emqtt/emq-relx.git
cd emq-relx && make

Try out emqttd with:

cd _rel/emqttd && ./bin/emqttd console

 

18083 MQTT dashboard port

Go to your OPiZ static IP with your browser on another computer in your network – you should see node-red AND emqttd running.

Now let’s set up emqttd to start on boot:

cp -R emq-relx/_rel /opt/emqtt/
mkdir /usr/lib/systemd/system
nano /usr/lib/systemd/system/emqttd.service

---- inside of nano ----

[Unit]
Description=emqtt daemon
After=network.target

[Service]
Type=forking
Environment=HOME=/root
ExecStart=/bin/sh /opt/emqttd/bin/emqttd start
ExecStop=/bin/sh /opt/emqttd/bin/emqttd stop

[Install]
WantedBy=multi-user.target

---- exit and save from nano ----

chmod +x /usr/lib/systemd/system/emqttd.service
systemctl enable emqttd.service
reboot

I copy the whole _rel directory over to /opt because I tried moving only the bin directory BUT when I tried running it came up with an error.

Go to your OPiZ static IP with your browser on another computer in your network – you should see node-red AND emqttd running without having to login!

Enjoy.

 

Ah, the thick plottens!

Posted in Linux, Networking on June 24, 2017 by asteriondaedalus

So, even with the static IP set on the parallella the TerraTerm console keeps disconnecting after a time.

Then it dawned on me, the connection was being broken because the PC IP would expire and pick up another from the DHCP in the router.

So, the unwritten story is that you need to set the IP address of your working PC to static as well – so that IP addresses at both ends of the connection persist.

Now that I have set my PC to static IP, TerraTerm does not close down.

It’s all a matter of timing

Posted in Chapel, Elixir, Erlang, FORTH is it dead or isn't it?, Parallella on June 24, 2017 by asteriondaedalus

So, phew!

I re-bombed parabuntu onto the SD card.

What the problem was earlier was the security key had changed but I was forgetting to say YES to option for saving the new key (I had quite a lot of red wine last night so don’t be so hard on me 😉 )

When I powered up the Parallella again, I wasted no time and jumped in with:

sudo nano /etc/network/interfaces.d/eth0

---- inside of nano ---

auto eth0
iface eth0 inet static
address 192.168.0.150 // your parallella IP here
netmask 255.255.255.0 // your netmask here
gateway 192.168.0.1 // your gateway address here
dns-nameservers x.x.x.x //your dns server list here

--- exit and save ---

sudo reboot

Happily now running on the static IP set … phew!

Now to work.

Target environments will be erlang/elixir and chapel.  Yet, ePython for poking around.

I am reading back into my threaded interpretive days to look at a minimal FORTH runtime to run on the Epiphany.  There has been chatter on the parallella groups about J1, but that is a HDL (read FPGA) FORTH.  I think many people chattering haven’t worked in FORTH so much of the chatter is unproductive.  I am thinking a GForth running on the ARM side that assembles, rather than cross compiles, to a hand built threaded interpreter on the matrix.  I am not sure how feasible that all is but it will be  a good instrument for learning the nuts’n’bolts of Epiphany.

Many lessons can come from the struggle, yes?

This, idea is no more or less I worked on during a project, in Canada, where I noted the DSP software the team was using was already using a threaded processing chain.  The idea then of control loops and conditional inside of that was a soft sell.

So, in FORTHeze no outer interpreter running on the Epiphany.