Still here!

It’s been a good twelve months since I posted anything and not surprisingly some of you have wondered if I’m still in the game or even still alive!

Thank you to those of you who have dropped me an email via the contact page asking for advice or just saying thank you for the blog posts I’ve made. It’s genuinely appreciated that my missives are of use to you in whatever shape or form.

Yup, I’m still here folks just massively busy having moved house as I’m contending with the inevitable string of “issues” that comes with new home ownership. When I say new, I’m talking a 1950’s pile which is made of materials that happily blunt your drill bits after drilling no more than 6 holes in the walls, not this modern plasterboard stuff!  Scale that up to the number of shelves in the man cave/shack along with the rest of the place and quite rapidly I’m wishing I had shares in a tungsten carbide tip drill bit making factory!

I’m tantalisingly close to being able to set my rig up again but at the minute there are still a few major house projects underway that have got to take priority and are consuming all my available time and resources.

That said I’m not resting on my laurels and there are still a few fun mini-projects underway as a distraction while I wait for concrete to dry (literally!)

One minor addition to my equipment/toy stash is one of these

Yep the Prusa i3 Mk3 3D printer. A very useful and fun device it is too especially if you buy it in kit form (as I did) and build it yourself! Alright, I will admit to having fallen into the trap of having printed a few completely useless things just for fun

but having a bit of fun never killed anyone did it? Meet my cynical squid, his face says it all!

When it comes to slightly more productive matters it’s very useful to be able to custom print plastics as one of my biggest bugbears is finding a suitable enclosure for a project. As much as I love metalworking and being creative, to be able to produce a bespoke professionally finished item just gives things that polished feel.

Case in point –

This is a rack mount fixing for a Raspberry Pi so it can sit in my rack that contains my servers, router, switch etc.

The problem is in my new residence the equipment rack is in the loft. Perfect dead space to place equipment. It’s dry, clean, dust free (as I boarded the whole lot out) and secure plus the cable infrastructure to the house is easy to accommodate by dropping Cat6 cable down inside pre-existing conduits that carry other services where the house has been rewired and the central heating reworked by the previous owner.

The only snag is there’s no airflow in that loft space which has required a man in the know to come and have a look, suck his teeth and agree that there needs to be air movement in there or you open up a can of veritable baked worms! Add to that, if it’s massively hot IT equipment can start getting upset. The solution has been the installation of venting roof tiles towards the ridge line and down towards the soffits. Convection then does it’s thing, with the hot air escaping at the ridge, cooler air being drawn it at the soffit level, we have airflow and the condensation and potential damp issues are then removed.

The rub is a loft can still get hot and with the summer doing it’s thing, it’s proving the point nicely. My concern is overheating kit in the rack leading to device failure, data loss, expense and tears! The solution to this is to have the Raspberry Pi sat in the rack with a small RTC (real time clock) module sat on the GPIO header. Along with the RTC that module has a sensor on board which can accurately sense the ambient temperature. When the temperature rises to a risk level, a warning email is sent to make me aware plus the plan is that this tiny PC also sends a graceful shutdown command to the machines in the rack causing them to power down nicely. I’d rather be without them but knowing they are safe rather than frying them!

As such you can’t put the Raspberry Pi in a box otherwise you’re not sensing the correct temperature, it needs to be open to the elements, hence the 3D printed rack mount tray or skid in bright orange.

Total print time about an hour and cost in PLA is pence! OK the capital cost investment in the printer could be argued as a major negative but the uses I’ve found for it so far (including printing replacement plastic parts for my car!) have far outweighed that in my opinion. There are a few modifications and upgrades awaiting the Prusa which will be for the winter months but in the meantime I’ve got a fence to finish building while the sun is shining!

Something new for the weekend Sir?

“Frustrated, sleepless nights, nervous tense moments? Plagued by permanent upgrades? You’re running a Microsoft Operating System!”

Yep, it comes to us all at some point but how many of us actually do anything about it?

In an attempt to inject something a little lighter into a Sunday afternoon and to motivate our sponsor to give something new a whirl, here we go.

By default there are countless millions of PC’s on the planet running some permutation of Microsoft’s operating system and as a result they get to make a lot of the rules, which unfortunately aren’t always in the best interest of the end user.

For the average Joe being able to turn on a computer and it work with all the familiar things being in the familiar places is all they want, but like everything that comes with a cost. People are up in arms at the thought of governments collecting personal information of the masses to keep us safe, but has anyone ever questioned multinational corporations doing exactly the same thing? Why should your computer usage statistics, browsing data, contact data, personal photos and geolocation data be sent back to corporations servers as part of the default setting? To improve the end user experience possibly but more honestly to bombard you with targeted marketing. There are possibly other slightly darker uses for your data and if it’s not for keeping you safe in your bed at night perhaps people ought to be a bit more savvy!

That aside I’m getting more and more hacked off with how the new iterations of Windows look to keep the user safe from the inner workings.

In the dim and distant past when you sat a computer you were greeted with a black screen and a prompt C:\

If you didn’t have a serious beard, glasses and the brain the size of a planet this was typically where your involvement with all things computing ceased. As things evolved nice graphical front ends appeared buffering the user from the nasty code which lurked beneath, but for those wishing to tweak and enhance what their computer is doing this move to a corporate computing front end can act as a real barrier, especially if your knowledge is above that of the average user but below that of a serious coder! There aren’t enough hours in the day to research how to get around Microsoft’s new baby, cock it up, go back to scratch and then get it right. Don’t get me wrong, that’s how you learn but there comes a point where until you have all the free time in the world you need a Plan B.

For a long time I’ve been a fan of the other computing options out there but have never made the leap of faith to the other side.

Now the plan here is an alternative desktop PC free from the constraints of Microsoft.

If we’re talking money Mac is the way to go. Here we have the Mac Mini.

Mac_mini_mid2010_back

Now what isn’t there to like about that? Exactly, but unfortunately these things hold their value. Usability gets a big thumbs up. Everyone can use an iPhone or iPad and these things give you that safety blanket element along with the ability to get at the inner workings of the Unix based operating system to tweak and adjust packages to suit.

We are going to end up with a Linux beast to replace the Microsoft ball and chain so how do we do this cheaper?

intel-nuc-core-i5-nuc5i5ryk-mini-pc-review-ram-1500x1000

The Intel NUC has been a consideration on previous occasions for other projects and they are really neat but they are barebone systems which require RAM and an SSD to get you up and running making them quite expensive little toys. There are other manufacturers out there such as Gigabyte BRIX, Zotac ZBOX and Asus Vivo but unfortunately the manufacturers have tended to tack their colours to the Microsoft mast and to a degree there are warnings of “There be dragons!” if you venture off piste with your operating system.

Enter the the Acer Revo

71iS5RSamQL._SL1500_

I must admit to having three of these things dotted around the house already. Two are dedicated media centre boxes sat beneath TV’s and one is a server. They’re small, self contained and an absolute steal on eBay second hand.

Here’s my new desktop PC in the flesh

20160417_093314

And to put things into perspective, my Windows PC is sat beneath the desk on the floor!

20160417_154153

Now I can hear people say it hasn’t got a CD drive. So what? There’s a large move away from tangible media and if you really need one plug an external drive in.

It comes with all your usual connections, media card slot, HDMI connectors so you plug it straight into a telly, USB 3 and USB 2 ports, 4GB of memory and a 500GB hard disk.

Some what bizarrely the unit originally shipped with FreeDOS as its operating system but the seller on this one had done me a favour and had pre installed what I was already after, Ubuntu.

Now I’ve courted Ubuntu on and off over the years and have had dedicated laptop drives installed with the OS which I’ve had to physically swap out when I’ve wanted to play, dual boot systems, you name it. Enough of that shash, this is a pure bred Ubuntu machine.

But it’s different to Windows I hear you cry! Yes it is only as much that the graphical front end looks a little different. So have all the versions of Windows that have existed.

Screenshot from 2016-04-17 16:17:16

Here’s a screenshot of my current desktop. The launch bar / dock is on the left. You can change that. Look down the launch bar. Oh yes! Firefox, Chrome, Thunderbird, Open Office, VLC, Dropbox

Sound familiar? Where do you think these oh so familiar packages on your Windows machine originated from?

Ah but if doesn’t run Microsoft Office or Photoshop. “Au contraire Blackadder!” I put it to you that Open Office and Gimp do it far better than a product on a Microsoft machine and for the grand total of nil of your hard earned pounds. Equally, did I mention that Ubuntu is free, where as Microsoft want to take you far well over £100 for a home copy of their OS’s.

Think about what you do with a computer. You shop online, you read your email, you write letters, you run spreadsheets and you interact more and more with online services which are OS independent as they are being delivered to you without a need for a prescriptive architecture to use them.

As such, does it matter what you do that on?

For me, playing radio there is a whole host of amateur radio tools lurking around in the Ubuntu package ether. My main weapon of choice for digital mode work, Fldigi also originated here.

With the current chaos and carnage my server failure is descending into, it’s useful to have a machine that is running the same OS in front of me to test bed various packages and options before I go anywhere near my server with them.

Am I happy? Yep

Will I be staying here for a while? Yep

Will I ditch my Windows machine for good? Nope, I have to admit there are some things you may still need a Windows machine for in the short term.

It’s just nice to have options! Have a think.

 

Beware snake oil salesmen!

I’m sure over the years James Cameron has made billions from his highly successful Terminator series of films and as I’ve sat there enjoying the robotic acting of the Governor of California, the plot line has evolved with the advancement of technology. If you’ve seen the latest installment, Terminator Genysis, the idea of self aware AI networks is matched very well to the current advancements in technology and social circumstances to the point that with a little bit of latitude you could start thinking “Hmm!” Lets face it self piloting vehicles are here. The UK is opening its roads to tests of driverless vehicles!

The only thing where the script writers have really got it wrong is with all this shash about having to defeat Skynet by sending naked muscle bound gladiators back through time to prevent the death of the hero’s mother in a form of retroactive abortion. The more realistic script would involve a team of commandos breaking into a computer facility, inserting a USB thumb drive in a free port, double clicking on the .exe file and then saying OK to “Do you wish to Upgrade to Windows 10?”

Oh yes! That’s guaranteed to ruin your day!

Cautionary tale to anyone out there with older tech which is being bombarded by the hard sale bubble in the taskbar saying “Your free copy of Windows 10 is available”

Just because that little Microsoft Snake Oil Salesman says you can have a copy of Windows 10 for nothing, doesn’t mean to say it will actually work!

Case in point, my netbook Terminator equivalent, the Panasonic TOUGHBOOK. I’ve been plagued by that damn bubble for months and have been ignoring it until the other day when I foolishly accepted the offer of the opportunity to destroy a perfectly functioning machine! TOUGBOOK CF-19’s are as hard as nails and do what they do very well within the confines of Windows 7 x64 and that’s where their rule of iron ceases. There are a lot of drivers required for the embedded hardware and without them you’re left with only half a machine. There are no Windows 10 drivers out there as it’s old tech so no one is backporting.

All that brief flirtation with that dialogue box has achieved is an awful lot of time wasting trying to undo my stupidity, which has now left me with a machine at the point of having cloned the hard drive across to the new SSD I installed shortly after purchase. Back ups or no back ups it’s been painful.

In summary “Your free copy of Windows 10 is available” translates to, your copy of Windows 10 is here but if you want it, buy a new a new machine and then pay the additional £100 plus for a copy! Beware!

mdadm RAID5 array under Ubuntu – I’m positive technology conspires against you!

I’m sure things are programmed to know when you’re skint so their failure causes you even more grief than it should!

And on that encouraging note my server which has disks in a RAID 5 configuration decided to send me an email at 10pm last night to let me know one of the disks had failed!

RAID 5 gives you a degree of protection from failure by providing redundancy but with this being the second disk in that machine to die in the last 5 months there was no time for hanging around in case another pegged out! RAID 5 allows for one disk death, two is game over!

The below resources are useful guides on how to get things back working again.

Replacing a failed disk in a mdadm raid

Replacing a failing disk on a Linux Software RAID 5

HOWTO Replace a failing disk on Linux Software RAID-5 – Consultancy.EdVoncken – pdf copy of web page as above link is currently down

However, a week on and all of a sudden I was getting a FailSpare event error email from the server and the disk was being auto removed from the array. This was a James May moment (“Oh Cock!”) until it turned out to be my brand new Western Digital Red Drive which was throwing up the error! The James May moment escalated to a new level! That’s a real cause for concern.

After a considerable amount of internet reading  I installed smartmontools and ran some tests on the disks in the RAID array (over a SSH session through a VPN over 3G!) Not a single error!

A bit more reading offered a solution without real explanation as to what a FailSpare error was. The following forum is worth a read along with this one.

The solution to removing the error is basically to mark the disk as failed, remove the failed disk from the array, add it back and set it off rebuilding again.

# mdadm –manage /dev/md0 -f /dev/sdc
( make sure it has failed )
# mdadm –manage /dev/md0 -r /dev/sdc
( remove from the array )
# mdadm –manage /dev/md0 -a /dev/sdc
( add the device back to the array )
# mdadm –detail /dev/md0
( verify there are no faults and the array knows about the spare )

OK we have a solution but why has a perfectly good, brand spanking new disk done this? One suggestion is SATA cables. Those in the know have had perfectly good disks report errors when there’s nothing wrong with them, only to discover that a substandard cable is the root cause. Now you could argue why that cause is exhibiting symptoms now rather than x years ago when the machine was first built, but in the absence of any other solutions sourcing a few brand new cables or reputable origin and swapping them out seems a good idea.

There is also the possibility that my failed 3TB disk of last week has nothing wrong with it. Plugging it into a SATA port on a motherboard and having a look what smartmontools has to say about it under an Ubuntu Live disk may be an interesting few hours work.

In the meantime I’m trying to get smartmontools to run as a daemon and carry out some meaningful tests on the disks on a regular basis to give me some advanced warning of problems.

Right, almost two weeks on and it’s not a happy story. In short I’ve lost all the data on the RAID array and had to replace assorted pieces of hardware and start from scratch. The data loss is an annoyance rather than a “throwing yourself from a bridge” situation, but the amount of time and effort (thank you Mat for your help) that has gone into this is a major pisser.

I will gloss over the majority of this but it’s worth making some key notes as there are useful tools and tactics out there should anyone else suffer a similar problem. I’m sure at some point in my life I’ll find myself here again and having something to refer to is going to be a help!

The RAID failure was caused by a failing disk throwing up bad blocks PLUS a duff SATA cable and/or controller card. RAID5 will tolerate a disk failure, but it looks like the failing cable on a second drive caused it to believe two disks were failing. As such I was never getting out of that situation in one piece.

The method of attempted repair went like this –

stop the array ASAP –

sudo mdadm --stop /dev/md0

use smartmontools to carry out long tests on all disks in the machine

sudo smartctl -t long /dev/sda

this takes a long time on 3TB disks but it tells you everything you need to know!

View the necessary reports

sudo smartctl -l selftest /dev/sda

Now the rub came when only one disk was reporting errors in that diagnostic report, because in theory the other three are intact and the data stripe is across all of them allowing the replacement of one and the subsequent rebuilding of the dataset.

As such the anticipated next step is to restart the array, forcing mdadm to use the pre-existing disks with their data, but ignoring the crazy spare fail flags and the like as there is only one faulty  disk and we can swap that out once the array rebuilds.

So the way to do this is

mdadm --create /dev/md0 --level=5 --raid-devices=4 --chunk=64 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 --assume-clean

having a read of http://www.linuxquestions.org/questions/linux-server-73/mdadm-re-added-disk-treated-as-spare-750739/ gives an explanation as to the root of this command.

The –assume-clean throws caution to the wind and creates the array regardless of the disk states.

Right the next trick is to run fsck on the filesystem to correct any bad blocks which we know we’ve got because smartmontools has told us so as a result of the long scan tests.

Now I’m not convinced that this didn’t add to the problems. If the RAID array is rebuilding, running something like fsck which is going to start moving blocks around, to me, seems like a good way to confuse the hell out of things but research prior to hitting Enter said otherwise.

sudo fsck.ext4 -y -s /dev/md0

the -y switch saves having to answer every question fsck throws up and -s is similar to the –assume-clean used in mdadm

Problems started when fsck started running out of memory running it’s check which seemed very very odd!

A lot of reading later and this isn’t an uncommon problem which people have resolved by creating swapfiles to expand the machine’s memory to cope.

dd if= /dev/zero of= /swapfile1 bs=1024 count=12582912
mkswap /swapfile1
swapon /swapfile1

The above creates a 12GB swapfile called swapfile1 which gives you an extra 12GB of memory.

Internet posts suggest 1GB of memory and/or swapfile per Terabyte of disk you’re trying to fix, however in the middle of the night fsck crashed out again complaining about insufficient memory. Fsck is not a quick process, especially on a 12TB array!

You can add as many swapfiles as you want to expand the physical memory of your machine in line with the capacity of the disk containing that file. The snag is fsck runs slower, but if you want your data back it’s got to be worth a shot. That however, was a shot in the dark! With almost 64GB of virtual memory from 4 swapfiles, fsck still didn’t want to play and during its runs more and more bad blocks were being reported.

There comes a point where the return on investment question is asked. If I’ve got so many bad blocks in this data set, how usable will it be? How do I know which files are corrupt until I try and access them? Will I be able to replace that data in x years time when I discover a corrupted file?

Tough questions with only one solution. Start again from scratch. So, with a certain degree of reluctance, after an awful lot of effort, it was back to square one.

I decided to wipe the entire server and install Ubuntu 16.04 LTS beta (full release due imminently) and set my disks in a RAID5 array using ZFS. ZFS is now implemented as standard in 16.04 which is a bonus! The duff disk was replaced with a brand new 3TB drive and we’re ready to go.

ZFS is set to perform a weekly scrub and smartmontools does it’s thing on a weekly basis checking every single disk and reporting back.

The learning points from this are that nothing is infallible, regardless of the level of redundancy a RAID array offers. If it’s valuable back it up regularly on a removable media format and lock it in a fire safe ready for Judgement Day!

I’m more pissed off with the fact I haven’t progressed my 1Watter build or managed to do anything else for the last 2 weeks!

Don’t ask me to pick your winning Lotto numbers!

Resources

https://help.ubuntu.com/community/Smartmontools

https://help.ubuntu.com/community/Installation/SoftwareRAID

http://www.linuxquestions.org/questions/linux-server-73/mdadm-re-added-disk-treated-as-spare-750739/

https://raid.wiki.kernel.org/index.php/RAID_setup

https://raid.wiki.kernel.org/index.php/RAID_Recovery

Replacing a failed disk in a mdadm RAID

How to build an Atomic Clock

OK there’s a degree of licence in the title here, but unlike the “Daily Toilet Paper” which came up with headlines such as “Freddie Star Ate My Hamster” to increase it’s circulation, there’s more truth in my tag line than meets the eye.

You’re here now so read on!

As a kid I grew up in the era of having only three TV channels which switched off at midnight after the ceremonial playing of the National Anthem. As such there was a lot more radio in the house than there is today and I was always intrigued by “The Pips” which chimed out on Radio 4 at the top of the hour. I can see some people saying “You what?”

Yep those are “The Pips” also more formally known as the Greenwich Time Signal. As a nipper they always seemed a bit of fun just before the boring news, but when my Dad told me that they were generated by a very precise clock called an Atomic Clock . . . Wow! All sorts of mad scientist James Bond evil villain lair images sprung to mind. Now as you get older those images fade (slightly) as you become more educated and grown up, but the words atomic clock still conjure up images of machines the size of the CERN super collider. Now undoubtedly at one stage of their development they were and you could ask the question what use are they and what relevance is all this to radio as a sport?

Well firstly an atomic clock uses the “oscillation frequency” of particles (the rate at which they move up and down) to provide a very accurate time. That’s a bit simplistic but have a look at Wikipedia’s entry about Atomic Clocks for a more accurate explanation.

WSPR relies on a very accurate clock to sync the transmission and reception of WSPR signals.

Hence, accurate clock = a whole world of other radio related projects!

My WSPR receiver (see earlier posts) used a PC running Meinberg NTP to decode WSPR signals. My Ultimate 3 beacon uses a GPS signal to synchronise the clock within for transmission.

My plans next year are to have a crack at some other SDR projects based around new kit on the market and as part of the background reading ahead of parting with any money I discovered that one of these devices allowed for attachment of a 10Mhz external clock reference. A few months earlier, Everyday Practical Electronics (EPE) ran a constructional project around building, wait for it, an atomic clock or more accurately a rubidium standard. I can see peoples eyes glazing here but bear with me.

All a rubidium standard does, is provide a very accurate signal pulse, in the case of the EPE project it was a 10Mhz signal which could be used as a reference source for calibrating or testing things on a work bench.

I had visions of this costing thousands and requiring a degree in atomic physics to complete. Erm no, about £125 quid and the ability to solder half a dozen wires!

$(KGrHqV,!icE8V7Bpn1PBP(BziLqIw--60_12

That my friends, is a rubidium standard. It’s about the size of a paperback book and thanks to our friends in China and the ex Soviet block there are loads of these things sloshing about on the internet. I’m sure they may well have been lurking in a bunker along with other things which would make you glow in the dark in less friendlier times, but in these days of world peace and consumerism they’re being flogged off left right and Chelsea! All you need to do is give it power and you’re off.

Now as tempting as it was to build one, I haven’t. What I have built is the next best thing, which is a precursor to other projects and is a proof of concept. It also has a host of practical applications.

What I’ve built is a GPSDO based NTP server. Again I here a “You what?” A GPS (Global Positioning System) Defined Oscillator based Network Time Protocol server.

Breaking it down further the GPS satellites orbiting the earth transmit a time signal which your satnav sat on the dashboard of your car receives, does some maths with the data inside that signal and works out where you are. That time signal is highly accurate, lets face it the US military have been using it to help bomb countries back to the stone age for decades so it must be good!

An NTP server provides computers with an accurate time reference. Have a look at Wikipedia for a proper introduction and explanation.

NTP helps keep things on track. Lets face it, without it your PC’s clock will drift significantly. If you have a rummage around in the clock settings within Windows you’ll see that Mr Gates wants your computer to use the good old Microsoft time servers by default.

ntp-setup-H1

Now that is all well and good and for the majority of people will do the job nicely, but like everything there are limitations.

NTP services are hierarchical in nature and the various levels are referred to as Stratum

350px-Network_Time_Protocol_servers_and_clients.svg

Stratum 0 -These are high-precision timekeeping devices such as atomic (caesium or rubidium) clocks, GPS clocks or other radio clocks. They generate a very accurate pulse per second signal that triggers an interrupt and timestamp on a connected computer. Stratum 0 devices are also known as reference clocks.

Stratum 1 – These are computers whose system clocks are synchronized to within a few microseconds of their attached stratum 0 devices. Stratum 1 servers may peer with other stratum 1 servers for sanity checking and backup. They are also referred to as primary time servers

Stratum 2 – These are computers that are synchronized over a network to stratum 1 servers. Often a stratum 2 computer will query several stratum 1 servers. Stratum 2 computers may also peer with other stratum 2 computers to provide more stable and robust time for all devices in the peer group.

Stratum 3 – These are computers that are synchronized to stratum 2 servers. They employ exactly the same algorithms for peering and data sampling as stratum 2, and can themselves act as servers for stratum 4 computers, and so on.

Network speed, latency, network outage and so forth will reduce how “Average Joe” at the bottom of the pile receives their NTP source. By having a Stratum 1 computer within your network you are self reliant!

So, how many thousands of pounds does this cost I here you ask? Less than £50!

The ingredients for this little project are a Raspberry Pi (B+ in my case), a Raspberry Pi B+ GPS Expansion Board and an antenna.

20151216_094931

Plumb it all together and you get

20151216_100801

Apart from it looking pretty cool it does exactly what you want very well. The GPS Expansion Board is based on a Ublox MAX-M8Q positioning module and is pretty damn accurate! Admittedly it’s a motion based unit rather than a timing module but by issuing it with a serial command, it can be placed in “Stationary” dynamic mode which is the default mode for the much more expensive timing modules. I haven’t sussed that yet but all in good time!

The AVA High Altitude Balloon Project site has a very good How To which is what this project is based upon.

Also worth a read is the satsignal.eu Raspberry Pi Quickstart and the Raspberry Pi NTP guide.

Now unfortunately there’s a cautionary tale linked to this “How To”. All the bits turned up by Monday and on Tuesday I had a spare hour before going to work and decided to get it all working. The AVA walk through worked perfectly and I had the server generating a more and more stable time signal as it settled down after finalising things. Originally I had used a network cable to speed things up rather than using WiFi. The final step was to configure the on board WiFi to give it a fixed IP address and off you go.

Having played with Raspberry Pi’s before, the WiFi networking can be a real pain and not very stable but I bit on the bullet, started the GUI and began entering SSID’s and network passwords. At this point the GUI crashed quite spectacularly, locking up the machine. Having corrupted the SD card on a previous occasion by yanking the power cable I was reluctant to undo the last hours work, so while still being able to PuTTY into the Pi I rebooted it, only to find the damn thing had corrupted the SD card. Awesome!

Not wishing to be too defeatist, knowing it worked in principle I left it alone until Friday when I had a spare hour again to start from scratch. Until that hour turned into half a day! For some strange reason the device kept corrupting, refusing to boot and powering off the on board NIC so you couldn’t get into it via SSH or by being plugged into a monitor with a keyboard!

Now this caused a considerable amount of head scratching and effing and jeffing! Setting up a Raspberry Pi is simple but not the quickest of processes. At one stage I had two machines burning Wheezy and Jessie images to SD cards in a little production line ready for when I trashed the next one!

Both the AVA guide and Satsignal.eu guide have the following primary steps which get the Raspberry Pi ready for installation of the packages which actually do the clever stuff –

sudo raspi-config
1. Expand Filesystem
2. Advanced Options -> Disable Serial Shell (optional)
Reboot

sudo apt-get update            – tells the Pi to update its list of available packages
sudo apt-get dist-upgrade – updates the Pi’s distribution to the latest version
sudo rpi-update                    – updates the Pi’s firmware to the latest version
sudo reboot                            – reboots the Pi ready for the next stage and allows the updates to finalise and so forth

sudo apt-get install pps-tools – first step of installing all the necessary bits and pieces to get the GPS side of things working

Now by process of elimination (and this wasn’t quick!) I found the Pi was dying after pps-tools was installed, which was far from helpful.

The only conclusion I could make is that between Tuesday lunchtime and Friday morning a package in the distribution upgrade or the firmware update had been altered/upgraded and released to the world, which was killing the Pi once pps-tools was installed.

Proof of concept comes in that if you omit the steps

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update
sudo reboot

everything works perfectly!

Now how do you prove it’s working? Good question. Once the NTP server is running, issuing an ntpq -p command gives you data

Screenshot 2015-12-20 16.42.04

  • The display is a list of remote servers with various status reports arranged in columns.
  • One remote server should have an asterisk (*) in the first column.  This marks the server which NTP has selected as the current preferred source.
  • Servers which have a plus sign (+) are good enough for NTP to sync to, others are not.
  • The reach column should not be 0, and will expand from 1 during the normal working of NTP until it reaches 377.  It is an octal display of a bit-mask showing when the server was reached.  Normally you expect to see 377 in this column against each server.  A column of all zeros means that NTP can’t contact any servers.
  • The offset shows how far your PC is off from a nominal UTC, and the value is in milliseconds.
  • The poll value should gradually increase from 64 seconds to 1024 seconds as NTP needs to contact the server less and less frequently as the clock offset and frequency are gradually corrected.  Changing the poll is automatic in NTP.
  • The delay shows the time for a packet from your PC to reach the remote server and vice versa.  Values above 150ms may indicate a satellite circuit and it’s best to avoid such servers if possible.  You will get best performance from servers which are close to you on the network.
  • The jitter column shows how stable the connection between you and the remote server is.
  • The st column shows the stratum of the server, with stratum 1 servers having a local reference such as an atomic clock or, for many servers, a radio-clock or GPS receiver reference.  Most servers you will see are at stratum 2, so they are locked to a stratum-1 server.  A lightly loaded stratum-2 server is probably a better reference than a heavily loaded stratum-1 server such as those with widely-publicised addresses.

Now that the server is working and providing good stable timings it’d be a shame not to share it! This can be done in a multitude of ways. You can add the IP address of your NTP server to you hosts file within Windows as a TIMESERVER, so when you go to your time and date settings it’s there as an option to select.

Alternatively, if you use Meinberg NTP, by adding the NTP server to the ntp.conf file your local machine then has a Stratum 1 time server available to it.

Screenshot 2015-12-20 16.46.56

I’m slowly editing all the clock settings on my network machines to allow them to utilise the local NTP server as well as trying to get my head around trying to monitor the server’s stats using MRTG. MRTG is easier said than done as it’s based on Pearl and I haven’t done any scripting in years, but that’s another rainy day project.

As I said at the beginning this is a proof of concept for another project and it works a treat!

 

Getting portable #1

After getting my rig up and running just the way I want it, it’s time to un-plumb it all from the confines of four walls!

Now as I’m playing with digimodes I want to be able to get the necessary software running on a portable device. The obvious solution in the day of the i-device is a smart phone or tablet.

As I’m an Apple slave on the tablet front, there’s nothing in the App Store which does the job. My laptop is OK but the battery life isn’t brilliant and it’s not overly portable. I discovered an old Dell Inspiron Mini laying in the bottom of a cupboard and had a good go at resurrecting it but unfortunately the battery was shot and with only 1Gb of memory it really struggled to do anything. The repeated blue screen of death at boot under Windows XP (it’s what it came shipped with!) warning of a memory mismatch didn’t fill me with joyous feelings.

A new battery, SSD disk and a stick of memory would set me back almost £125 and still give me something which really wasn’t fit for purpose.

A mooch around the internet offered up a variety of options but in the end I plumped for a Panasonic TOUGHBOOK CF-19.

Panasonic_Toughbook_CF-19_02b_blue_650

The CF-19 is so hard it has to shout it’s name in block capitals just to remind lesser devices that they can’t be dropped from a height of six foot, be jet washed with a hose or run over by a Land Rover and survive unscathed like it can!

45snow

You get the general drift? This thing is as hard as nails and has no doubt been on several world tours to all the top holiday destinations such as Iraq, Kuwait, Bosnia . . .

My main concern over taking things outside is moisture. Admittedly I’m not likely to leave things sat in the pouring rain but the ambient moisture and the occasional summer downpour wouldn’t do things much good.

A friend of mine who works in the Neutrogena Hand Cream sales man’s paradise which is the North Sea oil fields had one of these and several years ago asked me to reinstall it all for him. It was pretty salt encrusted and I was pretty impressed at the punishment it had taken. The rubberised covered ports and ridiculously engineered build quality meant it could and had taken a fair amount of punishment. One of the forums I looked at suggested that if ever mugged, beating the assailant over the head with the CF-19 would a/ make you feel good, b/ avoid any offensive weapons charges, c/ do absolutely no damage to the device what so ever!

PC Warehouse Online http://www.pcwarehouseltd.co.uk/ specialise in refurbishing laptops and netbooks, which at a guess are bought up in bulk from organisations who issue them to sales staff, spies, soldiers and other black ops people. Their eBay store has a fair selection of devices from bargain basement to midrange. I plumped for midrange and they accepted less than their listed price so happy days. These things originally retailed in the £3K bracket so to pay a bit more than the Dell Inspiron repair costs seemed a bargain.

A few days later a large Tetley Tea box smelling strongly of Orange Pekoe arrived. To be honest you could have just stuck stamps on the TOUGHBOOK and put it in a postbox but the bubble wrap and foam chunks were a nice thought.

This puppy bore a few scars but nothing too dramatic. I missed the fact there was a big scratch through the screen as I originally fired it up post midnight when I got home from work and in the gloom didn’t notice.

My heart sank! I spent about an hour trying to come up with a desktop colour scheme which made it less obvious. At this point my glum feelings returned to positive when I realised these things came with industrial grade screen protectors! After gently pealing it off I was rewarded with a pristine screen. All the damage had been absorbed by the screen guard which is fair testament to it.

A Buff Ultimate Screen Protector http://bufflabs.com/ from http://www.ephy.co.uk/ soon sorted the screen’s nakedness, along with replacement plastic parts for the lid area which had seen the worst wear. I even lashed out a whole £3 on a new stylus as the one that came with the device looked like it had been used to mine diamonds or pick someone’s nose but in a Bear Grylls jungle survival style!

It took a few days to set up Fldigi, the device audio for using with the Signalink and USB RigCat but there it was, working a treat.

20151022_190856

Not wishing to bang on about how good this little breeze block is but it’s got a rotating screen, touch sensitive display, 3G, GPS, Bluetooth, WI-FI, Firewire, USB, serial comm port, VGA port, SD card slots, PC card slot, PC express card slot, 500GB hard drive, 4 Gb memory, Intel Core 2 duo processor and came with a pucker copy of Windows 7 x64 installed. If that little skill set can’t be utilised to the full in portable radio matters there’s something wrong!

There are a bucket load of other features but I’m starting to drone on! All I will say is the GPS functionality is really good fun. The Panasonic stock software isn’t much but if you install U-Centre from u-blox https://www.u-blox.com/en/product/u-center-windows it does all sorts of really fun visualisations and bits. When I get to it I’ll sort out a way of converting GPS co-ordinates to Maidenhead locator format. I know you could just look them up but hey, it’s a project!

Now the only possible upgrade this thing may need would be to replace the hard drive with a SSD disk. Firstly this would give a massive speed increase and secondly remove about the only moving part which could potentially get upset if the TOUGHBOOK was ever dropped to earth from the edge of space.

As if by divine intervention, ebuyer’s deal of the day on Friday was a 240Gb SanDisk SSD Plus for £49 with free delivery including next day Saturday. Opportunity too good to miss!

It took about 20 minutes to clone the hard disk from the TOUGHBOOK following the guide published by lifehacker http://lifehacker.com/5837543/how-to-migrate-to-a-solid-state-drive-without-reinstalling-windows which uses EaseUS ToDo Backup Free to do the necessary optimisation and cloning to a SSD.

Admittedly SanDisk also provide this for free with the drive but the lifehacker method is tried and tested.

The hardest part was getting the drive container apart! It looks like something off of the flight deck of the Nostromo from Alien and contains all sorts of insulation, padding and a heater to keep a conventional hard disk safe from the real world, if the real world is south of The Falkland Islands!

20151024_115132

With a bit of patience everything was reassembled and working. OK, I’ve reduced my available disk space by half but with a full installation of Windows 7, Libre Office, all of Panasonic’s drivers and stock software and Fldigi and a recovery partition I’ve used just under half the disk. More than enough room for something I’m sure!

 

Why?

After having been away for a week with work (not out of choice I can assure you) there was a need to catch up on some basic domestic chores yesterday morning. I’m not sure it’s a good thing that you now need to sit in front of a computer to do most things as the High Street which is populated by Wetherspoons, estate agents and charity shops will testify!

In my half jaded state I hardly noticed my PC glitch and then switch off. Hmm! On hitting the power switch to restart I was then rewarded with the acrid smell of burning dust and noticed one of the temperature sensors on the front of the case indicating a temperature somewhere north of the FTSE 1000 after an investment banker had been playing with the LIBOR rate. Oh crap! A quick squint through the case side revealed the processor cooling fan sitting still. That’s never a good thing.

Thankfully my cooler has a standard 120mm case fan bolted onto a piece of aluminium that makes the Sears Tower look small, so a trip to Novatech replaced that very easily.

On hitting the power button all went well for about 15 seconds before the smell of burning dust was once again liberated and the fan ground to a halt, as the system went haywire and told me there was no system disk installed.

Best guess is the CPU fan controller has gone on the motherboard. Just what’s needed on a Friday and especially after getting everything Windows 10 wise running perfectly!

So then came the usual dance of what to do. Like cars being driven off the forecourt of a showroom and depreciating by the time you reach the tarmac of the road, computers are old technology before you’ve even bought them. With that in mind it was going to be pointless to attempt to replace just the motherboard. Plus, after potentially having warmed a few surrounding components by several degrees centigrade what would go bang next just to spite me?

Spending chunks of money is never helpful, but if you’re going to do it with IT kit, do it properly to prevent regrets and provide some modicum of future proofing.

With that in mind eBuyer are providing a nice new ASRock FM2A88M Extreme4+ Socket FM2+. This is from the same stable as the one used inside my radio but is the AMD variant rather than Intel. I’ve always been a strong advocate of separate components in systems along the line of “if you want something to do it well, let it do that alone rather than try and do everything halfheartedly”. That was very true of the radio as the soundcard needed to be the best of the best.

With my day to day PC that’s not so important and the ASRock FM2A88M Extreme4+ is another Micro ATX board, which with a suitable processor provides great graphics and hosts a bucket of features and connectivity which means I can ditch the various cards I’ve used in my current system.

628067-658043-800

Now I’ve often thought that processor manufacturers have done a great job in their marketing.

I remember in the mid 90’s that processors had catchy names like “286” or “386”. Now we have the AMD A10-7870K Black Edition which sounds like it’s just finished training SEAL Team 6 in the latest urban warfare techniques and quite evidently appeals to the inner warrior of every pasty online gaming teenager. It worked on me so I bought one!

673645-712906-800

More for the fact that it’s the highest spec processor the motherboard supports and unlocks a lot more of the graphics processing functions I must hasten to add!

Memory was another minefield. Gone are the days of just sticking in a stick of memory, now you have thousands of designs, colours and specifications out there. A lot of them look like they belong in the cockpit of a Stealth Fighter rather than a home PC!

657211-633805-800

So I bought some that was cheap and black in colour, 16Gb’s worth to be precise. The table of supported manufacturers and specs for the motherboard was a confusing as hell and in the end I just gave up. I’m not overclocking this thing when it’s built, I just want it to work so I can get on with life so it should work a treat (hopefully).

So in the meantime I will sit and twiddle my thumbs as it looks like a nice weekend and being outside in the sun seems more appealing than trying to build a new computer. That said, my box of bits won’t be here until the middle of next week!

The jury’s out on Windows 10

As promised here’s an update on my experiences with Windows 10.

Since installing there have been a few snags which you need to be aware of if you’re going to update.

The whole Microsoft Windows Defender not working is a real problem and unless you address it, leaves you with your pants down and vulnerable to any malware and virus that comes your way. Having played with Windows 10 now on several friends machines the suggested solutions in my previous post don’t always work which is a head scratcher. One of the big problems is that the required application gpedit.msc, needed to edit the group policies isn’t as standard on all machines. That then causes a problem because you have to flit around the internet looking for a download, not all the downloads are clean and come packaged with nasty malware or worse, you’re not running any antivirus . . .

If you end up in that bag, just install a 3rd party virus solution such as Avira Free which will do the job just as well.

Next hitch is that the Windows 10 upgrade process appears to clear out the root of the destination drive. As such several programs and batch files that need to sit in the root of C:\ have disappeared. They can be readily reinstalled but typically you don’t realise they’re missing until you’re in the middle of something else and need them!

I also ran into a problem with my DVD drives disappearing. I know they’re very last decade in some people’s eyes but media still comes shipped on them, including the Windows 10 update, so to see the drives disappear was a real pain in the arse. The obvious unplug, reboot, plug back in doesn’t cause them to be detected. Thankfully Google saves the day on that one and http://www.askvg.com/optical-drives-are-not-showing-in-my-computer/ provides a solution. To be honest I couldn’t be bothered to edit the registry so I just used the provided script at Method 4 and it all started working nicely.

Also mapping network drives within Windows 10 seems to have issues. I have relied on this to give access to folders on other servers but despite all the security, privacy and sharing settings being set at what they need to be, I can’t browse my network.

I can however map network locations which works just as well, you just need to know where you’re going i.e. the IP address and path to the desired share, to type into the required field rather than browsing and clicking.

My advice is this. If you want Windows 10 do a clean install from a USB key. Microsoft’s little MediaCreationTool allows you to build a version on on either DVD or a USB device.

When you start the upgrade process, select the clean installation rather than preserving your existing settings. You’ll need to backup your documents, iTunes library and so forth but you get an as new installation rather than one with scattered fragments of debris from Windows 7 which could potentially be causing issues.

Remember, you can only upgrade from a pre-existing Windows 7 installation, you can’t do a fresh install on a clean machine.

That said at the moment SDR# is working OK, so if you fancy a change of environment take the plunge.

Big Brother changes it’s operating system

Ever since I’ve been playing with computers it’s been a love hate relationships with Bill Gate’s Empire and I’ve flitted between operating systems like a humming bird on speed on occasions.

Now the big dilemma arises when the dialogue box pops up in the system tray on your PC saying “Get Windows 10”!

Do you sell your soul to Satan or stick with what you’ve got?

After much umming and ahhing I’ve let one of my PC’s update to Windows 10. The logic on this is, at some point support for Windows 7 will end, in a similar manner to the demise of Windows XP which countless companies and institutions still use. The snag is a lot of ham radio software was crafted on XP and is very happy and stable in that environment. When you try and move it to a newer 64 bit operating system they tend to get very upset and stop working, so it’d be useful to know what’s going to break ahead of the party!

So after backing everything up (gone are my cavalier, throw caution to the wind days!) I lit the blue touch paper and let it do it’s thing!

I sat waiting for the inevitable blue screen of death to appear!

20150809_082131

Surprisingly things didn’t take too long before I was rewarded with ….

20150809_083657

Ok … Now what? Where’s everything gone?

20150809_083756

We’ve got a start button which does something, unlike the complete abomination which is Windows 8.

After a few seconds …

20150809_084012

In a similar manner to a very annoying advert for a certain brand of makeup available at a well known high street retailer based in Nottingham, “Ta Dah!”

It does take a while for the new installation to find everything that was there and put it where it should be.

Things to look out for!

1. In this big joined up world everything wants to bombard you with adverts and track you. http://bgr.com/2015/08/06/windows-10-privacy-tips-and-tricks/ provides some very useful advice on switching all that off.

2. Windows 10 has at last caught up with the Linux side of things and supports multiple virtual desktops. http://winsupersite.com/windows-10/windows-10-tip-move-apps-between-multiple-desktops for more on this. Grudgingly, I must admit it does it reasonably well. I’ve used third party apps previously to achieve the same result with the overhead of a continuously running app which wants to take over your PC.

3. Probably most importantly, you need to check that Windows Defender is running or you’ve got some virus guard/anti malware running. http://www.tenforums.com/tutorials/5918-windows-defender-turn-off-windows-10-a.html explains more. I’m still trying to get this working because Windows won’t switch it back on for some reason.

4. Edge wants to rule the world. Not U2’s guitarist “Mr The Edge” but the new incarnation of Internet Explorer. Thankfully the first time you run Chrome, it takes you to a nice little video which shows you how to restore the balance of things!

5. It’s quick. I’ve seen a marked improvement in speed just playing with it for the last 30 minutes.

Now thankfully, RealVNC works perfectly (I would have been annoyed if it hadn’t) as does RemAud (written by an enthusiast and the current version 1.7 hasn’t been updated since 2013) so playing radio over my VNC connection is business as normal.

I need to have a serious look at whether SDR packages (HDSDR, SDR Console & SDR#) work before letting this thing anywhere near my radio box. Perhaps the biggest issue may be the virtual audio cable solutions. Remember Virtual Audio Cable doesn’t work correctly on my SDR system despite it actually providing an audio output, hence the use of VB-Audio Cable. It’d be a real shame to watch that go bang as a result of migrating to a new operating system.

All things being equal the early indications are good. I’ll post an update after some serious testing.

By way of a test I took the radio for a spin and bagged a SIM31_PSK contact with CT4KO/QRP in Portugal! I was very surprised with that as I’m still tweaking the software which is a little bit clunky in places, but it worked nicely!

Screenshot 2015-08-09 09.28.17