Saturday 27 January 2018

The Orange Pi

Rummaging round in Hobbyking, I came across the Orange Pi. It's like a Raspberry Pi, but cheaper and with more.

£6.31 gets you an Orange Pi, with a quad core, 1gb memory, 10/100 ethernet, card slot, wifi and 4 USB ports

£14.04 gets you an Orange Pi Plus, with a quad core, 1gb memory plus 8GB flash, sata and gigabit ethernet and 5 USB ports.

The Raspberry Pi 3 is £30, by comparison.


Massive malvertising

I should have thought of this.

Instead of just feeding malicious software into genuine advertising agencies, how about setting up your own malicious agency? And if not one, how about 28? And that's exactly what happened.

So you set up a 28 fake ad agencies - that's easy enough, it just takes a bunch of web sites and some fake profiles on linkedin. Then those agencies contact web sites and offer money for ads on genuine web sites. And although they promise to pay, they don't actually have pay for those ads - this is a criminal enterprise.

So unsuspecting users are deluged with malvertising from malagencies. Here's the details.

That's why I block advertising. Not because it's annoying and intrusive, but because some of it is actually malicious.

Friday 26 January 2018

Fixing the Masterswitch

APC make a product called the Masterswitch. The ones I have are about 20 years old; I have three of them, and two are in use. They let me control the power to any of eight outlets, which means that I can switch computers on or off, remotely. From anywhere!

The one that isn't in use, is out of action because I can't access it via the ethernet port. I can access it via a serial port, but that's a bit clumsy. I wanted to fix it.

It's been like that for several years, but a few days ago, I had a sudden thought. Maybe the problem is just the ethernet card? So I went on to eBay, and discovered that these cards (AP9606) cost about £25, whereas I can get an entire second-hand Masterswitch for about £70. And I didn't actually know that buying that £25 card would fix the Masterswitch.

But I told eBay to email me if anything came up, and hey! A card was offered for £12.86, so I grabbed it. It arrived today.

I put the card into the faulty Masterswitch, and accessed it over the serial port, in order to set the IP address and suchlike. Then I tried to use it. No luck. And after trying this, that and the other, I suddenly realised that this hadn't come out of a Masterswitch, it had come out of a UPS; APC also make very nice UPSes. So the card was trying to control a UPS, it had no idea about eight switchable power outlets.

Hey ho, I thought, that's £12.86 wasted. And then I had another thought. I looked at the old card, and it had a label on it that said:

Model: AP9212
AOS: aos253.bin
APP: ms202.bin

So I'm guessing that aos is the operating system, and ms202 is the Masterswitch software. So maybe I can upload those to the new card?

I googled around, and found the software on the APC site, here. I downloaded the latest version, vintage 2001 (I told you I've had these for a long time) and used ftp to copy the files to the Masterswitch. They copied just fine!

Then I rebooted the Masterswitch, and it came up nicely. And then I accessed it via the web interface over the network, I was able to switch outlets on and off just perfectly.

Job done!

Monday 22 January 2018

Network switches

After one of my network switches crashed catastrophically, I needed a replacement, so I went to eBay.

I should first explain what a network switch is. Each computer has an ethernet port (or uses Wifi, but most of mine use wires). The cable from that port, goes to an ethernet switch, and that acts as a kind of traffic manager. Like roads leading to a roundabout?

The switch that failed, was a 32 port switch, but I've grown a bit since then, and I looked for a 48 port switch. And I wanted it to run at 1000 mbit speed (gigabit) because I've been using gigabit speeds on an increasing number of computers. The cards cost just a couple of dollars now.

You have to be a bit careful; some switches have just a few gigabit ports and the others are all megabit. I wanted a switch that was all gigabit. So I went to eBay and rummaged.

I wound up buying a "3com Baseline Switch 2948-SFP Plus" for £30. And after a bit of thought, I bought another one for £35. These give me 48 gigabit ports, so I can put one on my front rack and one on the rear rack.

I installed the front rack switch, and that was working well. So I looked at the rear rack switch, and decided that before I installed it, I'd have a play around with it, to see what else it could do. And I was amazed! This is what is called a "managed switch". You can disable ports, or restrict the speed. You can monitor the throughput of each port, and tons more.

So after playing with my new switch, I installed it, so now my main Data Shed is entirely gigabit switches.

And then I went to eBay about bought another "3com Baseline Switch 2948-SFP Plus" for £35. The only thing I don't really understand, is why they are so cheap!

Sunday 21 January 2018

A consulting job

This happened a couple of decades back. I was asked by a computer dealer to appear in court as an expert witness. They wanted me to swear that a 10 mbit ethernet network, is 2.5 times as fast as a 4 mbit token ring network. They had replaced, for a customer, their old Token Ring network with a new ethernet network, and the customer was complaining that it ran very very slowly now. And this was going to be a court case, because customer wanted dealer to rip out the ethernet cabling and hardware, and reinstall their old token ring, and that would be very expensive for the dealer.

It sounds like it would be faster. But networks aren't quite that simple. And why would the customer be wrong about this? So I said "I need to visit and have a look at this." "The dealer said, "Why? It's very simple, 10 mbit compared to 4 mbit." So I explained, when I'm up on the witness stand giving my expert opinion, and the cross-examination asks me "So, Dr Solomon, did you actually go and look at this network?"  then I don't want to have to ansewr, "No, I'm just guessing."

So we made an appointment, and I went to visit the customer. The customer showed me; he started up Dataease (a database that I knew and loved) and nothing happened, for a very very long time, until eventually, the opening screen came up. "Odd, I though, "that should have been instant, they haven't actually done anything yet." So we closed it down, and started it up, and this time I went to watch the server. And the disk light was flashing, and flashing, and flashing - lots of disk access, and eventually the database started up.

"Hmmm, I thought, "I wonder what's causing that?" So I started it up again, but in single user mode, and this time, it came alive instantly. The customer was watching, and said "Yes, that's more like it! Well done, you've fixed it." No, I hadn't. You can't use a multi-user database in single user mode, there will be collisions. But it was clear what was wrong; the database was implementing locking by opening little files to indicate "File in use", and closing them, and opening them, and so on.

So, how to fix this? I phoned Dataease tech support; I had a good name to talk to, which got me past the front line support "Have you switched the monitor on?". And he said, "Yes, that was version 4, but version 5 does proper in-memory locking using the operating system locks." "So how can I get an update?" I asked. And the customer interrupted, "Do you mean this?" he asked, waggling a copy of Dataease 5 that they had been sent but hadn't bothered to install.

So  I upgraded their software, ran it multiuser, it was swift as an arrow, everyone was happy (the customer, the dealer and me - but not the lawyers who had been deprived of their fees).

Job done.

Thursday 18 January 2018

Power controller

I use APC remote control power distribution units. They give me eight power ports, controllable remotely via my network; very nice. It means that I can be on the other side of the world, and reboot my computers.

I used to have three DSL lines, used for backup across the internet, because they were cheaper than my old 2mbit leased line. When I moved to a 100 mbit connection, I didn't really need them. But I kept one, because A) it gives me at least some connectivity if the 100 mbit line goes down (which it has, they called it routine maintenance, but they didn't warn me in advance, so I claimed compensation, which I got) and it also means that I have a way of accessing my network from "outside".

The APC PDU was still there, now controlling only one DSL router. Which is a waste, I could find a use for that elsewhere. So, I thought, let's make a remote rebooter from parts in my parts box.

I used a Raspberry Pi, of course, version 1. I also had a little relay board, they cost £1 on eBay.

The DSL is powered by a plug-in power supply which claims to give 12 volts; it actually gave 15 volts. Too rich for the Pi, I already fried one that way! So I used a step-down converter (eBay, £1.33) to get it down to the needed 5 volts.

I connected pin 2 of the Pi to give the relay its 5 volts, and pin 6 for the ground. Pin 12 is GPIO18, and that was the pin that would switch the relay. So the 15 volt PSU supplied the Pi after going through the converter, and also supplied the DSL router, after going through the relay.

The software to control this was pretty simple. First, run only once after boot-up, to set up the Pi gpio pin.

# put the gpio pin 18 (physical 12) under control of the kernel
echo "18" > /sys/class/gpio/export
# make pin 18 an output pin
echo "out" > /sys/class/gpio/gpio18/direction

Then, to switch on, I do "gpio -g write 18  0" and to switch off, I do "gpio -g write 18  1".

Instead of having to log in to do this, I implemented a little cgi, so that I can access it as a web page and click the on or off button.


Wednesday 17 January 2018

How to activate your HSBC debit card

Why does the card need activating? Is it a security thing, in case the card the posted falls into the wrong hands?

So I phone the number they give, 0800 783 5263 and the rest was automated. It asked for the card number, which I gave, and then to ensure that it really was me calling, they asked for my date of birth.

Wait, what? They think this is something known only to myself and HSBC?

No wonder there's so much fraud.

Network down

I got up this morning to find my entire network down. I did a few checks, then went down to the Data Shed to see if I could spot the problem. I saw, almost immediately, one of the big gigabit switches (32 ports) was flashing all ports. I powered that switch down, and my network came back to life.

I think the switch had simply gone gaga, and was throwing packets onto the network as fast as it could. I doubt if it's something I can fix. So I replaced it with one of my old 100mbit switches, and now everything works.

I use gigabit on most servers, because it makes throwing huge amounts of data from one server to another, very fast. I need that when I'm backing up terabytes of data. But for external access, the limit is 100 mbit, because that's the speed of my line.

I would like to use a gigabit switch instead of that temporary 100 mbit switch. So I went on to Ebay, and found a 48-port gigabit switch for £30. Which is not bad, since a 48 port gigabit switch is, when new, over £200.

 ... later ... So then I bought another one for £35.

Monday 15 January 2018

Dental diagnosis

Time for my annual tooth check. So I toddled down to the dentist.

She poked and prodded, and stuck something sharp into my gums, and after a somewhat uncomfortable five minutes, she gave me the all-clear!

Friday 12 January 2018

The Black Baron

This is about the first themed show that we did. We had previously done the same chrome-and-white-plastic shows as everyone else. In order to be taken seriously, you have to be serious. And boring. And people forget everything you told them as soon as you've finished talking. So I decided to try something completely different.

This was just at the time when viruses had been written by someone calling himslef the "Black Baron" - he turned out to be a British guy from Plymouth. He called his viruses Smeg.Queeg and Smeg.Pathogen, and generally seemed to be a fan of the TV show "Red Dwarf". The interesting thing about his viruses, was that they were very polymorphic. at a time when polymorphic viruses weren't common.

Before the show, I thought about what we could do, and I put together a mini-presentation, to show to our sales and marketing people, with sound from a tiny tape recorder, and I hoped they could use their imagination to see what the real thing would look like. I heard a whisper "Is he serious?".

I wanted to impress on the audience that, no matter how clever the author of the viruses were, we were cleverer, and were completely on top of the situation.

The occasion was Softteach, a show put on by distributor Softsell, aimed at dealers. And what dealers want, of course, is something they can sell, for a profit. And which doesn't cause them hassle later.

So my commercial pitch was this. We're giving you a free copy of the Antivirus Toolkit, and you can sell it to whoever you want. Because when someone wants an AV, they want it RIGHT NOW, not after a couple of days for delivery to happen. But when you sell it, you'll re-order, right? So that you can keep on selling it. Also, don't worry about tech support. We do all that, we have a free tech support line. And don't worry about us undercutting you on price - I promise that we won't sell copies to anyone at anything other than our recommended list price. So the message was "You can make money out of this".

So that was the main message. I know what turns dealers on. But that's boring. So I decided to explain to them about how polymorphic viruses worked, using an animated Powerpoint presentation to show how the viruses self-mutated in each copy. Also boring, but really the point I was trying to make is "We know what we're doing."

But how to make it really interesting? At Softteach, each vendor had a room, and you do the same presentation several times over the two days. We installed a really good sound system in our room, and we controlled the lighting.

When the dealers came in, we were playing the theme tune to "Red Dwarf", which was so popular at the time, everyone recognised it. Then, when everyone was sat down and the room filled, we started. "I'm going to tell you about the Smeg viruses, written by "The Black Baron" and when I said "The Black Baron", we did a flash of lighting and a crash of thunder, really loud. Which they weren't expecting, so it made them jump. And from then on, whenever I said "The Black Baron", we hit them with lightning and thunder again. And the presentation was quite technical (these are dealers, so they do understand about computers) and it didn't matter that it was over their heads, because A) we were flattering them by being so technical and B) we were saying "We know what we're doing."

We all wore t-shirts with the message "Smoke me a kipper" and  a picture of one of the Red Dwarf characters. I still have one of those t-shirts.

Word soon spread "Have you seen the S&S presentation? You've got to see it?" and we were packed out. We gave away hundreds of free Toolkit copies to these dealers and from that time on, whenever anyone asked for an antivirus from those dealers, they were sold one of our Toolkits. Which was, at the time, the best product around, so everyone gained.

And it was so much fun to do!

Except for Chris Pile, The Black Baron. He was apprehended, pleaded guilty, and was sentenced to 18 months.

Thursday 11 January 2018

Evolution explained

Some people have a wrong idea about what evolution is, and they rightly think that their vision of evolution is nonsense and implausible. Monkeys don't change into people. And that's right, they don't. That isn't how it works.

For evolution to happen, you need three things.

1. When animals produce young, the young are a bit different from the parents.
2. The characteristics of the animal, are inheritable.
3. Something chooses which of the young will survive and reproduce, and which won't.


So, 1 is obvious. You are slightly different from your parents. Animals are diferent from their parents too, but since to us all sheep look the same, that isn't obvious. But it's true for all animals.

The differences might be, you're taller or shorter, you're more or less clever, your hair might be a different colour, your skin might be lighter or darker. You might be better or worse at seeing, hearing or smelling things.


We also know that characteristics are inheritable. "Doesn't he look like his father!" is something we often say, or "She's got her mother's nose". And if you look at dogs; two greyhounds make greyhound puppies, inheriting the characteristics of their parents. But if you mate a greyhound with a bulldog, you get something that is a bit like both, inheriting some of the characteristics of each parent. It's only relatively recently that we found out the reason for this, and we call the study of this "genetics".

Humans choose

Now consider dogs. For a very long time, humans have chosen which of the litter to keep, and which not to keep. As a result, there are numerous breeds of dog which are very different from each other. This demonstrates that it is possible, over a period of some millenia, that dogs can become many different breeds.

But dogs are still dogs. Greyhounds can mate with bulldogs (although I'm not sure how a chihuahua would cope with a Great Dane).

In this case, it was humans who did the choosing.

God chooses

Another way for this to happen, would be for God to choose. If you believe in God.

Nature chooses

The third way, is for nature to choose. If some of the lion cubs are faster, then they are more able to chase down prey; the slower ones will find it more difficult to catch prey, and will eat less well. The faster cubs are more likely to grow to adults and breed, and be able to feed their young. So pressure from their environment, pushes lions towards being able to run faster, or hide better, or kill more easily.

It takes generations. Evolution is slow. Animals don't change, it's populations that change, and they change in response to environmental pressures. But in a few short generations, we can already see changes; there are (and always have been) elephants without tusks. That used to be a disadvantage; tusks are useful tools. But today, a fine pair of tusks can get you killed for ivory. Tuskless elephants don't get killed for their ivory, because they don't have any, so are more likely to survive and reproduce. And they pass on the inheritable characteristic of "having no tusks". As a result, the percentage of tuskless female elephants has increased from 10% in 1969, to 38% in 1989. So here, although humans aren't intending to create tuskless elephants, human predation is giving that effect.

Natural evolution is even slower. The variations are quite small, and the advantage gained can also be small. But even a small advantage, over millions of years, can result in big changes.

For example, consider a populations of rabbits. Rabbits all over the place! And then, something happens, such as when the UK changed from being part of the continent, to being an island. Now there are two populations of rabbits, unable to interbreed because rabbits can't swim that far.

So what happens if the environmental pressures on the rabbits are different. Suppose the mainland rabbits are mostly predated by wolves; the island rabbits by eagles. On the mainland, natural selection will favour rabbits that spot wolves and get into their burrows quickly. On the island, natural selection will favour rabbits that spot eagles when they start to dive.

Mainland rabbits will be looking around them and listening for wolves; island rabbits will be looking upwards. On the island, selection will favour rabbits that mostly look up, and keep their heads turned up; also, they need better eyes, to see the eagle while it's still high up. Mainland rabbits will be favoured if they can run faster.

Over a long period of time, the island rabbits will tend to rest in a position that scans the sky and have good eyesight; mainland rabbits will develop more powerful running legs. Eventually, both populations will have changed so much (remember how much dogs have changed in only a few millenia?) that you wouldn't call either population rabbits any more. The island creatures are we now call skyscanners, and the mainland creatures are called fastrunners. And if you try to mate a skyscanner with a fastrunner, they are so different that they can't breed together.

And that's how evolution works.

Wednesday 10 January 2018


We were sitting round a table, all the top sales and marketing folks at S&S, talking about our upcoming show. At the previous show, I had been much impressed by the Word Perfect stand, where they were giving away plastic hats, and everyone wanted one.

Except they didn't. the rubbish bins at the show were overflowing with these useless plastic hats. I mean, what can you do with a plastic hat?

But I liked the idea of a giveaway, and we brainstormed the notion.

It was me that came up with the idea of socks.

The marketing folks thought I was joking. I heard a whisper, "He is joking, isn't he?" No, I wasn't.

Socks are fairly cheap, if bought in volume (we wound up buying 50,000, I think they cost 47p per pair). We had them embroidered with "Dr Solomon" which was our brand name. "But," said one of the marketing people, "you won't be able to see the brand name when you're wearing them". Yes, that was the idea. The recipient wouldn't throw them into the binm because a pair of black socks is always useful. And each time he or she put them on or took them off, we get an advertising hit. And people aren't going to wear something that's blatantly advertising.

What I didn't expect, was some of the outcomes. We were drawing such huge crowds at the stand, I had to devise a way to throw socks a long distance to the audience. One useful property of socks, is that if you get hit in the face by a pair of socks, it doesn't hurt. So I developed the Sock Cannon.

Another unexpected outsome, was the "Dr Solly Salute". This consisted of the lifting of one trouser leg, to show that the you were wearing the socks. And, of course, anyone already wearing the socks, would get another pair. Virtue rewarded.

People still remember the socks. I still wear mine.

I gave a pair of socks to Prince Charles, we were on some committee together, I forget what for.

It was an excellent promotion. I'm surprised that no-one ever copied the idea.

We did a show

On of the earliest shows that we did (we being S&S INternational) was in one of those big hallls; Earls Court, I think. I forget who organised it; this was over 25 years ago. But the organisers sent us a copy of the rules, and it ran to a couple of dozen pages. So, being the sort of person that I am, I read it.

And in the rules, it set a limit on how much sound you could use. It hadn't really occurred to me before, but if you use sound the right way, you can attract a lot more people to your stand than if you just sit there quietly.

And I read the rules. It said 96 decibels.

That is a *LOT*. It's really *REALLY* loud. So we got a couple of good quality speakers, and a decent sound system, and turned the volume up to eleven, as one does. And sure enough, the show organisers hurtled down to ask us to shut that noise up. The noise they were referring to was myself and Graham Cluley, doing our double act, which tangentially referenced antivirus, but was mostly just fun.

And it was at that point that I pulled out the show rules. 96 decibles. And, of course, I had a sound meter. We were doing 94 decibels, at the point where we measured it. So I pointed out  But I promised I'd turn it down by a couple of decibels, and the show organiser went away.

I think that was the year that we dressed the stand up to look like a saloon bar in the old West, and we all dressed up as cowboys, on the grounds that we could do that precisely because we weren't cowboys.

I looked at the show stats afterwards; we had more people round our stand than even Microsoft!

Tuesday 9 January 2018

12 tb drives

Bluepoint are offering 12tb drives for just £250. I an so tempted!

The first hard drive I bought was 10 mb, list price £990. And I was very pleased with it, it made compiling Fortran programs massively faster than swapping diskettes all the time.

12tb is 1.2 million times larger, at a quarter the price.

Monday 8 January 2018

Fox hunting

In the last election, the Tory manifesto promised to have another vote on the banned animal-torture of fox hunting. That was one of my reasons for not voting Tory; I was horrified that there would be a possibility that this dreadful activity would be made legal. What about bear baiting? Dog fighting? Cock fighting?

If the want to go out with horse and hounds, there is the perfectly harmless activity called "drag hunting" whereby a man runs out first, dragging a sack of aniseed or suchlike. Then the horse and hounds chase the man. If they catch him, then they win, and the hounds jump joyfully around the friend that they have tracked. No-one gets hurt.

Now, Theresa May has announced that they've changed their minds. There won't be another vote on fox hunting.

If she'd said that before the last election, she might have done a lot better.


Thursday 4 January 2018

I can send texts!

The Hologram Nova arrived. It cost $49, and then I had to pay some sort of import tax.

I connected it to a Raspberry Pi, and tried to install the software. The error messages led me to think that I'd need to upgrade the version of Raspbian, so I did that, and tried again. This time, the Hologram software installed.

I went to their web site at and registered the Sim that came wiith the device. I chose the free option. That went well. Then I created a devicekey, and then I tried it out.

hologram send -v --sms --devicekey xxxxxxxx --destination +44yyyyyyyyyy   "This is a test"

xxxxxxxx is my devicekey, yyyyyyyyyy is my mobile number, with the leading zero removed. And after about ten minutes of so, the text appeared on my mobile phone.

So now I can log into the Pi with the Nova and send texts to anyone with a mobile phone.

Evil laughter ...

Monday 1 January 2018

I have Vaselined my toothbrushes

I use an electric toothbrush. Actually two, one for the main brush, one for the fine brush. They are battery powered, using AA batteries. That's preferable to the kind that has a built-in battery, because when the built-in fails, all you can do is throw the entire thing away.

The steel core that engages the brush, can get rusty. I think it's nickel-plated, but still it rusts. So once per year, I take off the brush heads, give the shafts a good scrape, and then coat the shafts with Vaseline. This preserves them against rust for another year.