Archive for the The downside of Opensource Category

Stuck again

Posted in The downside of Opensource, The Downside of software development on December 18, 2017 by asteriondaedalus

So, I have my iPEGA bluetooth gamepad and I am wanting it to run from my dopey Android phone that I am using as the mediator for the rover.

Nothing useful for using these gamepads in Processing for Android so that appears to be out.

No heart or interest to write something in Java.

Python?  Well pygame for Android seems a dud, a lot of old blog entries but nothing obviously working anymore.

I noted that they sorted some of the flakiness of Kivy and so I re-installed Kivy on my PC with the view of prototyping on Windoze then bombing on Android.

Go figure I can get the pyGame gamepad exerciser working on PC.  I tried the same for the raw Kivy version.   I works!  Well as long as you don’t allow your gamepad to go to sleep.  If you do, Kivy drops it.  And, if you leave it disconnected long enough, the Kivy application closes down quietly.

Posted a question on and an issue on github but no responses at all from anyone.

It is not obvious from the Kivy code why it drops the gamepad.  There is otherwise no hints in any of the examples or any of the documentation.

In the pygame version, the gamepad can go to sleep and when it wakes it is auto-connected again.

So, stuck as I still have to see if I can get the old pygame for android to work with the gamepad.  I would have used Kivy but help is a dead end.



github is not southern hemisphere friendly

Posted in Orange Pi, Sucky service Providers, The downside of Opensource on July 8, 2017 by asteriondaedalus

So, as I mentioned last night.  As usual, if you are up late and fiddling with access to code from git you will likely get either unresolved host github, or the new thing which is a problem with certificates which is as likely to do with a timing thing and then again to do with host resolution.

This morning I ran make again and it breezed passed the point it got stuck on last night.

It’s the same time-of-day related behaviour I have seen when running git from my PC.


Posted in Linux, Orange Pi, The downside of Opensource on June 18, 2017 by asteriondaedalus

So, various things on follow up to mqtt as a service.

You can have a /etc/init.d/mqtt file (works from console but doesn’t work as a service and therefore does not work at boot)

You can have a /etc/systemd/system/mqtt.service file (doesn’t work)

You can have a /usr/lib/systemd/system/mqtt.service file (doesn’t work)

Closest thing that appears to hint at what the problem might be is that emqttd starts with console but systemd baulks during service startup.  Noting that /etc/init.d/mqtt works from console but won’t work using either of “service x start” or “systemctl start x” then that appears to “behave” in a way that would suggest console interaction with systemd.

Changed /opt/emqttd/bin/emqttd to turn off console on startup (doesn’t work).  Or at least the example code I used does not work as advertised.  The change suggested is from:

-args_file $RUNNER_ETC_DIR/vm.args 


-args_file $RUNNER_ETC_DIR/vm.args -detached -noinput -noshell -- ${1+"$@"}"

Not to mention that, for some reason, the mqtt.service options seem to “break” the node-red startup somehow.   When I log into the OPiZ, pm2 show tells me node-red is online but browser fails to connect.  If I delete the mqtt services and reboot I get node-red running on boot as expected.

The problem with the internet …

Posted in Linux, node-red, Orange Pi, The downside of Opensource on June 17, 2017 by asteriondaedalus

… and all you need is that one page you can get to from anywhere in the world, though it might be obfuscated by all the other pseudo pages on the same topic.

So, to get the node-red to run on boot I used the following (see “Starting Node-RED on boot”)(as root):

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

The max-old-space-size=128 is based on suggestions for RaspingBreathBurryDoodle Pi and Beaglebone Black, which both have (as does the Orange Pi Zero) 512Mb of memory.

So, now that fraking emqttd, which does not start as a service on boot, is the last hurdle.

So wearing …

Posted in Linux, Orange Pi, The downside of Opensource on June 16, 2017 by asteriondaedalus

… goddamm fracking frack!

So, again different versions of versions of linux.

So, apparently I can change the timeout of a service with:

systemctl set-property mqtt.service TimeoutStartSec=x

If and only if I have a TimeoutStartSec property that is, you guessed it.

Turns out, there is a TimeoutStartUSec … woop … er… already set to five minutes.


So theres goes that theory.


Posted in Linux, Orange Pi, The downside of Opensource on June 16, 2017 by asteriondaedalus

I know I said I sorted starting emqttd as a service. I rebooted and opened browser to the emqttd web console.

Got caught out with beginner blunder – the webpage is cached on my PC isn’t it. So the emqttd didn’t, afterall, start. However, the bonus is the error reported has changed (using the tidier init.d file of mine), and the inference I get from the new error is, I think, the service startup period is timing out.

No problem.

A couple of mechanisms appear to be there to change the default timeout.


Stay tuned as nothing has worked as advertised on my OPiZ now its fragged and running distro.

Fracking frack frack …

Posted in Linux, Orange Pi, The downside of Opensource on June 14, 2017 by asteriondaedalus

So, got the emqttd and node-red running from separate console sessions on the OPiZ to checkout the mqtt messaging is working and voila!


Just a simple check by sending the timestamp to the topic “hello” and using the debugging to catch the response.

So, stuck again as 1) can’t set the IP on the OPiZ to static because of the quirky behaviour induced by the use of the expansion board and 2) still no luck getting either of emqttd or node-red running as services.  Both are show stoppers at the moment – at least for deployment.

I intend using double sided tape to tap the OPiZ to my gateway and drive it from the USB port on the gateway with a short ethernet cable into the gateway.  Good option since no gateway means no lan.  Also means if I cycle power on gateway to sort out problems the node-red server will need come up without intervention.

That will be much neater than the ODROID-C1 setup currently – which reminds me, must look at putting together the ODROID-C1s and parallella into that cluster.