Archive for December, 2015

So close!

Posted in Android, Linux, The downside of Opensource on December 31, 2015 by asteriondaedalus

I installed GnuRoot Debian on my MANN phone.

mann

It is ruggedized etc. and the IP67 rating means you can get it wet – it is rated to 1meters for 30minutes.  (That is assuming the Chinese manufacturer is honest, I have another so called IP67 phone that leaks like a sieve.)

I bought it because it has a Qualcomm Snapdragon MSM8212 Quad-Core which means I can use some of the libraries Qualcomm have for graphics including tag recognition etc.

It is also much cheaper than Samsung.  My Samsung S4 shattered the other month when it flexed in my back pocket as I sat into my car seat.

In any event.

Some small amount of work to get the ssh working (so I can work from by Tera Term or Cygwin on my PC).

First one must install SSH into the GNURoot Debian environment with:

apt-get install ssh-server

Then install vi into the GNURoot Debian with:
apt-get install vi

Then on the phone one needs to edit (make sure you make a backup copy of “sshd_config” first:

vi /etc/ssh/sshd_config

You can do this either on the phone with an X session or use VNC Viewer to do this (more conveniently) from your PC.

The default root password for the XWindow session is “gnuroot” (not in documentation … well there is no documentation, it turned up as an aside when the GNURoot Debian vendor was responding to another ssh problem).

Here we aim to jump the port from 22 to 2222 by editing sshd_config to read:

Port 2222

Turn off privileged separation by editing sshd_config to read:

UsePriviledgeSeparation no

So far so good.

Now from either Tera Term or your Cygwin terminal (and remembering we are running from port 2222, try to connect).  If you are running from cygwin console it is apt to type:

ssh -p 2222 root@<your phone IP address>

Yep.  Nope.

We get a connection.  We are asked for a password.  However, for what ever reason the password for the ssh sessions is so far UNKNOWN.  It isn’t gnuroot, root, password, and it isn’t “” I can tell you.

Nasty Useless Windows 10

Posted in Windoze10 on December 30, 2015 by asteriondaedalus

where is my pc

Why on earth does Windoze 10 Explorer need to scan my “This PC” for 15 or more minutes to find my drives and files.  Computer is dead useless with Windoze 10 with all the fracking problems.

Lost WiFi with last update.  Seems a pandemic according to my crawl of the Net.

Now the fix is to apparently update drivers.  Go figure, Acer is not updating drivers for my machine to work with Windoze 10.  Ralink (now MediaTek) driver installer is blocked by Windoze 10.

So the workaround was to use the wireless extender, that I connect my embedded development kits into, and an ethernet cable into back of my PC to bypass the need for the internal WiFi card.  Not optimum but otherwise how else do you fix it?

Especially the dearth of trustworthy help on the Net.

So many various fixes offered with trails of failure recorded.

Microsoft help offered was that I download a driver.  Very Dilbert-like of course, download a driver when one cannot connect to the Net.

Yes, various other routes to get around the lack of download but odd lack of critical thinking from goobers on the user groups.

OH FRACK OFF!

where is my pc2

So now all of my system is “missing” from Explorer!

Something quite chronic is happening to this stupid Windoze 10 box.

It is so depressing this rubbish, the trawling on the Net, the pasty albino gimps waiting on the user groups to slobber over your helplessness.  And no one really with a reason for why this crap happens.  Except Microsoft trying to improve your user experience.

Can’t complain really, after all got me my Windoze 10 update for free.

There goes that theory

Posted in Doodling, Hardware on December 21, 2015 by asteriondaedalus

As a kid we had an ultrasonic control for the television and I used to torment the dogs with it as they would react whenever it was used.

Fast forward and I am trying to find ways to keep out dogs out of patches of garden and especially the lawn.

So, why not I thought so I got a couple to three ultrasonic sensors for a mere couple of dollars each and threw one onto my trusty old (and expendable) MEGA 1280.

And…

Well either my boxerXstaffy is deaf or I suspect the power output of the tranducer isn’t high enough.

Begs the question then about some of the units you can by from China for a few dollars.

In any event, back to the drawing board.  I will likely need a more expensive and higher powered transducer.

DrRacket is a racket

Posted in Everything old is new again on December 6, 2015 by asteriondaedalus

What a way to get people through their prejudices.

Change the name from Scheme to Racket and bank on people not having a history of being misinformed to believe Lisp and Scheme are dead.

They ain’t of course.  Been hanging on for a Renaissance.

Go figure functional languages have resurged.  You remember those.

Of course Erlang does Lisp (aka lfe).

But what ballsy misdirection. Just don’t call it Scheme no more no more, just don’t call it Scheme no more.

Still.

Bad form in the examples:

(define (reply-more s)
  (cond
     [(equal? “hello” (substring s 0 5))
       “hi!”]
     [(equal? “goodbye” (substring s 0 7))
       “bye!”]
     [(equal? “?” (substring s ( (string-length s) 1)))
       “I don’t know”]
     [else “huh?”]))
> (reply-more “hello racket”)
“hi!”
> (reply-more “goodbye cruel world”)
“bye!”
> (reply-more “what is your favorite color?”)
“I don’t know”
> (reply-more “mine is lime green”)
“huh?”

The problem being  the test for “?” and that one is forced to fall through the first two tests and so it cracks up when a string shorter than 5 char comes through as there is an overrange condition.

For example:

(reply-more “bug?”)
. . substring: ending index is out of range
ending index: 5
starting index: 0
valid range: [0, 4]
string: “bug?”
>

Still takes me back.  I did knock up a lisp interpreter in FORTH years ago … for the shear fun of it.

The safer version thus (forgive the loss of indenting):

(define (reply-more s)
  (cond
    [(equal? “?” (substring s ( (string-length s) 1)))  
      “I don’t know”]
     [(equal? “hello” (substring s 0 5))       
      “hi!”]
     [(equal? “goodbye” (substring s 0 7))
      “bye!”]
     [else “huh?”]))

> (reply-more “bug?”)
“I don’t know”

I will leave it to the reader to work out if there is a bug if a 6 character string is used.

Now why I like lisp/scheme/forth?  The same reason I like python.  Very productive code and test and code and test and code and test.

So, now I like Racket too.

 

 

Tossing the coin …

Posted in ESP8266, Lua, MQTT on December 2, 2015 by asteriondaedalus

… is it the hardware or the software?

Not having any luck with the ESP8266 (as an ESP-01).

Seems I have to re-flash it over and over.

All I do in load the mqtt library and then create a client.  It then seems after a couple of minutes the chip hangs and then I get the chip jamming my bluetooth and I think now also my wireless networking at my PC.

If the led is glowing dimly rather than brightly seems to be the warning.  This sometimes happens when I plug in the USB.  That is I don’t get a bright led, it just barely glows … and of course my mouse then stutters across the screen as it is being jammed.

Not sure that it isn’t also temperature related as I did have the thing plugged in almost permanently this last week.

It may be a problem with the board design given the problem with the USB power tripping the problem and then its the potential for  also seeing the mqtt tripping it due to some bug.  Will take a little work to sort out since there seems to be two routes to same problem.  The potential hardware one though is the killer.

It will likely not be much use in the applications I want to use them in as I don’t want to be cracking boxes and jiggling bits all the time.

Still, I am curious.

When I tried a build tool on the web, to reduce the distro footprint, the crack up pumped wingdings to the terminal.  The full distro not so much.

Both times the mqtt.Create() call would close up shop after a while and the light on the board would dim and the jamming would commence.

If I can’t use them for reliable mqtt clients they’ll go in the bin.

The real problem being that nodeMCU is no longer actively supported.  Likely, was a curious side effect of hackers opening hardware design.  I guess they thought other so-called opensource hardware was making money.  However, Chinese knockoffs of the ESP-xx range abound.  Someone will have to front up to take over the baseline.

The other quirk.  I for some dumb reason decided to run the tools in my GoogleDrive folder so that any files was creating from the ESPlorer IDE would be backed up.   Go figure, the IDE creates a *.lck file when it runs (who knows why).  In any event the strange thing was that GoogleDrive would pick it up and you could not delete it.  That meant once you closed the IDE you could not open it again.  Found a tool on Microsoft site has “special powers” and so I got things working again.  I also moved the application folder back onto my trusty D drive.

Dam Open Source!

Posted in ESP8266, Lua, The downside of Opensource on December 1, 2015 by asteriondaedalus

Go figure, trying to get luagravity working on the ESP8266.  This is to have a little reactive programming going on!

Not to happen so far.

First luagravity won’t compile on ESP8266 as the full distro does not have enough memory.  Although the file is not that large.

I went to nodemcu forum to get help.

Told to “nick off” (nicely) as nodemcu is no longer in active development.

Got directed to an auto build tool.

Auto built a minimum size distro to see if that would allow me to squeeze luagravity on.

Got a binary and so simply had to flash it.

Flashed it.

ESPlorer IDE would not connect to chip on any baudrate.

Hmmm.

Tried reflashing the original distro.

Same deal!

No longer can connect on any baud rate.

In fact a strange defect appears to occur in the hardware.

I found that I either get the power led on when I power up the board OR I don’t.  When I don’t I found my bluetooth mouse was not behaving.  Turned out the ESP8266 is jamming my bluetooth (at least) when the power led doesn’t come on (but not because the power led doesn’t come on of course, there is something deeper happening).

Might have to pull another chip from the drawer to see what is what.

So much for reactive programming on the ESP8266.