Sunday, 27 December 2020

Strange serial port issue with Arduino nano 33 sense ble

Serial port problems with Arduino nano 33 sense

Can't upload sketch / Can't connect via Putty or serial monitor

I gave myself a nano Christmas present: A brand new Arduino Nano 33 Sense BLE. Mainly because I wanted to try out machine learning with TinyML, but the book from O'Reilly is still in the mail.

Tiny, but with lots of sensors

So I started exploring Bluetooth LE, trying to master that skill first. It was a slightly bumpy ride because from time to time the Arduino IDE switched the serial port to COM5, while the Arduino clearly was on COM7 (these will very likely be different on your PC)

The nano 33 on COM7

I reset the arduino a couple of times, but I couldn't get it to communicate via COM7, although the port was clearly present in Windows.

Double click the reset button

More or less by chance I double-clicked the reset button. And - whatdoyouknow - I had the Nano on COM5. - How strange!

The nano 33 on COM5
Now I could upload sketches again. - Ok. But COM port assignments in Windows don't change without a good reason. Let's dig deeper.

USB device tree viewer

Uwe Sieber has published a great, free tool "USB tree viewer", that shows all the details of all attached USB devices. I can then copy both (the COM7 and COM5) configurations to Notepad++ and run the Compare-Plugin.

As expected, the double click on the reset button lets the nano 33 appear as a very different device:

While the Vendor ID is alwaysd 0x2341 (Arduino SA), the product ID changes from 0x805A to 0x005A. The device ID, revision number and sleep modes also change.

The device descriptor string 2 changes from "Nano 33 BLE" to "Arduino Nano 33 BLE" string descriptor 3 is the same, but padded with leading "0"s.

Looks like two different devices

No wonder Windows sees that as a new device. I have no idea what the point in all that is.

Please leave a comment if you have more info.

EDIT 20210107:
The behavior is actually documented in the documentation:

If the board does not enter the upload mode, please do a double press on the reset button before the upload process is initiated; the orange LED should slowly fade in and out to show that the board is waiting for the upload.

I still find the "nano 33 ble sense" rather unpleasant to work with because of that.

Friday, 25 December 2020

Macbook late 2008 SSD upgrade

Macbook SSD upgrade

With only 2GByte of RAM and an out-of-support El Capitan (OSX 10.11), the 12 year old MacBook is somewhere between "ready for recycling" and "too good to waste". Over time it had become unbearably sluggish. So with prior good results on Windows PCs from the same era, I decided to give it a go.

It is super easy and reasonably safe even for intrepud beginners.

SSD selection

I tend to go for maior brands whenever affordable. Amazon had a 500GByte Samsung 860 EVO for cheap on Black Friday 2020, so that ist the SSD of choice. The person using the Mac as a mail and browse machine will never even come near the full capacity of that disk.

Preparations / backup

A full time machine backup on an external USB drive is all it takes to recover the installation to a new SSD.

Physical installation

These old devices are built to last and to be serviced: Just remove the bottom cover (unlock with lever). Remove the disk holder (black plastic bar) with a small Phillips screw driver and lift out the old disk by the pull-tab.

Carefully remove the SATA connector from the left side of the old hard disk.

Remove the four small bolts that held the disk in place and install them on the new SSD

Reconnect the SATA connector

Insert the SSD and fix it with the plastic bar.

Close the battery/harddisk cover.

SSD preparation

Attach the USB drive with the Time Machine backup to a USB port.

After a little wait, the MacBook will boot from the USB drive.

A menue comes up: There choose the hard disk utility and add a partition to the SSD (accept the first file system option).

Go back to the previous menu

Restore from Time Machine Backup

Choose your Time Machine Backup Disk and select the latest backup.

Wait for the restore to complete

Wait for the restore to finish and reboot

Tell the Mac where to boot from

It speeds up the boot process a lot when you set the new SSD as the boot device in the settings. Otherwise it takes a while to find bootable devices.

That relatively cheap upgrade saved the nearly unuseable machine from the junk yard. With only two 1GByte RAM modules installed, the next option is to go for more memory. With the last published firmware version, this machine supports up to 8GByte.

Friday, 4 December 2020

Inside an AMG8833 thermal imager

Very simple AMG8833 thermal imager

(I took it through it's paces in this video)

For years I had felt he need for a thermal imager or thermal camera to help me find faulty electronic components. But the price tag was prohibitive.

40mA - not very power hungry

I experimented with a single temperature sensor, sweeping a range with model servos. Interesting and entertaining, but not really useful. That was back in 2013. Even later, the cost for the simplest "grid eye" was still a bit on the high side for an experimenter. Until recently.

Bare bones imager

I then found this bare bones / no frills thermal camera here on Banggood. It comes without any matching documentation, let alone a manufacturer name.

PCB Version 5.1.2 from June2020

It has a resolution of 8x8 pixels and sports the "high gain" version of the Grideye. While "high gain" sounds like a good thing, it actually limits the sensor's thermal range to 0-80 degree centigrade.

The AMG8833

The Panasonic GridEye comes in different flavours that is easy to decipher from the part number:

The 88 stands for the 8x8 pixel resolution, the next digit shows the operating voltage 5 for 5volts, 3 for 3.3 volts. And finally a 3 for the "high gain" and a 4 for the "low gain" version, with the low gain version ranging from -20C to 100C. We don't have that in this device so on very cold days, the outside world looks like a blank sheet to the imager.

The next step up is the 32x24 pixels MLX90640 from Melexis, which has a -40 to 300C temperature range. Looking at what 8x8 pixels can do, 32x24 should be awesome. It comes at about twice the cost of the AMG8833 based imager, also from Banggood.

Electronics repair

It all boils down to the question: are 8x8 pixels sufficient to identify hotspots in a faulty device?

44c after just a few seconds
With it's 60degree field of view, working close-up gives enough contrast to identify individual hotspots. One thing to notice is that the colour scheme is autoscaling. So "red" just means warmer than the surrounding area, not necessarity hot. The colors are spread over the range currently detected by the sensor. The good aspect is that it always gives the best contrast possible, the downside is, that it can be very irritating.

The microcontroller

The GD32 ARM Cortex-M3 Microcontroller

Quite a capable little 32-bit RISC microcontroller from GigaDevice's "Value Line". See the data sheet here for details. The GD32F130F4P6 is the simplest of the DG32F130Fx family in the TSSOP20 package, sporting 16kByte of flash memory.
This thing appears to be pretty much a clone of the STM32F103x4 and might well be programmable with a ST-Link programmer. (haven't tested that).
The earlier 1.1 version, for which Banggood has a schematic diagram available, had a STM32F103C8, which essentially has the same performance, but more (64KBytes) of flash memory. So they obviously cut costs here a little on their way to Version 5.1.2

Final words

At a price point around 50 EUR/USD, this is not only a great experimenter's gadget, but very useful to track down thermal problems. Certainly no match for a full blown thermal camera, possibly even with a visual overlay - the cheapest models starting at three times the cost of this device.
The 0-80C temperature range can also be a maior limitation, depending on the intended use.
For me it is way better than sniffing out hotspots on PCBs or burning my fingers on them.

Sunday, 15 November 2020

RF-Power8000 - Power meter installation on Windows 10

RF-Power8000 Installation

Get the software

I got my RF-Power8000 here from Bangood. Unfortunately they didn't provide a download link for the software and manual. A quick google search at the time (Nov.2020) of writing revealed this source:
  • Software download from passion-radio LINK
  • Instruction manual from passion-radio LINK

Install the driver

The RF8000 communicates over a USB-to-serial bridge, that your computer might not immediately find the right driver for. In that case, you'll find a "serial" device marked with a "?" in the device manager.
The driver is provided with the software package (see above). As I don't like drivers that come with a setup routine, I recommend to use the "rightclick/update driver" function of the device manager.
Just point it to the "drivers_usb_CH340" folder and windows will find and install the driver.
At that point you should see another serial port in the device manager:

The meter shows up on COM6

Register MSCOMM32.OCX

Depending on other installations on your PC, starting the RF8000 software with the uninventive name of "english.exe" might result in an error message. In that case, MSCOMM32.OCX needs to be registered on your system.
To register the OCX, open an "elevated shell" (right click the start button and choose "Windows Powershell (Administrator)")
There type (with the path pointing to your rg_8000 directory):
 .\regsvr32.exe C:\Users\admin\Desktop\RFPower8000\rf_8000\MSCOMM32.OCX

Your path will be different

Configure the software

The program "english.exe" needs to be configured for both the COM-Port and the Baud Rage. It defaults to COM1 and 4800. While with some luck, your COM-Port might be "1", the baud rate ist not correct. Also: in "Model selection" choose "RF-Power8000"
Here are the correct settings:
  • Model selection RF-Power8000 (F3)
  • Port number: set that to what your device manager shows as Com Port. In my case COM6
  • Baud Rate: 9600
After that, I have to press the center button to start the meter.

No, it ain't pretty :-(

To set the frequency and the attenuator value (you absolutely need an external attenuator!) for the measurement, hit the "spanner and screwdriver" button.

Addendum 20201116:
This russian (?) RC enthusiast has written his own software for the RF-Power8000

And it looks good, too:

Saturday, 16 May 2020

Tello Motor Repair done right!

How to change a Tello Ryze Drone motor

Other instructions on the web

Before attempting the repair, I checked the web for tutorials. But found most of them pretty terrible, usually causing permanent damage or ugliness to that nice drone.
All except one from DroneZone, which I only found after having finished the repair :-(

That is what a decent job looks like

Tools required

While not really a tool, you need a replacement motor. There are several sources on the web, but they come with small weirdnesses like gears or plugs. Like so often, I got mine from Banggood. They come in two wire lengths (71mm or 87mm), but as a wire can never be too long, I went for the 87mm, although I needed to replace a front motor, where the leads are shorter.
These motors are properly keyed, so you can't confuse the clockwise and counterclockwise motors.

Other than that, good quality precision screwdrivers are a must. Poor screwsrivers ruin the screws. I currently use both a Wowstick, and traditional hand tools, depending on the job at hand.
And of course the wonderful, regulated Mini TS80 soldering iron. The first USB iron that doesn't suck. It does not come cheap, but during the building renovations, when I had no lab space, I learned to love it and won't go back to my old Ersa iron.

Other household items include
  • a pin to peel off the gunk that seals the solder points
  • wire cutters / needle nose pliers
  • Tweezers are handy, too

Problems encountered

If you follow my video (see here), you will find that I struggled at a few points

Cracking the case open

The plastic is very thin, so go around the edges carefully with a spudger.

Removing the gunk over the solder pads

This was a pain. I tried several methods. What worked best in the end was to peel the silicone-like gunk off with a needle. No great fun.


Desoldering needed more heat than I thought, given the delicate wires. That might have to do with the solder. I set the iron to 340 degrees centigrade. Later, when soldering the new wires to the board, the joints went dry immediately, so I replaced the solder. (Using solder wick)

Hotglue over the cable duct

Where the motor wire enters the body, there is a drop of hot-snot over the groove the wire runs it. This needs to be cleaned out.

Getting the motor out

That was not really hard. I could pull it out with my pliers, but the cable running through the motor holder gave quite a bit of resistance. So I smelled trouble getting the new wires in.
Motor arm

Putting the new motor in

The actual trouble is to get the new wires through the tiny hole in the motor arm. The trick is to bend the wires at an angle. You can see that in my video.

Final words

After the repair, I went through two freshly charged batteries. No problems. And other than in some repair videos, the drone does not look like it had been chewed up by a dog after the repair.

Friday, 15 May 2020

Benefits of using hardware encoding on an Intel HD 630 with ShotCut

CPU Power vs GPU for Video Processing

My prefered video editor
Shotcut Video Editor


My Fujitsu Esprimo Q957 is more of an office PC than a Video editing, Coding, 
CAD or hardware experimenter's platform. But for the space it takes on my much-too-small desk, it does an amazing job in all of the above disciplines.
CPU-Z shows the GPU
So all in all, I didn't think the integrated GPU could help me getting the jobs done more quickly.

Encoding on the Intel HD Graphics 630

A near 15 minute video I currently work on, needed an unusually high number of modifications. Each with a lot of noise from the fans running at full speed.
100% CPU
This took nearly 8 minutes at an unpleasant noise level. Time to investigate alternatives...
Let's try that...
Involving the GPU is amazingly efficient. Less CPU usage and the GPU at a little over 50%, along with somewhat less noise.
CPU-wise this does not look like a massive difference, bit it is.
The best part: Videos now encode in half the time. Much better than what I had expected from an integrated "Office-PC" GPU.
Success! Less than half the time :-)

PS: Here is the link to Shotcut (free and open source)

PPS: To my amazement, the tiny Fujitsu desktop easily outperforms my relatively recent Surface Laptop 2. The benchmark only shows a little over 10% difference ( ), but the system takes 6 minutes for the same job as above, even with the help of it's Intel HD 620. 

Friday, 14 February 2020

Verkonfigurierten USB Stick retten

Nach Experimenten mit einem Linux-Live System auf einem USB-Stick, erkannte Windows das Gerät nicht mehr ordentlich. Der grafische "diskmgr" brach an den entscheidenen Stellen mit Fehlermeldungen ab.

English version <here>

Hier die Vorgehensweise:
In Win10 die Administrative Shell starten (Rechtsklick auf das Windows-Logo, dann "Windows PowerShell (Administrator)" starten.
Dort "diskpart" aufrufen

DISKPART> list disk

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
  Datenträger 0    Online          238 GB  1024 KB        *
  Datenträger 1    Online           29 GB  1024 KB

DISKPART> select disk 1

Datenträger 1 ist jetzt der gewählte Datenträger.

DISKPART> list disk

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
  Datenträger 0    Online          238 GB  1024 KB        *
* Datenträger 1    Online           29 GB  1024 KB


Der Datenträger wurde bereinigt.

DISKPART> create partition primary

Die angegebene Partition wurde erfolgreich erstellt.

DISKPART> active

Die aktuelle Partition wurde als aktiv markiert.

DISKPART> list part

  Partition ###  Typ               Größe    Offset
  -------------  ----------------  -------  -------
  Partition 1    Primär              29 GB  1024 KB


Spätestens jetzt erscheint das Laufwerk mit einem Laufwerksbuchstaben im Explorer und kann wie gewohnt formatiert werden.

Achtung: Wählt man die falsche Disk, kann man sich leicht das System zerstören. Ein Vergleich der Ausgabe von "list disk" mit eingestecktem und abgezogenem USB-Stick hilft die richtige ID zu finden.

USB drive recovery after partitioning problems

This article once again is a "note so self" so I remember how to fix my thumbdrive after a screw-up experimenting with Linux;

In win 10 start "Windows Power Shell (Administrator)
Start "diskpart", then:

DISKPART> list disk

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
  Datenträger 0    Online          238 GB  1024 KB        *
  Datenträger 1    Online           29 GB  1024 KB

DISKPART> select disk 1

Datenträger 1 ist jetzt der gewählte Datenträger.

DISKPART> list disk

  Datenträger ###  Status         Größe    Frei     Dyn  GPT
  ---------------  -------------  -------  -------  ---  ---
  Datenträger 0    Online          238 GB  1024 KB        *
* Datenträger 1    Online           29 GB  1024 KB


Der Datenträger wurde bereinigt.

DISKPART> create partition primary

Die angegebene Partition wurde erfolgreich erstellt.

DISKPART> active

Die aktuelle Partition wurde als aktiv markiert.

DISKPART> list part

  Partition ###  Typ               Größe    Offset
  -------------  ----------------  -------  -------
  Partition 1    Primär              29 GB  1024 KB


Looks good now. At this point the drive shows up in Windows File Explorer and can be formatted from there.

Friday, 24 January 2020

Testing a Bakeey microSD card

Is the Bakeey Extreme 64GByte any good?

The claims

Hard to see specs
The rough surface makes it hard to identify the markings. But as far as I can see, it claims to have the following characteristics:

  • 64 GByte capacity
  • Class 10
  • UHS: U3
  • Video Class: V30
  • Class A1
  • UHS1 (Bus Logo: I)
The question is: What does it all mean, and can I test that?

I bought the set (card/adapter/reader (usb-c / usb-a) here from Banggood.

I use h2testw to test the capacity and read/write speed. So from the results, I can see:
  • It really has the 64GBytes, so no fake that overwrites itself: OK
  • Class 10: I get a 13,4MByte/s write speed, so it meets the class 10 specs: OK
  • U3: With the supplied USB adapter, I could not get anywhere near 30MByte/s write speed. So for the moment the answer is: No!
  • V30: Again not with my adapter: No!
  • Class A1: That's 10MByte/s write speed and a low number of IOPS. So: Very likely OK
  • I logo: With the UHS-1 logo, the bus speed can be 12,5 to 104 MByte/s: Again likely OK
The read-speed I got was 17,4MByte/s with the supplied USB Card reader. Again not fantastic, but ok for a class 10.

EDIT: I re-tested with an USB3 card reader. The results were somewhat better:

  • 18.9MByte/s write rate
  • 31,6MByte/s read rate

I wanted to try 4k video streaming in my Olympus OM-D, but with the Micro-SD to SD adapter, the camera reported a card error. So I have no way to verify the 30MByte/s claim. But I have a compatibility issue with either the card or the adapter and the Olympus camera.
No issues in a Macbook Pro with the same adapter, though. Seems like a real compatibility issue.

Bottom line

For the card and the two adapters, I paid 10 USD. That appears fair for the set, but cards with similar specs are available from Transcend or Kingston in the same price range. An ok deal, but no need to rush. For my camera, I'll stick with a SanDisk Ultra that guarantees 40MByte/s for 4K recording.
All in all nothing to write home about.

Monday, 20 January 2020

Blitzwolf BW-UPC2 Test and Review

BW-UPC2 Blitzwolf UDB Thumb drive

What's special about it?

You probably wouldn't read this if you didn't know that: The BW-UPC2 has both an USB-C and a USB 3.0 A connector.

Cooool... two connectors
So it should be great for me to exchange files between my "old" Surface Laptop 2 and my "new" iPad Pro (3rd gen, 11"). More on that further down the page.
The look&feel is good, but the rotating cover does not (unlike what they claim on their web site) protect the connectors against dust.

At the time of writing, the 128GByte version of the drive was around 25USD and I got it here from my favorite Chinese reseller.

Benchmark test

I used h2testw (from the renowned German computer magazine CT) to benchmark the drive through it's USB A port.
One thing to look for in USB drives is, if they actually have the capacity they report to the PC. h2testw also checks that by filling and verifying the whole drive. This is not a fake-capacity drive.

The Blitzwolf web site claims "up to 150MByte/s" read, and "up to 50MByte/s" write rate. "Up to" seems like something that does not happen in real life.
Still the measured rates are not bad:

Test results
Still not in the same range as a Sandisk extreme, but very acceptable. A lot better than my awful "Intenso Alu Line 32GByte"


  • Write rate: a little under 40MByte/s
  • Read rate: a little over 60MByte/s
Whereas Intenso Alu Line:
  • Write rate: a little under 4MByte/s (= 1/10th of the Blitzwolf)
  • Read rate: a little over 13 MByte/s
All of this was done on the USB A Port of a Surface Laptop 2.

So the Blitzwolf UPC2 is clearly a massive leap ahead for me when it comes to speed. For very short write bursts, it appears to have some kind of cache, because for low data volumes (some MByte), I get over 70MByte/s write- and over 80MByte/s read rates. That is not sustainable, of course.
It does not appear to be the operating system's file cache, as the Intenso drive does not exhibit this behaviour.
(Funny: the 70MByte/s write rate is over the claimed "up to 50Mbyte/s")

Also interesting: The write-performance was very poor on the USB-C port of a new Surface Laptop 3 15" (17MByte/s write / 70MBytes read), while on the USB A port of the same machine, it was 24MByte/s write / 62MByte read). So there appears to be a dependency on the Computer and it's drivers.

iPad pro (3rd gen.) compatibility

The drive comes pre-formatted with an exFAT file system. This is a good thing, as iOS / iPadOS13 currently only supports MSDOS FAT and exFAT (and APFS/MAC OS extended, which is irrelevant for Windows users)

USB-C & iPad pro
The iPad recognizes the drive and shows it in the "Files" app. Both reading and writing works well.


Exactly what I needed. I'll move my stuff over from the dog slow Intenso drive.

Thursday, 2 January 2020

RSA WebAgent: AceInitialize failed

RSA WebAgent Troubles

I had the following problem with my RSA WebAgent:
For secure remote access, I have a linux system, running the RSA WebAgent. After an Upgrade of the RSA ACE server, the web portal only responded with an error

106: The Web server is busy. Please try again later.

There was nothing busy about the web server, of course.
As I have a strong networking background, one of my standard trouble shooting methods is to have a look at the network traffic to see what's going on:

tcpdump -vvv -i eno16777984 port not 22 and not 443
(Your interface will have a different name, of course)

Apart from the usual DNS chatter which I didn't filter explicitly, there was no traffic from or to the machine. Especially not, when running
Which returned a
AceInitialize failed

So the machine was not even trying to play ball :-(

There is not much of a debug function in RSA's command line tools, and a
strace ./acetest
showed that all dependencies were ok.

The solution

Then I set the environment variable to use TCP
export USEUDP_ENV_VAR=false
and got a much better chance of getting a response. (Not 100%, though)
With both the acestatus and the acetest utils running successfully, I still did not fully understand the problem, but could fix it.

1) reconfigure Apache
So I needed to modify the apache config to use TCP, rather than UDP:
In /etc/httpd/conf/httpd.conf (or wherever your apache config lies) add:

2) enable rpcbind
The other thing is, that it now seems to rely on a running rpcbind service, so rpcbind needs to be anabled and started.
To check if that is the case, run:
systemctl list-units --type=service --state=active
and see if you get a
rpcbind.service            loaded active running RPC bind service
in the reply.