Thursday, April 21, 2022

DJI Go 4 crashing on Android 12

Issue: DJI Go 4 crashes immediately upon launch on Android 12 (S20 FE in my case).  Lots of whining on forums, but fix is poorly documented.

Fix: download and manually install .apk here: https://www.dji.com/downloads/djiapp/dji-go-4

Monday, January 03, 2022

Windows 11 / Python 3.10 / rshell error: module 'collections' has no attribute 'Callable'

You want to edit file py3k_compat.py - depending on where you installed Python, this path will vary:

c:\python\lib\site-packages\pyreadline\py3k_compat.py

or (if installed for all users),

C:\Program Files\Python310\Lib\site-packages\pyreadline\py3k_compat.py

Update line 8 to read (add the .abc. - edit as Administrator if working in Program Files, don't change indentation):

return isinstance(x, collections.abc.Callable)

Reference:

https://www.mfitzp.com/tutorials/using-micropython-raspberry-pico/

https://github.com/hylang/hy/issues/2114


Friday, August 13, 2021

Arduino IDE error "An error occured while uploading the sketch" to Nano Connect on Raspberry OS

Platform details:

OS: Raspberry OS 10 / Buster (32-bit)

User: Default "pi"

Arduino IDE: 1.8.15, downloaded (not installed via apt or snap)

Primary symptom: Trying to load a sketch to known working Nano Connect results in error "An error occured while uploading the sketch"

Additional symptoms: Nano Connect serial port disappears, removable storage popup comes up

Fix: run $ sudo /home/pi/.arduino15/packages/arduino/hardware/mbed_rp2040/2.4.1/post_install.sh

 Thanks to YouTuber "an Erik"

Thursday, July 01, 2021

Pi Pico and AiP31068L RGB LCD displays

So I purchased a Waveshare Pi Pico kit.  Upon trying to get the included 16x2 LCD ("LCD1602") module working, I discovered that most of the popular published examples actually use a different chipset (HD44780 vs AiP31068L on the RGB Waveshare board).  Wiring is also different.

Web searches were not useful in finding a fix, but a chat with the friendly folk over at Waveshare pointed me in the direction of their excellent product wiki page.  Under the "Guides for Pico" section, there is a link (accurate at the time of writing) to their own libraries and examples.

Note that the non-RGB Waveshare LCD1602 states HD44780 compatibility, so if this is the one you have you should be good to go with the existing tutorials and libraries.

Friday, June 15, 2018

Debian 9 Build Guide

I decided to upgrade my Linode VM from 1 GB RAM/$5 per-month to the 2 GB RAM/$10 per-month offering - life is too short to faff around trying to get a modern distro with GUI and browser to work in 1 GB RAM.  I also decided to rebuild with Debian 9 to compare steps to Centos 7.

Update
$ apt-get update && apt-get upgrade

Change SSH port:
# vi /etc/ssh/sshd_config
Uncomment and change default port 22
# service sshd restart
Reboot and test
# reboot
Windows (Start -> Run or Windows key + R):
putty user@host -P 2222

Disable SSH root access
# adduser normalusername
# echo 'normalusername ALL=(ALL) ALL' >> /etc/sudoers
Test!!!  Skip testing at your own peril.
putty normalusername@host -P 2222
$ sudo su -
should succeed and get you to the # root prompt
# vi /etc/ssh/sshd_config
Edit line
PermitRootLogin yes
to
PermitRootLogin no
# service sshd restart












Install GUI
# tasksel
follow prompts, selected Xfce - hopefully better luck here than on the CentOS VM...

Enable remote access
# apt install -y xrdp tigervnc-standalone-server
# systemctl enable xrdp

And now I'm going to take a quick break, because apparently due to "Nautilus" I can't change the xfce desktop backgroup to something more friendly to a remote session.  


and for remote access
# yum install xrdp
# service xrdp start
# systemctl enable xrdp

CentOS 7 Remote Access / RDP / VNC

I recently signed up for a small hosted server with the friendly folks over at Linode.  For $5 per month, you can't really go wrong (1 GB RAM, 25 GB storage and 1 TB monthly transfer).  I opted for a Centos7 VM and was quite quickly up and running.  I created a DNS alias at FreeDNS as I kept forgetting my VM's IP.

I also configured SSH to use a non-standard port, as /var/log/secure was showing constant attempted logins from some overly friendly IP's in China.  I also blocked a couple of the most prevalent IP's.  I disabled the ability for root to directly ssh, opting to rather login as my "normal" user and sudo as required, to add another level of protection.

One bit I struggled with was remote GUI access, as I wanted this to be a general purpose box (followed Gnome install guide here).  I'm currently testing the third method on this page (XRDP) - it seems to have been the quickest to get up and running, but thus far is glacially slow - will udpate if I find a fix.  Might help somebody else in a pinch.  XRDP installation:

# yum -y install epel-release
# yum -y install xrdp
# systemctl start xrdp.service
# systemctl enable xrdp.service


UPDATE: Durrrr, modern Gnome and only 1 GB RAM do  not good bedfellows make - reverted Gnome install with:

# yum groupremove "GNOME Desktop" "Graphical Administration Tools"

And courtesy of this guide over at rootuesrs.com, installed Xfce:

# yum install epel-release -y
# yum groupinstall "Server with GUI" -y
# systemctl get-default
If not graphical.target
# systemctl set-default graphical.target

Something broke (XRDP VNC startup error), had to uninstall xrdp and then re-install VNC and xrdp:
# yum remove xrdp tightvncserver
# yum install tightvncserver
# yum install xrdp
# systemctl start xrdp.service
# systemctl enable xrdp.service
# reboot

And more woes, once RDP'd in - no menu bar or window controls:
Right-click on desktop and select Terminal - update this once proper fix found
$ xfce4-panel
$ xfwm4
Useful:
$ xfce4-settings-manager

Thursday, June 14, 2018

Bad Sleeper Diaries - Day 1

It is quite possible that I have been exhausted for the past twenty years, and have just learned to accept it as a state of being.  After several attempts at figuring out why I seldom (if ever) felt great, could never concentrate and was always sleepy, I might finally have stumbled upon the cause and - hopefully - the treatment.  It has taken a while to get here.  In my quest to figure out why, an initial diagnosis of ADHD from a psychiatrist and associated Ritalin treatment in my early thirties just gave me hyper focus and made me chatter away like a coked up marketing executive (pleasant but not helpful).

Subsequently, seeing an ENT and having a tonsillectomy and septoplasty to clear my airways made a small improvement (this was when I first began to suspect sleep issues - mid-thirties).  More importantly the doctor's stern warning to lose weight stuck with me, and by following a strict low carb/no alcohol diet with daily walking I was able to lose almost 30 kg's (66 lbs) over a 3- or 4-month period.  For a while, I was feeling good, losing weight, getting things done and living a healthy lifestyle.  For the first time in a long time I was happy with the way I looked in photos.

Sadly, life got in the way - the stresses of a poorly planned home renovation and new relationship led to me abandoning the diet and daily exercise, and over time I ballooned to my heaviest weight ever (currently 133 kg / 293 lbs).  The few years in-between then and now have certainly been eventual, with as many ups as downs - I sold the renovated house, bought a new one, my beautiful son arrived, I lost my mother to suicide, had to undergo a massive amount of stress to settle her estate, bought a new car, was able to settle all my debts (after many years of struggle) and after a rather stormy period separated from my son's mother (although we still live together and now get along quite well).

So I recently found myself, finally in a time of relative stability, and starting to get really frustrated.  Angry at myself for being overweight but also feeling despair that all my attempts at getting in shape failed.  Admittedly, some attempts were more determined than others, but it always seemed to fall apart after a few days.  I've been at this long enough to know to forgive myself and try to keep at it, but I would subconsciously drift back into normal patterns - I'd be genuinely surprised that weeks had passed since my last walk, as an example.

My thoughts feel like there are drunk spider monkeys controlling my brain, always running at high speed tangents, I find myself always going into a room and forgetting why I'm there, or unable to mentally sequence the simplest of tasks.  So in desperation I recently reached out to my ENT doc via email, explained that I'm now overweight and having great difficulty getting it under control (vicious circle of weight gain and low energy) and wanted to try out a CPAP machine to see if my broken sleep was the cause of my woes.  I've been told I snore badly for years, and when I sleep with somebody they tell me that my gasping during the night is quite disturbing.

I was excited to try this solution, but also knew that there would some hoops to jump through first.  The first of these was a "sleep lab", whereby I nervously spent a night in a nearby hospital with very many probes and sensors connected to me whilst they monitored my sleep.  I was worried about falling asleep under those conditions, but in my permanently exhausted state I was out like a light.  For the benefit of anybody else reading this with a similar condition, I'll add the detailed results of the sleep lab later - I recall my AHI was over 95 (apnea index - breathing obstructions per hour).  In addition, over 700 arousal events were recorded during my session.  All these number I need to learn to understand in detail as I go down this road.

A few days later, I was provided with a loan CPAP (Airsense 10 auto) from the sleep lab's office.  They showed me how to use it and allowed me two nights to test the machine.  The first morning after using the machine was an absolute revelation - I woke up feeling refreshed and with a sense of mental clarity I don't recall having ever experienced.  I simply felt calm and able to string thoughts together without difficulty.  I could get things done with such ease - as if the spider monkeys had sobered up and actually had a conductor orchestrating their actions.  During the night itself, I could only recollect waking up once (normally 2 or 3 times) - I was aware of the full face mask I was using but it wasn't too uncomfortable.

The second night did unfortunately not go so well and I didn't feel much different to normal waking up.  On this night I started out with the smaller nasal mask, but changed back to the full facial mask during the night.  Both masks seemed to leak quite badly during the night as well.  I did have realistic expectations, so whilst it would have been good to have a second night as good as the first, I'm fairly sure it will take a month or so to adjust fully.

Fast forward to the day before yesterday, and I reached out to the ENT doc's offices to quote me on my own CPAP machine.  I had been considering a used unit, but considering the price and importance of the machine would rather pay the premium for something dependable.  I was still a bit shocked when I got the quote of almost R15,000 (~USD1250) for the machine (same as the one I trialled) and full-face mask.  However, after a few minutes consideration I'd issued the payment.  I was very excited to go and collect it at the doctor's offices, where I underwent about an hour's worth of usage instructions and mask fitting.

I'm pleased to report that this morning I feel ... quite good.  Certainly not quite the wonderful sense I had after that first night, but I suspect this maybe due to having had a bottle of wine last night - this left me with a hint of a headache this morning.  I do feel better able to concentrate - I wouldn't normally be able to write anything like this without great difficulty.  I do still have a slight sense that the spider monkeys have been drinking, but it is reduced.  I woke up once or twice during the night to adjust my mask, but didn't have any major difficulties.  I'm looking forward to see how the day goes, and can't wait to complete my adjustment to this treatment.

Tuesday, April 10, 2018

Microsoft Visio 2007/2013 Startup Delay

If your Visio takes an annoyingly long time to start up every time, popping up with Windows "Please wait while Windows configures..." dialog, follow these simple steps:

  • Start -> Run (or Windows key + R): type regedit, click OK
  • Delete following registry key: HKEY_CURRENT_USER\Software\Classes\.vsd

Visio should start without delay post change.  Thanks to user Michal0007 over at Technet.

Thursday, December 14, 2017

Allow http through firewall on CentOS 7

$ firewall-cmd --permanent --zone=public --add-service=http
$ firewall-cmd --reload

Missing ifconfig on recent Fedora-based distributions (RHEL, CentOS, Scientific Linux)

In the absence of ifconfig, use the following to reveal your IP address:
$ ip addr

Thursday, December 07, 2017

RHEL yum update

If you know your way around CentOS or Fedora and find yourself in front of a new RHEL system, you might find you're unable to run yum update or yum install due to subscription errors.

You need a redhat.com account for this to work, simply issue:
$ sudo subscription-manager register
Follow the prompts and then:
$ sudo subscription-manager attach

You'll then be able to yum update to your heart's content.

Thursday, November 02, 2017

youtube-dl - 'list' is not recognized as an internal or external command, operable program or batch file.

Struggled for a while with youtube-dl trying to retrieve a playlist and converting to mp3 with this pilfered syntax:

youtube-dl -i --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" youtubeurlhere

Kept getting pesky error in the subject - just put the URL in double quotes ("youtubeurlhere").


-i parameter allows retrieval of media to continue in the event of error ("not allowed in your country", etc).

Copying ffmpeg bin's and youtube-dl.exe to %Windows%\System32 as well as the working folder seemed to help.

Source

Friday, October 27, 2017

Ubuntu Grant Sudo Access

I created a new Ubuntu user for a colleague using command "adduser username", but noted that the new user doesn't get sudo permissions by default (sensibly enough).  Easily rectified:

$ sudo usermod -a -G sudo username

Obviously in both cases replace "username" with the actual user's login.  The new user needs to log off and back on for the change to take effect (tested to confirm).

Ubuntu 17.10 Configure Static IP Address Command Line

Having promised a colleague that I would set up a Linux VM for him to play around on, I decided to use Ubuntu Linux 17.10 Server - he's interested in encryption and security so a desktop environment wouldn't be of much value.  The installation was typically Ubuntu smooth, but I was surprised to see that /etc/network/interfaces contained no reference to my active NIC, ens160 on my system - I still miss eth0 :(.

Seeing as Ubuntu 17.10 is quite new at this point in time, there wasn't a great deal of info as to how to statically configure the LAN adapter(s).  So without going into too much detail, you now need to know about netplan in order to configure Ubuntu NIC's.  My understanding is that this provides a more platform agnostic platform for LAN configuration, in order to provide a more consistent method across local, VM and cloud deployments.

Anyways, here it is - you want to edit /etc/netplan/01-netcfg.yaml.  Mine started out looking like this (DHCP auto config for LAN adapter ens160 - note that your LAN adapter might be called something else):

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: yes

I had to revise it as follows:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    ens160:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.10/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [8.8.8.8,8.8.4.4]

Save changes and execute "sudo netplan generate", followed by "sudo netplan apply".  Obviously if you're remotely connected you then want to connect to the new IP.  Credit to user Rolf over at askubuntu for helping to shed light on this.

Thursday, October 26, 2017

Owner's Review 2014 BMW F30 320i

I've had my 2014 BMW F30 320i for just under a year now, and thought I would share my thoughts on this vehicle.  When the F30 first came on the market to replace the good looking (pre-facelift) E90 in 2012, I wasn't entirely sold on the looks, but it's grown on me.  I'm still not crazy about the headlights stretching to the grille in front, but have gotten used to it and it looks to be part of BMW's design language which will be with us for a while.

I purchased the 320i to replace my beloved 2012 Suzuki Swift 1.4 GLS hatchback, when I needed a bit more space to accommodate my recently arrived son and associated paraphernalia.  This is my second BMW, the first was a 1999 E39 528i which I drove for about five years.  I must admit that I didn't quite get the same fantastic impression driving the F30 for the first time as I did driving the E39, but it is possible that I've become a little spoiled over the years (I moved up to the E39 from a battered 1985 Mercedes W123 230E).

To help set the scene here, I live in South Africa where cars are generally more expensive than the rest of the world.  Our economy is also not that great right now, so for me buying a car is something which I put a lot of thought and research into.  It's always amusing to chat with people from other countries, who smugly enumerate their long lists of option packs and track packs and this packs and that packs.  Whilst I'd certainly like some of those additional luxuries, they are just that and it can be difficult to justify the additional expense.  More on which options I would have liked below, though.

I chose a secondhand silver model in very good condition and with low mileage (about 35,000km's when I took ownership).  I would have liked the M Sport edition, but couldn't quite justify the price premium.  I also think that the F30 is one of those models where the front bumper of the non-sport model is almost as attractive as the gaping maw of the M Sport.  Mine came with 17" rims, which also means cheaper tires than the 18/19's on the Sport when replacement time comes, but still more presence than the unattractive 16's on lowlier models.

One inclusion which I was very pleased with was the xenon headlights with white "angel eyes" - it's pure vanity, but I always wished for these on my E39.  I could do without the pesky headlight washing system, though - this just squirts water everywhere and means you have to more frequently fill the window washer reservoir.  Other handy inclusions were PDC sensors front and rear, auto headlights and auto windscreen washers - I've gotten very used to these features, which I believe are standard spec.

I bought the vehicle from a private seller, but ended up collecting it from a dealership where it had had its mandatory inspection for the Motorplan to be transferred to my name - R1500 well spent for three years of peace of mind.  It was both thrilling and daunting to drive it home, being the most expensive car I'd ever driven.  Once the initial thrill had worn off, I did notice a few niggles.  I'm quite large (yes yes, working on it), and the standard seats feel very narrow - it feels as if the non-adjustable bolsters are almost in the middle of my back.

The front seat belt clips are also set quite low, and it can take a little bit of fiddling to get used to their placement - I now pass the belt from right hand to left, which seems to make it easier (right-hand drive in SA).  It also took me quite long to find a comfortable driving position with the manual seats - on longer trips I would quite often get cramps in my legs.  I now find the car quite comfortable, but it took a while to get used to it - I initially almost regretted my decision.

I was a big fan of the BMW straight six in the E39 and wasn't expecting the same silky character from the F30's turbo four, but I must say it has its own charm.  It has a pleasing rumble when pottering around town - it is distant and muted, but present nonetheless.  Open the taps and acceleration is smooth and linear - it feels very fast off the line, which the ~7.5s 0 to 100 time attests to.  Get the revs just right and there is a distant choof from the turbo when shifting.  I would love a little bit more audible feedback from the engine and exhaust - maybe the Sport would have brought that.

Speaking of the Sport, there is a surprising amount of body roll on my vehicle, most notable when going around traffic circles/roundabouts.  It sticks and sticks and I haven't yet come close to losing traction, but it is less than re-assuring when it feels as if you're leaning like a yacht in a gale whilst cornering.  I've read that this can be addressed with the adjustable suspension option, I'll probably seriously consider inclusion of that option if/when I buy BMW again.  Performance on the freeway is just about spot on - BMW's driving pleasure adage definitely applies there.  Steering feel and response is great too, nothing more to be said there.  The steering wheel itself is also fine and feels good, although the tiller included with the M Sport is much smarter looking (the proper one, not the normal 3-spoke with M badge).

Compared to other modern the cars, where there has been so much development in this area lately, the infotainment system on the base model feels a bit antiquated.  There's USB and aux support, decent Bluetooth phone connectivity but no Bluetooth audio streaming - really BMW???  I get by using a little Bluetooth dongle in the aux port and permanently charging off USB to get my Google Music groove on.  This is a pest as I have to switch it on every time I start the car (seems to the case with most of these dongles) - in fact it might be easier just plugging in the aux cable every time.  I'm not fussed about the lack of satnav, I prefer using my phone anyway.

The iDrive interface is perfectly usable for the minimal functions exposed in my model (basically radio and telephone).  I'm also not concern about the lack of touchscreen, I prefer the main controls being via tactile buttons I just have to glance at when on the move.  The sound from the base stereo is adequate and seems to be getting better with time, but the upgraded HK head unit would be a very tempting selection if I had that options list in front of me.  In terms of general features, I thought I would miss the comfort access option from my Suzuki more than what I actually do - pressing a button on the key fob or on the door to unlock is about the same amount of effort.  I do appreciate the start button - hop in and go - the physical key on a Ford Focus I recently tested seemed a bit archaic.

Considering that my daily commute is a very short stop/start trip, my fuel consumption figure of 11.6 l/100km is to be expected - it gets better on the open road.  I ruled out a diesel and the associated consumption benefits from the outset, because apparently daily short trips and diesels aren't a good mix.  Also they belong in tractors.  One aspect of the F30 which surprised me is its size - this is quite a big car, only a little smaller than my old E39.  It's not obvious when you look at it, but is when you're driving it.

Visibility is generally good, but I find it to be a hassle to park.  There is very little sense of where the car's corners are, and even parking in a normal horizontal bay can take a number of attempts.  I was pleased to see that it wasn't just me that encountered this difficulty when I raised the topic on an online forum - the current gen X3 also received the same complaint.  I'm getting used to it, but I don't recall ever having this difficulty with the E39.  Ironically two of the stereotypical BMW attributes - bad parking and imrproper use of turn signals - both seem to be encouraged in this car.  The turn signals aren't that great, they feel solid but often stay on when I don't want them to, or go off when I want them to stay on.

Minor niggles aside, I'm not at all sorry I bought the 320i.  I get a thrill every time I see it, and always look forward to going for a drive.  I might consider something a little more compact next time for that nippy feeling I miss from the Suzuki, but otherwise give the F30 a solid 4.5 out of  5.

Wednesday, October 25, 2017

GNS3 on VMWare ESXi - Useful Links

After getting GNS3 up and running under ESXi, I found these links useful:
GNS3 Latest Version
Be sure to use the GNS3 frontend version which corresponds with your server version.  When installing the frontend on your client PC, you only have to select GNS3, nothing else (dynamips, etc.).  Be sure to update after updating server version as well.
Installation
Very straightforward, follow the doc and it should work - do note the ESXi 6.5 caveats/required updates.
IOS images
If you must
Appliances
Lots of cool stuff here, the appliance file will usually guide you to any additional image files which need to be downloaded and can then be imported via GNS3 frontend
IOU images
I don't know about the legality of this, but we're all using the product for educational purposes and to better ourselves - I don't yet know of another way of getting the required IOU images.
Generate IOU license
Note that the http://gns3host:8000/upload method is no longer used, configure your IOU settings and license via GNS3 frontend: Edit -> Preferences... -> IOS on UNIX.  Run linked script on GNS3 server host and look for iourc.txt output file in /home/gns3 if using default user settings.  Upload that file and note other instructions output by script.

Monday, October 23, 2017

Remix Mini - Buyer Beware / Lollipop Forever

I recently purchased a Remix Mini compact Android PC, for the purposes of getting Netflix, Kodi and YouTube to my old non-smart Samsung plasma TV.  I was previously using a clunky old Dell 780 minitower PC which served the purpose well, but took up a lot of space.  The Remix Mini gets a lot of positive publicity, with most reviewers being of the opinion that if you have realistic expectations of the performance from such a small and cheap unit, you won't be disappointed.

Armed with that knowledge and having gotten one for a bargain basement price, I was pleasantly surprised by the performance of the little box - it's no rocket, but works amply well for my purposes (mostly - more to follow).  I wasn't fussed with the maximum 1080P output, even when I subsequently upgraded to a Hisense M7000 4K smart TV, 1080P looked fine from couch distance.  Apparently the Remix Mini is the result of a successful Kickstarter campaign and seems to be a bit of a media darling in that respect.  I did note that once it had loaded its initial updates, it was still on Android 5.1 / Lollipop.

I didn't think much of this at the time, assuming that the unit would still be well supported and would eventually upgrade itself to Marshmallow.  Alas, 'twas not to be.  Apparently on account of the Allwinner H64 SoC which powers the unit, it will never see an Android release beyond 5.1.  This is very disappointing and not widely publicized information.  I've got nothing against Lollipop, my previous Xiaomi Redmi Note 2 phone ran it without issue and I was happy with that, but times are moving on.

It does suck to have bought a new piece of kit and realize that it's pretty much obsolete out of the box.  Sure, it was cheap but it's not just the cost - it's the time that you put in getting everything set up and working the way you want.  I've picked up minor irritations with certain packages on the Play Store not functioning correctly (ahem MX Player ahem), but haven't yet been able to definitively pin this down to a Marshmallow issue.  I'm obviously aware that you takes your chances with such Chinese products, but really think the already published reviews should be updated with this info so that buyers can make an informed decision.  I hope this info is useful to other (potential) users of the same system.

Thursday, September 21, 2017

VMWare ESXi 6.5a unhandled exception / invalid disk image errors

The default web interface module in the ESXi 6.5a iso release is buggy, get the latest web interface update from this link (direct link to the vib).

Links are borking - here https://labs.vmware.com/flings/esxi-embedded-host-client/

GNS3 + Centos 7.x

This and this (or it doesn't start).