Archive for May, 2017

Goddammmit!

Posted in Orange Pi on May 31, 2017 by asteriondaedalus

So, go figure.  One is told One should either ssh into the OPiZ via ethernet OR the other option is the three pin serial connection on the board.  Examples included wiring instructions and the use of a 3.3v USB to serial board (like the Sparkfun one I have in my comms box).

So when you startup Teraterm, for example, you can select a COM po … hang on, there is two COM ports sho … DOH!

I had to laugh, I was wondering why, if you have your OPiZ powered by the USB you couldn’t talk down that line – given all the instructions to either ssh in via ethernet or knock up jumpers to use a USB2Serial board.

Seems none of that is necessary.

Just power up the board with your USB hub and you have a COM port as well.

I am still not happy with the dropout on the ethernet line but I can sort that once the pounce administrating from the OPI forum gets off his arse and validates my membership.

Otherwise, you don’t need telneting over ethernet or jumper leads to the three pins that should have been, IMHO, 0.100″ (2.54 mm) Female Header: 1×3-Pin, Straight.

In any event, it means I can sort the erlang build that kept clapping out as the terminal connection over the LAN kept dropping out.

Advertisements

GIVE ME A BREAK!

Posted in Orange Pi, Rant on May 30, 2017 by asteriondaedalus

FFRRRRRRRRRRRRAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCKKKKKKKKK!!!!

Now I have node-red running on the Orange Pi Zero (OPiZ) I thought I would try something to sort the problem I was having on the ODROID-C1 in any event.

That is, I have a google api account for the calendar widgets for google calendar to drive the running of the sprinkler system (I relented and stayed on the PC version which grates with the wife because of the electricity the PC burns).

In any event, for whatever reason,  the google API call-back was against localhost so it should have worked on whatever host was logged into the account.  However, the picture is confused I guess since it is a client API.  So what is the client?  The Web browser browsing into the node-red server OR the node-red server?

The other side was I wasn’t sure the MAC address of the “client” wasn’t being picked up in the background as part of registered “client” identification.

So, I thought, since I was running a server but not desktop version of debian on the OPiZ then I would install a text based browser and log into google developers that way, create a new api licence from the OPIZ, and then voila!

However, I tried using apt-get to install Lynx but gave up after a dozen attempts.  Tried Links instead.  Slow but I guess it has to parse then discard a shit load of junk.

I pointed Links at the google developer’s login page.

It wouldn’t let me in.

I thought I had forgotten my password so I reset the google password but it wouldn’t let me in.

I opted to go in via other credentials.  It sent me an sms, I entered that in and then it prompted me for a password and then wouldn’t let me in.

This went on a while but I tried an option that allowed me to put in at least one of my old passwords.  I used my new password, it told me that was the correct password and gave me the option to continue.

I opted to continue.

It the prompted me for a passwo ….

Yep, it wouldn’ t let me in.

I am now no closer to finding out if setting up the API from the target server fixes the problem.

Against my better judgement I might relent and put the desktop version of Debian on the OPiZ – just so I can get at a browser.

The real problem, for whatever reason, is that apt-get crap.  I went to download erlang to find I couldn’t install some of the dependencies AND, for whatever reason, wget will not find the erlang download site.  I checked on my PC and it is definitely up.  I use ping on the OPiZ but it doesn’t seem to get out BUT then apt-get was fine to remove then download Links (as an experiment).

To top it off the OPiZ keeps dropping its connection to Telnet over the LAN, even though I setup a static IP.

I will have to built up a serial cable as I am convinced that there is something flacky about the ethernet setup (which might account for apt-get cracking up all the time in mid-stream).

Pity, the OPiZ seems really fast – flashed up the node-red sooooo quickly.

I need the erlang on for OPiZ to act as the MQTT server as well.

Make up your minds people!

Posted in Rant on May 30, 2017 by asteriondaedalus

privacy

Keep it private while telling every fracker where you are, but yes don’t trust your private data to the cloud driven by not one company that has independent security assurance certification.

Triple Gag!

Posted in Linux, Orange Pi, The downside of Opensource on May 30, 2017 by asteriondaedalus

So, can’t install node nor npm from apt-get on either armbian (ubuntu or debian) for Orange Pi Zero.

The Googledrive links on the Orange Pi page were duds so I reluctantly went to the Baidu Cloud link.  Baidu Cloud is so slow that for the longest time I thought it had no files at that location – it took upwards of 5 minutes to load the webpage.  That was the reason for going to the armbian distro.

So, finally got the “official” debian distro for Orange Pi Zero.  A Gb that when burnt to SD gives you a whopping 65Mb??!!

Runs.  But it also prompts you to run a command to expand the disk.  So I did.

I then had to run SDFormatter and reload the disto because once you run the disk expander your OPI drops its connection to telnet and you cannot re-connect ever again??!!

The other way to break your “official” OPI debian distro is to run nmtui to set your static IP and host name etc.  Go figure, I was doing that ad nauseum on the armbian distros but on the “official” opi distro you can never get a connection ever again.

I have gone back to the armbian debian distro.  Rather than frack around with setting static IP on the OPI I set a fixed IP address to its MAC on my GATEWAY instead.

I am going to try the binary distro ahead of any stupid attempt to build it all from source.

Something like:

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

DOH@!$!#

While I was typing this blog entry the opi dropped out??!! So, apparently, the reservation of IP from the DHCP is not permanent SO back to nmtui – at least that doesn’t crack up the OPI when using armbian debian … yet.

 

 

Gag! And double Gag!

Posted in Linux, Orange Pi, The downside of Opensource on May 28, 2017 by asteriondaedalus

So, I downloaded Debian server for Orange Pi Zero ( the Armbian thingy).

I logged in using Cygwin terminal.

Ran the following:

sudo apt-get update && sudo apt-get upgrade

Go figure it would run for a while then drop out the connection.

I had to log in a couple of times.

Had to run the following to tidy up.

sudo dpkg --configure -a

Eventually got to a state where I could install node-red so followed instructions at a helpful website.

Got down to where you check for npm and node versions.  No error reports displayed previously.  However, when I tried to run npm or node to get the versions system could not find them.

I went to have a look at the bin directory.  The following directory exists but was empty:

/usr/bin/nodejs

Very grumpy.  Even a clean install is not working.

I am going to reformat the SD card and then try setting a static IP address for the board as I think I have some of the problem as the IP address expires on my while in mid session.  Something was likely not right after the update/upgrade.

Why priori knowledge is so irritating

Posted in Factor programming language, FORTH is it dead or isn't it? on May 20, 2017 by asteriondaedalus

Something so simple, if you have example code on your blog why on earth do you not included the includes.  Priori knowledge is not immediately explicit.

I bumbled through the example of constraint based programming in Factor.  Go figure, the actual code should be:

USE: backtrack
USE: locals

:: solve-711 ( -- seq )
    711 iota amb-lazy :> w
    711 w - iota amb-lazy :> x
    711 w - x - iota amb-lazy :> y
    711 w - x - y - :> z

    w x * y * z * 711,000,000 = [ fail ] unless

    { w x y z } ;

Run it with:

IN: scratchpad solve-711 .

Still, the debugging is fantastic and will suggest vocabularies to include (which helped sort out the missing “includes” aka USE:).

Interestingly Factor has a vocab “models” which sniffs a bit like the idea of models, in the first instance from MVC, but then subtly not unlike the way “model” is used in Elm and therefore Functional Reactive Programming.  Cool.

Although, its Concatenative Reactive Programming really – although that’s postfix functions rather than prefix.  Cool.

The difference is important though.  Elm “compiles” to JSP to “compile” to byte-code to run on the JVM.  In Factor, you are reactive in Factor.

Now, the key difference between Factor and Forth here is that Forth is for embedded systems.  Factor is not.  While you can squeeze Forth onto an AVR chip, they don’t even bother anymore with Factor on ARM.

Still, I get a queasy feeling it’s the FORTH community all over again.

It has just occured to me …

Posted in Chapel, ConCurrency, Erlang, ODROID-C1, Parallel Talk, Parallella on May 19, 2017 by asteriondaedalus

… what a coincidence.

The Parallella and the Odroid-C1 PCB are same size (almost).  Is that Feng Shui, synchronicity or serendipity?

Pity the post holes don’t line up.