Thursday, February 21, 2019

MacBook battery replacement requires calibration

A few years ago I bought a second hand Mid 2010 MacBook Air 11 as a standby machine. It came with a dead battery. A cheap Chinese replacement was purchased via eBay but while the battery life was usable (for reading the news over breakfast) it would warn that it was going to shut down after about two hours. Shown here in activity monitor.

I did what they advised in that I charged it up and then used it until it warned me on the first cycle.

The battery actually reported that it had more than the design capacity and I figured this was a lie.

Figuring I'd bought a low capacity battery pretending to have more mAh than it really did, I ordered a new one from a reputable dealer, iFixit Australia.

While waiting for the new battery to arrive I read up on battery manager calibration and this time did the following:

  • Fully charged the battery over night
  • Ran the laptop with screen and disk never sleeping, also no screen dimming (Energy saver)
  • Left it like that to run until it shut itself down
  • Left it another 5 hours to really go flat
  • Fully charged it over night
Interestingly as it discharged there was a long flat part of the charge graph before it actually turned off.

After this exercise, the battery had much better life, perhaps five or six hours of heavy use.

The new battery turned up and I figured I might as well put it in to see if it's better. Replacing the battery in an old MacBook Air is pretty easy if you have the pentalobe screwdrivers.

Interestingly, it reports less capacity in CoconutBattery and the Chinese import.

I again followed the calibration process outlined above and this time, just for fun, I ran a bash script to record screen shots for a movie.

For my own future reference, create a folder on the Desktop called "ScreenRecord" and run this command line to capture screen shots periodically:

while [ 1 ];do vardate=$(date +%d\-%m\-%Y\_%H.%M.%S); screencapture -t jpg -x ~/Desktop/ScreenRecord/$vardate.jpg; sleep 1; done

To make the folder full of jpeg images into a movie I used ffmpeg:

ffmpeg -r 24 -pattern_type glob -i '*.jpg' out.mp4

(-r is the frame rate).

Measuring real world battery life is not easy as load varies wildly. I think the new battery is slightly better than the old one after calibration, but I wish I had done this earlier and saved my money.

Friday, February 15, 2019

Pi-Star hotspot getting started

The hotspot board I ordered via eBay for AU$60 arrived (I note the price has increased recently). It turns out to be labeled a Jumbo Spot rev 1.6. I already had the Raspberry Pi Zero but the other parts came as shown here.

The metal box is very solid, the board is good quality and the OLED display was already soldered in place. There was some soldering in that the pin headers for attaching to the Pi had to be soldered on to the Pi Zero board.

The Pi-Star software was downloaded from here and copied to the microSD card using Etcher on macOS.

Because I hadn't read enough documentation, I fired it up connected to a monitor and keyboard and attempted to get it on to my Wifi via the command line. (Don't do this).

The right way to get started is to let it boot and after a minute or so it creates a Wifi network called "pi-star-setup". On a computer, join that wifi network and go to http://pi-star.local and you log in with username pi-star and password raspberry to do the configuration via a web interface. Here you can tell it about your wifi network and then let it join. After that, go back to your own network and again visit it via http://pi-star.local.

Jumbo Spot isn't in the radio/modem type popup so I used MMDVM_HS_Hat (DB9MAT & DF2ET) for Pi GPIO and that appears to work.

DMR Master is set to DMR+_IPSC2-AUS-2 with options "TS2_1=505;TS2_2=3802;TS2_3=3803;TS2_4=3804;TS1_1=13;TS1_2=113;TS1_3=123". These settings derived from VK7HSE in the Pi-Star forum. I am seeing traffic and can see myself transmit.

There's a good tutorial on setting up Pi-Star configuration on Amateur Radio Notes here.

All boxed up now and it looks like a solid bit of gear.

I set it to the frequency which was already in a code plug I used in my TYT MD-380. I can see a bit of activity on the web interface.

Range seems excellent, it certainly covers the house without any problems. I'm still figuring this thing out but so far it seems good.

I've had a few brief contacts on talk group 505 slot 2 but often can see that a station is there but not hear them.

Updated firmware to 1.4.14

Following the instructions from I've just updated the Jumbo Spot firmware from v1.3.3 to 1.4.14. So far so good and very easy to update.

Here's a VK4 talking to a VK3. I'm in VK2 via this Jumbo Spot.

There is a page for the IPSC2-AUS-2 network which my hot spot is connected to here.

Tuesday, February 05, 2019

TYT MD-380 DMR getting started in Sydney

The DMR radio I ordered for AU$127 just days ago arrived today. I thought this would be a place to leave notes for myself that might help others as it's pretty mystifying to get started with.

For the price it's a very solid feeling radio. Heavy in the hand (in a good way), with a good keyboard and knobs. It came with the USB programming cable - I didn't know this and ordered one at the same time. The charging dock is solid and the little power adapter came with an Australian plug adapter. Two antennas, a small stubby one and a slightly larger one that the manual says works better. On UHF the full size one is quite compact anyway.

MD-380 doesn't turn on! Turning on the power and nothing. Charged for an hour, still nothing... it turns out that there was a piece of tape between the battery and the radio so I had to remove the battery and peel it off to turn on the radio. All good.

I registered my callsign for a DMR ID at note that you need to upload a copy of your license.

From the recent talk at ARNSW, I learned that I'd need to download a "codeplug" file, edit it to put in my DMR ID number and send it to the radio.

The vk2kvp/md380-codeplug was downloaded as a zip and the file "MD380-90_All_AU_DMR+analog+CB_v15.rdt" was extracted out of that.

A TYT Code Plug Editor was downloaded from and it opened the .rdt file extracted from the vk2kvp zip. I put in my callsign, my DMR ID (5050184) and saved the file. It warns about passwords being set but I checked and they were blank.

Finally, I opened the codeplug (.rdt) file with TyMD380tools and sent it to the radio. Update, I've now realised that the code plug editor can directly send to the radio, very nice.

I know from earlier experiments with an RTL-SDR that I can hear the Sydney repeater VK2RCG so I went in to zones and chose that one.

Initial Observations

  • The colour screen is low resolution and even short callsigns have to scroll to be read.
  • The large icons on screen take up space, I wonder if they can be reduced?
  • My screen backlight stayed on until I changed it in Menu, Utilities, Radio Settings, Backlight.
  • When the backlight is off, the screen is completely unreadable.

Useful links

First contact

After hearing nothing all afternoon and calling on Talk Group 9, which I thought was the local TG, I asked for help in the Facebook group. It turns out that the Sydney repeater is off the internet. Les suggested Talk Group 505 Slot 2. I called and got a reply from VK2RF who said I was showing up as unknown ID.

I guess that because my ID is new it hasn't been added by other users yet.

Audio sounded good and I'm now thinking that a hotspot might be the way to go as the only repeater I can hear is off line.

The Facebook group is a great source of info. The reason why I wasn't hearing much is that pretty much all the local repeaters are currently down and the one I can hear is off the internet.

My thanks to Glenn, Les, Pete, Bruce, Bevan and Denis for their help.

Ordered a hot spot

I've ordered an MMDVM Hotspot for AU$60 (I have a spare raspberry Pi already). This seems like the way to go as all the local repeaters are currently down of off the internet. It will take a few weeks to come from China and I'll report the experience here.

The OpenSPOT2 looks tempting but I quite enjoy Linux tinkering and the Pi-Star software for the MMDVM hotspots is being actively updated and looks amazing.

Talked with Les VK4TB

I successfully sent Les a text message via TG505 and then he suggested we have a talk on TG3809 Slot 1. This wasn't in my code plug so I've added it (I got the name wrong saying QLD) but anyhow we were able to talk between Sydney and Brisbane quite well as you'll see here.

I have now flashed the firmware to the "enhanced" version. I was unable to do this under windows as the program just crashed each time I hit flash.

Mine had Firmware version D014.004 and CP Vers V01.37. This seems pretty recent but it looks like updates are available from TYT. Including "MD-380_390 FOR USA" dated 2019-01-07. I have not tried this.

Flashing the firmware worked smoothly on Ubuntu Linux following the excellent instructions from the author Travis Goodspeed here.

The new firmware has a number or worthwhile enhancements including showing the name and info about the person talking:

When no one is talking, you can configure to see lots of useful info including the time slot and talk group (without having to wait for it to scroll into view) and down below is the last call heard.

Nice code plug editor for Linux - editcp

There's a great code plug editor for Linux called editcp by Dale Farnsworth. The binary installed as advertised on Ubuntu and works well.

The UI, built with qt, is superior to the Windows program I've been using as you can drag to re-order items in the lists. One slightly concerning thing is the warnings about fields with illegal values that I get each time I save or go to send to the radio.

Despite this warning all seems well and I've grabbed the code plug (terrible name for settings) from the radio, edited various things, and sent back to the radio where all works nicely.

Tuesday, January 29, 2019

RTL-SDR for spectrum analysis

Since getting back in to RTL-SDR for my recent foray into decoding DMR, I found that these are a very useful (and low cost) bit of gear.

At the last ham radio meeting at Dural, I bought a Shure radio microphone and when I got home I wanted to find out what frequency it was on. Cranking the knob on a receiver was taking forever so I decided to look into scanning broadly with RTL-SDR.

There is a bundled tool called rtl_power which seems perfect for this but it creates a CSV file that's a bit annoying to look at or graph. Now I've stumbled upon RTLSDR-scanner.

RTLSDR-scanner is a python module which you run from the command line. You give it a low and high frequency and it quickly scans and displays a nice graph which can also be exported and looks like this:

(Click images to enlarge by the way). RTL-SDRs don't have much dynamic range so I don't really think this would be good for real spectrum analysis tasks, like finding spurious emissions from transmitters, but for finding the output of a mystery radio mic (622MHz by the way) it was perfect.


There is some great software around for driving RTL-SDR and other SDRs. One that looks terrific is Spektrum but I can't get it working on my Ubuntu or Windows machines here.

Mac Malware - do not update flash

Two good friends have recently had their Apple macOS machines infected with annoying malware and I'm pretty sure the vector was downloading and installing (with authentication) fake updates to Adobe Flash.

I saw this amazing display recently, all on one page.

Use of Flash is almost zero these days and if you really need it I suggest running the Chrome browser which has it built-in.

If you think you have malware on your computer, I can recommend ClamAV which is open source and free. Friend Gerald said that ClamAV didn't find everything though "So it looks like ComboCleaner finds threats that ClamAV does not. Although CC won't delete them, but uses the fear to promote subscription."

He's technical so once he had a name of something found by ComboCleaner he used find / -name XXX to find the path to each suspect file and then deleted them manually.

Having said all that, I don't run a virus checker on my Macs and haven't had trouble, but that's partly because I'm very skeptical of things I install from the internet.

Saturday, January 26, 2019

ARNSW Home Brew Group - DMR here too

Today we had a meeting of the home brew group out at ARNSW in Dural. The first surprise (to me) was the wonderful new tower that has been erected on the site. I'm told that the antenna for the UHF DMR repeater will be right up the top when it's ready.

The other surprise was a large number of valve radios have appeared in the sale items. Apparently this is just the tip of the iceberg and a large collection has become available. I wondered if this was from Jack in near by Castlecrag but apparently that's not the case. I guess the generation who have collected these lovely old mantle receivers has had a touch of KonMarie and aren't seeing enough joy to hang on to them.

Peter, VK2EMU, is building a valve power amplifier and along the way he's taken a diversion and built a beautiful valve tester in a wooden box. The front panel is marked with, I assume, a soldering iron. There's a little door at the back where you pull out the anode lead and inside there is storage for other valve sockets.

A clever part of the design, which I believe is from Drew Diamond, is that the anode is at zero volts and the cathode -600V or so. This means that you don't get killed if you touch the top of the valve.

Peter's diversion reminds me of Donald Knuth's diversion into typesetting while writing the art of computer software. The valve PA is coming along though.

Speaking of valves, here's just some of the valve radios on sale, typically for about $20 each.

Finally we came to the main presentation by Paul VK2GX with an introduction to the DMR radio system. A terrific talk.

When Paul finished I demonstrated decoding DMR off air using an RTL-SDR and the DSD+ software which I wrote about here recently.

Keen to learn more about this I've gone ahead and ordered a TYT MD-380 Transceiver for AU$127 and will report back when it arrives in a few weeks. The low price of DMR gear I think may spell the death of alternative commercial digital radio standards like D-STAR.

Friday, January 25, 2019

Listening to DMR without a DMR radio

It's not too hard to listen in to DMR digital radio traffic with just a low cost RTL-SDR dongle and some software.

I can pick up the Sydney repeater on 439.5MHz pretty well, even with a non-resonant antenna. There's a good list of frequencies in Australia on VK DMR Info site.

(Click to enlarge the screen shot).

Here, on Windows 10, I'm using SDRSharp piping audio over to DSD+. I followed the instructions found via the RTL-SDR page but in summary, you need VB-Cable to route audio out of SDRSharp over to the DSD+ program.

Demodulation is set to NFM but the bandwidth is wound out to 12kHz. I turned squelch off and also turning off "Filer Audio" made it work much better. Adjusting the audio output level in SDRSharp is also important for good decode.

Here's how it sounds:

At the home brew group meeting on Sunday I understand there's a talk on DMR so I'll be interested to learn more.

Tuesday, January 15, 2019

Nice WSPR Watch review from a fine blog

My thanks to Bas over at the excellent PE4BAS ham radio weblog for his kind review of the recent updates to WSPR watch.

He seems surprised that there are free apps in the iOS app store but the reason, in this case, is that I wrote the app for my own use as I find the site isn't really mobile friendly and I like being able to quickly do a search to see how my station is performing.

Bas missed my favourite of the new features which is multi band handling with colour coding. It all looks very pretty.

If you use WSPR watch and haven't already, please leave a review as it helps other people find the app and also makes me feel happy. I'm also open to suggestions for new features but no guarantees on when I'll get to them.

There are a number of sites that scrape and add value in different ways: is a great service although it is sometimes very slow or even unresponsive. I'm sure all of us who scrape data from there wish there was an API we could use.


Spurred on by this attention, there have been some updates to WSPR Watch. You can now search the spots for a given callsign (or part) and the traces on the map fade over time.

Saturday, January 05, 2019

Vanlife van interiors - we can learn from the experts - Gypsies

While re-modelling the interior of my tiny camper van I've become fascinated by the interior designs people come up with for these compact living spaces. Recently I struck gold by searching for "Gypsy caravan interior" images.

While clearly designed for cold climate, it's fascinating to look through these.

Check out Low-Tech Magazine

I've just stumbled across a real gem called Low-Tech Magazine. It's a rich collection of stories that provide evidence, if we need it, that sometimes the old ways of doing things are superior to our modern, high technology and high energy use, ways.

They talk about how we used to keep warm at home with a combination of warm clothes and radiant heat - rather than heating the air of the whole house and how ceiling fans are a much better idea than central air-conditioning.

There are interesting pieces about energy storage options including compressed air, as shown above, and insightful comments about how the internet has got faster but web sites have gotten slower.

There's even a solar powered version of the site, which may not be online if the sun isn't shining.