Archive for the The Downside of software development Category

Soooooooooooo…

Posted in Linux, Orange Pi, Rant, The Downside of software development on June 15, 2017 by asteriondaedalus

…weird!

So, story up to this point was again I added the expansion board to my OPiZ.  That fragged the board somehow so that it had the weird side effect of not booting orangepi.org version of Debian server but happily still booted armbian.ord distro of Debian server.

Weird because orange.pi Debian server is derived (I think) from armbian.org’s distro (at some point).

Weird because orangepi.org distro booted happily before fragging by inserting expansion board.  Weird because even if you took the expansion board out orange.pi distro would not boot from OPiZ any more.

Weider again was that once the expansion board fragged the baseboard, the armbian.org distro could not be set with a static IP via nmtui on the OPiZ.  That was because, after fragging, nmtui would hang the armbian.org distro whenever you tried going to the connections page.

Weird because you could happily set the hostname using nmtui??!!

So, go figure.  I thought to try nmcli.

From examples on internet it should have gone something like (for my setup at least):

root@house:~# nmcli con edit 'Wired connection 1'
nmcli> set ipv4.method manual
nmcli> set ipv4.addresses 192.169.0.100/24
nmcli> set ipv4.gateway 192.168.0.1
nmcli> set ipv4.dns 61.9.226.33 61.9.226.1 8.8.8.8 8.8.8.4
nmcli> save
nmcli> quit
root@house:~#

However, quirk of Armbian is that there is no ipv4.gateway property.  Without it I had set up a static IP but could not get out to internet (no gateway).

I came across a probable back door route with the following;

root@house:~# nano /etc/network/if-up.d/gwconfig
#!/bin/sh

if [ "$IFACE" = "eth0" ]; then
 route add default gw 192.168.0.1
fi
root@house:~# chmod a+x /etc/network/if-up.d/gwconfig

You can then just reboot and then every time you boot “route add default” sets your gateway.

Except in Armbian, of course, that route command does not work with those parameters!

DOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOooooooohhhh!

However, while the help file never said “gateway” there was some discussion in the help for nmcli on “addresses”, and in other places, that talked about “hops”.

So, AH HA moment (reaching back to that neuron containing networking 101).

So it turned out the fix was not obvious but is:

root@house:~# nmcli con edit 'Wired connection 1'
nmcli> set ipv4.method manual
nmcli> set ipv4.addresses 192.168.0.100/24 192.168.0.1
nmcli> set ipv4.dns 61.9.226.33 61.9.226.1 8.8.8.8 8.8.8.4
nmcli> save
nmcli> quit
root@house:~#

Notice the gateway is set in address now after the static IP for the OPiZ.

To check this you can use with “route -n”, you should see something like:

route-n

The garbage preceding it is the node-red shutdown down – sweet.

So, now I have static IP setup on my OPiZ – not the happiest route … ha ha … get it?

Now all I have to do is sort the stupid node-red and emqttd problem where, despite quite straight forward steps, neither will start for me as services.  That is the next step as discussed I want the OPiZ to start up with things a blazing.  Although, there might be a backdoor route through startup scripts.

Advertisements

Stereo slam dunk

Posted in Python RULES!, Sensing, The Downside of software development, Vision on June 11, 2017 by asteriondaedalus

With some pain I got the stereo camera that turned up the other day, from aliexpress, to work (provisionally).

stereo_slam1

This is on my windoze PC using 64bit Stackless Python and OpenCV 3.2.

Trick, that stopped me for two days, was working out the problem where one or the other camera would work.  But both together hung.  I would swap order and get same thing.

Turned out to be USB 2.0 choking.  So fix was to work out how to set the image size small enough for the two camera streams to cooperate on the on USB port.

Camera is this one:

stereo_slam2

Which has specs of: 1280*720 MJPEG 30fps 120 degree dual lens usb camera module HD CMOS OV9712. Which is, as it turns out, a lie in this configuration.  The device is USB 2.0 so will choke when trying to pump both through at the same time.  Some work will be needed to sort the maximum resolution that the cameras can be set to – there is likely some black magic math somewhere (or trial and error).

I haven’t used much science in the selection (I waited until prices dropped and grabbed the lowest price one at the time).  I opted for wider field of view because I suspect that creates greater disparity between points to help localisation – however, don’t quote me as that is not back up by any reading at the moment.

The hangup, at the moment, is that while the two cameras are working, OpenCV does rather have various matrix types and so the rotten thing (as usual) “thin”  or sporadic documentation.

If you find “help” any it will be using deprecated functions (from previous versions of OpenCV) or in C++ etc.

Even just a disparity map, that uses the stereo image to show depth planes, needs matrix conversions.

Still, once these are worked out I can buzz out a design on the PC before migrating to an embedded form factor (C.H.I.P., ODROID-C0 or Orange Pi Zero, perhaps even old Android phone).

I am after something to pump a point cloud out.  Using mono-slam is fun but I am not sure that having to get the camera video processing and platform pose working together is happiest medium – since people are helping out with stereo camera like this especially.

Goddamit!

Posted in The Downside of software development on April 24, 2017 by asteriondaedalus

Microsoft are so lame.

Go figure, I bit the bullet and decided to play with MRPT.  The straightforward approach was to run it on my PC so, yes, yet another version of Visual Studio (2013 this time).  It is always with great trepidation I grab yet-another-version of VS as MS seemed not to manage the interaction between licencing between versions.  I have had problems due simply to installing two different versions of the toolset.  The problem was amplified because CMAKE is being used. So, if I mention CMAKE in the help room, when discussing the context in which the error is raised, some dopey MS/VS guru will dump on you for using OPENSOURCE software (CMAKE) even though you’re using the FREE version of VS.

In any event.

Stung again somewhat.

Install taking a stupid long time.

Why.

Its installing all the components I told it not to in the original panels of the wizard.

Why on earth do I want the Windows 8 for phones SDK?

Upgrading Quartus

Posted in The Downside of software development on May 9, 2014 by asteriondaedalus

Well, that was my fault be being lazy.  Since the Quartus downloads take so much time, once I found 13.1 didn’t have support for Cyclone II, I played safe and went for 10.1 sp1.

I am now downloading and installing 11.1 sp2 software to get around problems with Qsim (hopefully) as well as giving me Cyclone II and Max II support (still).

Go figure though, I installed 11.1 University Program (UP) with Qsim over 10.1 okay and Qsim would run, though its wave editor would not.

Now I install 11.1 UP over 11.1 Quartus and naught, nothing, na da, no Qsim installed.

On top of that, the 11.1 install of ModelSim does not recognise the 11.1 install of Quartus, even then I manually point it into the directory, so it won’t install.

Why did I bother?

POST SCRIPT

Where we are at now is I have ripped out all Altera software and reinstalled:

  1. Quartus II sp2 Build 259 into clean directory “11.1” and program group “Altera 11.1”
  2. ModelSim-Starter 11.1 sp1 Build 216 into directory “11.1” created in step above and used the same program group “Altera 11.1”

Having said that, it took quite a while with slow downloads and installing and uninstalling to get that sorted.

We will have to go back to our SOPC example to re-do it in the new Qsys tool, though that isn’t as scary as it sounds.

What we might do next is add a few personalized instructions to our CPU – just to buzz out that process.

This newer development environment includes a “better” way of doing this apparently.

Setting up ModelSim with Quartus II … how hard can it be?

Posted in The Downside of software development on May 9, 2014 by asteriondaedalus

Starting with the “Getting Started with Quartus II Simulation Using the ModelSim-Altera Software” get straight into trouble.

You need a “counter.zip” file that is, you guessed it, not in the distro.

Various “counter.zip” files appear an Altera site and, of course, there are about 1 billion trillion of them on the interwebby thing all up.

Seems the one needed has a “counter.qpf” inside of it … have you seen it?  Hmmm?

So I went back to Altera and downloaded a raft of docco for 10.1.

I don’t know … I don’t get the feeling you get the same bang for buck this way Xilinx as you do for Altera.

In any event, I feel another laboratory report coming on.

 

Cylone II-Exp.11-Epiphany! Or ah ha!

Posted in Cyclone II Experiments, NIOS II Experiments, The Downside of software development on May 4, 2014 by asteriondaedalus

I pinged the board vendor to see if there were any gothchas when setting up this board.

Turns out, a couple of steps missing from the tutorial from Altera – go figure, you have to have priori knowledge to be a Newbee.  I hate the idea of Newbee, I am not sure why in a world of liberal education the idea persists.  If an educator was to take the viewpoint that someone ‘new’ was to be left to the devices of people not more knowledgeable than they for help then parents would be rioting and burning schools down I suspect.  Once you’re out of school, it is okay to make people put on a dunce’s cap and make them stand in the corner.

In any event, at least one step missing was to set the un-used pins to tri-stated inputs.  The other potentially missing step appeared to be running a second menu command to auto select interrupt vectors (inline with Step 11.).

We’ll see where those new bits of information get us.

Cylone II-Exp.11 – the saga continues

Posted in Cyclone II Experiments, NIOS II Experiments, The Downside of software development on May 4, 2014 by asteriondaedalus

Can’t clear the screaming board, software loads but board screams.

I did a compare between the hand built and example project *.ptf and nothing jumps out.

Tried building against VHDL instead of Verilog and got “Error: generation skipped because the system has validation errors”!

So, building a 5 component software core, with defaults, in a wizard, based on an example from Altera, and can’t even get the tool to generate the files.

Wretched isn’t it.

I am downloading 11.1 SP2 and will remove 10.1 and re-install etc.

I am not holding my breath and neither should you.