Categories
Hardware

Guerilla Wi-Fi

This week, I tried some different firmware on the ESP8266 modules that I have. I flashed a version of NodeMCU which allows Lua scripts (and other files) to be uploaded.

By using this software: https://github.com/reischle/CaptiveIntraweb I was able to turn the ESP8266 into a Wi-Fi access point which serves a static site, regardless of what web address the end user tries to reach.

Given the small size and modest power requirements, this would be great for announcing things to a wide audience by placing an ESP8266 in a busy area, and choosing an ‘inviting’ SSID for people to connect to.

I’ll leave it up to you to decide whether to use this for marketing, advertising or political activism…

Categories
Hardware

RFID Business Cards

I was lucky enough to get some vouchers for Amazon for my birthday recently. I bought some things I needed, but then had a couple of pounds left on the voucher. I decided to ‘waste’ this on some MiFare Classic 1K RFID cards.

These can be formatted to the NDEF standard, which means that many devices will understand the data payload and know what to do with it.

I used a trusty Arduino Uno together with a PN532 RFID chip to write a URL onto the cards. Now anyone with an RFID enabled phone can scan the cards and instantly be taken to a website with more info about me.

I like to think of it as an RFID business card!

Categories
Hardware

Adventures With The ESP8266

I first saw an ESP8266 board at OggCamp as part of a central heating control project. Recently, I’ve been researching a project for CodeClub that needs to control devices remotely over some kind of radio link and so I thought it was time to get to grips with these devices.

They turned up in the post with absolutely no documentation whatsoever. A quick search with Google images hinted at a pinout, and so I tentatively applied 3.3 volts (from an Arduino Uno) to what should be Vcc and GND and was reassured by an LED lighting up on the board.

I then realised that I didn’t have a 3.3V serial I/O device to attach the ESP8266 to a computer for programming. The Arduino UNO has a serial interface, but it’s at 5 volt logic levels. I ordered a USB to serial board based on the FTDI chip, and waited…

Finally I was all set. FTDI interface attached to laptop, and with the help of some crocodile clips and breadboard, I had everything hooked up.

Nothing worked.

Hmm. After half an hour of checking connections and fiddling with baud rates in the serial console, I finally realised that there is a pin labelled ‘CH_PD’ which needs pulling up to Vcc to bring the chip out of a powered down state!

I had blinky lights and setting the baud rate to 115200 produced readable text from the ESP8266 on my screen. Yay! Sadly, I couldn’t get the device to accept any commands until I realised that it needs both a carriage return and a linefeed character after each instruction.

So now I had success in that my laptop was talking to the ESP8266, and that it was talking back. The next step was to replace the stock firmware (which is based on the old Haynes AT commands for modems) with something more flexible.

I opted to use the Arduino IDE, as I’m already familiar with the C style code it uses. Adding the ESP8266 using the IDE’s board manager was pretty easy. Great work, community!

Finally, I found a nice piece of example code which I copied and pasted. I edited the Wi-Fi details, and also changed the GPIO pin number (as my ESP8266 only has two!) and then compiled and uploaded. You have to ground GPIO 0 pin when applying power to ESP8266 to get it ready to accept new firmware. This worked first time. Yay!

Next, taking my phone and browsing to the IP address of the ESP8266 produced a simple web page with an ‘on’ and ‘off’ button. I attached an LED and resistor to the GPIO pin on the ESP8266 and felt a great sense of achievement as I was able to turn this on using the menu on my phone. I also checked from a browser on my laptop which worked well too.

So, concept proved. I really like the ESP8266. Cheap, easy to program and with enough power to be totally self-contained for small Internet of Things projects.

Categories
Amateur Radio

Digital Voice in Amateur Radio

Analogue signals are great in that they are simple enough to generate and demodulate, but they suffer in that the signal quality degrades when sent over a noisy radio link. With radio voice systems, this is heard as pops, crackle, hiss etc. and the problem gradually gets worse as signals get weaker. Human ears do a remarkably good job of dealing with noise but it can get tiring when listening for long periods.

Way back in 1948, Claude Shannon proposed that digital coding systems can be designed in such a way that error-free transmission can occur even through a very noisy channel. My first encounter with amateur radio using error-correction was operating AMTOR in forward error correction mode on the HF bands, from the station of G3IUB at the University of Birmingham in the early 1990s. The station consisted of a Trio TS-520S transceiver (yes, valves!) coupled to an AEA PK-232 terminal node controller, with an amber screen serial terminal made by Wyse. It was actually quite impressive to watch the text on the serial terminal edit itself, so that rogue characters got corrected as more data came in over the air.

Although I’ve been a radio amateur for decades all of my voice transmissions have always been carried by analogue radio signals, modulated by various combinations of phase, frequency and amplitude. However, the increase in computing power and falling costs over time have now put digital voice modulation schemes within reach of the radio amateur.

Recently, several competing amateur radio digital voice systems have come into existence. Sadly, they are largely proprietary and do not interoperate. After all, there is just one radio manufacturer behind each closed protocol. This goes against the spirit of amateur radio (which in my mind is the original open-hardware movement) and it shouldn’t be necessary to buy a specific type of transceiver from one specific manufacturer just to operate in a specific mode.

In 2005, the European Telecommunications Standards Institute (ETSI) ratified a specification for a digital voice modulation scheme. This has been adopted by PMR radio manufacturers and is growing in popularity throughout the world as the new DMR radio standard. Although the voice codec used is proprietary, the specification itself is open and so it lends itself to easy investigation by radio amateurs.

So, I have decided to jump on this particular band wagon. As well as the usual PMR manufacturers, there are now a range of Chinese manufacturers producing DMR compatible equipment very cheaply. I managed to source an MD-380 hand-held radio from TYT, with a drop-in charger, two antennas and a hands-free microphone all for less than £100, including delivery to the Isle of Man.

First impressions are that the codec is somewhat brutal. Everyone sounds somewhat robotic, but once you’ve got used to that the audio is very intelligible. Unlike analogue FM, there is no hiss. No background crackle. None of the multi-path ‘flutter’ you get on stations in moving vehicles. A very strong FM signal probably sounds better than DMR but for hand-portable radios strong signals are rare. Listening to perfect audio from DMR in weak fringe areas is much better than struggling to pull a voice out from the noise you’d hear on FM.

You also get other value-added features with the DMR protocol that you don’t get with analogue FM. Each radio has an unique identity, so you can match that up to a user’s callsign and have your radio display the callsign of the person you’re listening to. That’s great if your memory is as bad as mine, and it takes some of the stress out of mobile operating. Also, DMR was designed with repeater infrastructure in mind which means that roaming between coverage areas is seamless, with no need to fiddle with your radio while driving. DMR is also a time-division multiplex system which means that two separate conversations can occur simultaneously in one 12.5 kHz wide radio channel. You can even see the received signal strength from the repeater at the same time as you’re transmitting into it!

Of course being digital, sending data between repeaters via the internet is easy and so a worldwide network of linked repeaters has sprung up. This means that noise-free global communication is now possible from one hand-held transceiver to another. Thanks to the hard work (and deep pockets) of two local amateurs, we have two linked DMR repeaters on the Isle of Man.

Categories
Hardware

Printing From A Chromebook

Chromebooks are nice machines, but of course they dance to Google’s tune. Google are usually pretty good at adopting open standards but occasionally they think they can do better. There are established protocols for printing over a network, but Google have ignored these entirely by ensuring that all Chromebooks only support Google Cloud Print printers!

To be fair to the mighty G, they do explain how you can leave a PC running with their Google Chrome browser open to make your existing printer available to your Chromebooks but electricity on the Isle of Man is not very cheap, so I don’t want to leave a PC running all day long.

Instead, I’ve deployed a humble Raspberry Pi along with the magic of GNU/Linux and the Google Cloud Print connector for CUPS to achieve the same result without wasting the planet’s resources.

However, efficiently sipping electricity like this won’t help the island’s Manx Electricity Authority to pay off its debts!

Categories
Stuff

What I Learned at OggCamp 2015

I attended my first ever OggCamp on the weekend of 31st October / 1st November. Having never been to any kind of “unconference” before, I didn’t know quite what to expect. So here’s a few thoughts on what I learned:

Free culture and free software types are a friendly bunch.

This happened even before I arrived. Half way up Brownlow Hill, I was staring at a map on my phone when a chap walking nearby asked if I was looking for OggCamp. He told me about the previous ones he’d attended, and we walked up to the venue together. (I also learned the advantages of wearing an Ubuntu T-shirt in public!)

I didn’t realise Mars was as small or as cold as it is.

The first talk I listened to was by Gurbir Singh who gave a detailed presentation about space exploration, and likely future missions to Mars. You can see his slides here: http://astrotalkuk.org/mars-the-new-space-race

Protocols run the world.

Jon Spriggs (who really is a nice guy) was giving the next talk I went to, looking at the various protocols which run our networks. Lots of great info, but the bits which stuck in my head were:

  • 192.0.2.x is the ‘dummy’ IPv4 subnet – just like example.com is for domain names
  • DNS resolvers allow for easy MITM attacks, because the first to reply wins
  • TLS is the correct name for SSL
  • SQRL (squirrel) is a new one-click authentication for the web

A lot can happen in five minutes.

The next thing I attended was the ‘lightning’ talks event. This is a slot where people present for just five minutes, and can be asked just one question at the end. A great format which led to many diverse things being presented. For me, the one to remember was about using big USB hubs and some software called Multi-Writer to write an .iso (or .img) file to multiple memory cards at once. I can see me needing this if I ever get round to my ‘Raspberry Pi for Dummies’ talk at IoM CodeClub.

Entroware make nice looking machines.

I’d never heard of Entroware until OggCamp, but they sell Linux based desktops, laptops and servers. They had a few on show in the exhibition space at OggCamp. Definitely worth a look if you’re in the market for a new machine. They also sponsored a lot of what was happening at OggCamp, and even stumped up a shiny new laptop as a raffle prize. Great.

HR Departments suck.

The next talk I went to was by Stuart Coulson who was discussing ‘hacking’ your CV to gain advantage in the job market. Lots of great tips about why CV’s don’t work, and what you can do about it. It was interesting to think of a CV as device to get HR to pass your application on to someone who cares, in just a 20 second window! Also some good advice about separating out ‘personal’ and ‘professional’ accounts on social media, and creating your own ‘brand’ for yourself.

Talking to new people takes me out of my comfort zone.

But each time I do it, I reckon it gets easier. I didn’t know whether to go to the ‘official’ pub (The Constellation) for the Saturday night drinks. Thankfully, I was spurred into action by a tweet from @himayyay and so left the confines of my windowless hotel box to venture into the real world. I managed not to get lost on the way, and also learned that my legs are much longer than Google’s, as their Maps app had overestimated the journey time by about 100% 🙂

I got myself a drink (priorities, right?) and then loitered. People in OggCamp T-shirts around. People with Linux-y T-shirts. I was obviously in the right place. Everyone was engaged in conversations in groups, so…


…I went outside! Thanks to Twitter though, I met up briefly with @himayyay until the call of KFC on an empty stomach took him and his friend away. Still, I’d done it. Gone somewhere strange in the dark and spoken to people. Strengthened by my success, I went back inside all fired up to break into the group conversations…

…and promptly stood against a wall, clutching my pint for protection!

I thought I’d finish it and go back to my hotel, when I was rescued by Gemma and Dick who spotted my unease and asked if I’d like to join them. Thanks guys! Anyway, within seconds I’d identified them as fellow Yorkshire folk and so knew that everything would be OK. Three more drinks and much conversation later, we were finally kicked out of the place.

My hotel was in the opposite direction to the next venue, so I headed back. Bed was calling.

We have to step up on privacy.

On the second day at OggCamp, I went to a panel discussion chaired by Sally Hanford about privacy. I’d clearly missed a talk from the day before which this discussion was following on from. However, online privacy is something I’m very interested in so it was easy for me to follow along and contribute. It seems we still have to solve the problem of making privacy important to people. I guess in reality, it’ll take more breaches like the TalkTalk one, or a change to a more oppresive and authoritarian stance by our governments before people begin to realise the real consequences of a lack of online privacy.

ESP8266 modules are great for building IoT devices.

The next talk I went to was by Tim Gibbon who has reverse engineered the RF interface used in a lot of UK gas central heating systems, so that he can switch his boiler on and off remotely. In conjunction with some inexpensive (about £6 per room) sensors and transmitters he’s able to monitor the temperatures in all the parts of his house, see the information live and historically through a web browser and get the system to crank up the heating automatically when it gets cold. All for a fraction of the price of any commercially available solution.

Air travel sucks.

My journey home was hard work. I left OggCamp as soon as it finished, and rushed off to the airport to catch a flight. It was delayed. It was delayed again. It was cancelled.

At this point, people ceased being human passengers and became units for a handling agent to process. Queues three hours long with no seats nearby. Lack of information and updates. When you finally get to the front of the queue, you’re told you’ve been booked on to the next flight in the morning. Queue again to find out where you’ll sleep.

Nobody knows. There are hotels nearby, but the handling agent has to use a national agent who is refusing to answer the phone. Hours pass. Still no seats to sit on. Legs tired. At midnight I call it quits and drop £70 on a hotel room across the road.

Four hours later, I’m up and back at the airport ready for my morning flight. There’s a fundamental problem with airport security if you bought your some bottles of perfume in duty free the night before. Perfume is a liquid. Apparently, airline authorities are scared of liquids and so I now have a problem. I solve it. (I’m resourceful, y’see.)

So, back in departures. I see a delay on the board. Unease. More delay. Oh look – my flight is cancelled. Once again, we’re led like cattle through the arse end of the airport and back land side. Once again we join the queues of doom…

Rebooked onto another flight later in the morning. By this time their printer has died, and so I clutch a handwritten scrap of paper and have to find another desk to check in again. Oh, and I have to get my contraband liquid gifts through security again. This time I own up, and go for the human misery angle. It works. (Well, you can only use a 0-day once, right?)

Third time in the departure lounge. Time passes. Flight gets delayed. This time though, the news of the actual cancellation comes from the Isle of Man airport website when I notice that our flight is listed as cancelled on their arrivals board. It was another 30 minutes before they finally owned up and told us in Liverpool, before leading us through the now very familiar tunnels and passages back to the land side world. I suspect the delay before telling us was because they were trying to manage the length of the queue at the handling agent’s desk!

At this point, I’d lost the will to go on. I couldn’t face the whole queue, rebook, queue, check-in, queue, security farce for a fourth time. I got my lovely significant other to phone up and book me a seat on the evening boat from Liverpool, and got myself on a bus into town. I managed to kill time for the rest of the day with the help of a pub and some beer. Felt human again.

The boat was slightly delayed, but the reasons were made very clear. Here is a transport company that knows passengers need information. Here is salvation. I settle in for the journey, only to find my Bluetooth headphones have died. I think the triple X-raying they’d had earlier on had cooked them. Bloody airport!

OggCamp is great.

Really, it is. Great people. Well organised. Lots to learn. Lots to see. Lots to do. Huge thanks to everyone who played a part in making it happen. I had a fantastic time! Fingers crossed that OggCamp 2016 will be a thing.

Categories
Hardware

IUK 5 A1 IP Camera

On a recent trip to the UK, I called in to a Lidl store because I know they often have interesting (well, to me anyway) bits of tech for low prices. I picked up this camera for a shade over thirty quid.

When you consider it contains Wi-Fi hardware, a web server, pan & tilt motors, a speaker and microphone and of course a camera, then I think that is a fair price. The device also comes with a UK mains adaptor and a high quality Ethernet cable too, so it has everything you need to get started.

The camera copes well with a range of lighting conditions. I’ve tested in bright sunlight, indoors with both fluorescent and tungsten lighting and all gave good quality images. One thing which really surprised me was the low light operation. The camera automatically switches to a ‘high gain’ mode when ambient light falls. I’m not sure if has a separate sensor for this but the results are impressive. You lose some of the colour details, with an essentially monochrome image but the camera is able to see better in low light than my own eyes can! The camera also has some infra-red LEDs fitted which it uses as a floodlight, so you can even see in total darkness. This works much better than I thought it would, with enough illumination to see clearly to about 6 metres from the camera.

There is a downloadable app for both iOS and Android devices which allows you to watch the stream from the camera, and control the pan & tilt motors easily. You can also receive a live audio stream, and the camera also has a speaker in it, allowing you to talk back too.

There are terminals provided for interfacing with alarm systems, and you can control this output via the web interface too, so you could use it for whatever you liked. Feeding your pets remotely from your smart-phone, and then watching them eat maybe?

However, the camera’s web server software seems questionably secure. Two levels of authentication are used, one to view and one to configure, but the passwords are sent in the clear in URL requests which is a bit daft. Don’t use passwords anywhere else and be aware of browsers etc. caching URL requests.

The device also has an open telnet port, which doesn’t respond to the login credentials used by the web server, so I’m not sure who it’s for. It’s certainly not a good idea to expose this port to the wider internet!

The software in the camera also offers motion-detection and can trigger the alarm connector output on detection, send emails with pictures attached and upload images to an FTP server so it’s quite good for surveillance use.

Provided you can firewall this device very carefully, then it makes a good streaming camera. At the moment though, I’m confining it to my local LAN until I can learn more about that telnet port..

Categories
Hardware

HP Chromebook 11 Charging Fix

So, the nice HP Chromebook 11 seems to have a design fault. If you let the battery run flat, the Chromebook will no longer charge. Symptoms are that there is no charging LED, and no matter how many hours you leave it with the charger plugged in it simply will not charge the battery. It won’t switch on either, so you can’t even use it plugged in.

Ideally, you’ll want to recharge the thing every time the battery drops to 20% or so to avoid this issue but here’s what to do if you do manage to kill your Chromebook by letting it run flat.

Carefully prise off the coloured panels on the base, to reveal the screws. Open the the thing up and find the battery connector – the white plug with the wires from the battery going to it.

Now, disconnect this connector and then connect the Chromebook to the charger. You’ll see the orange LED light to show that charging is happening. After a few seconds the LED will turn red indicating a problem with the battery. (Unsurprising since we disconnected it.)

Now, with the charger still plugged in reconnect the battery connector. The red LED will turn back to orange, and the Chromebook will start to charge.

Once charging is complete (indicated by the green LED), you can remove the charger, replace the cover, screws and coloured panels and enjoy your Chromebook again.

Just don’t let it run too flat in future!

Categories
Hardware

Hello Chromebook (Again!)

Having already dipped my toe in the water of Chromebooks with an HP Chromebook 11, I knew that I liked Chrome OS. The very fast boot time, stable and full featured browser together with a real physical keyboard make these great devices for people who like to create content, rather than just consume it.

I managed to get a few Chromebooks to use with students at work too, and they’ve found the same thing. Switch on, log in, work. Simple. No hassle about updates, apps, or who was using the device before you and left it all messed up. Sadly, I’ve been told that we can’t roll out more Chromebooks for students to use because our government don’t want to support another platform. Yes. Really. Support. For a Chromebook(!)

Anyway, I digress. The whole point of this article was to tell you about my new toy! My significant other hasn’t been able to get near their Chromebook, so I decided to get my own. I’ve gone for the Acer C720, which at £179 was cheaper. There are some compromises compared to the HP Chromebook 11 – most notably the screen, which while being perfectly adequate on the Acer is poor when compared to the screen on the HP. The keyboard isn’t quite so roomy either. Also the Acer C720 looks like a ‘functional’ laptop, and lacks the refined design touches of the HP. It’s not all doom and gloom though – the device runs a touch faster, and has a built in SD card reader and a standard sized HDMI output, which the HP doesn’t have.

One of my main reasons for choosing the Acer other than the price, was that it has an Intel processor. I knew that this would mean that I could find Linux kernels that would be more likely to run on it, without too much hassle. In fact, it has been very easy to tweak. It seems that Acer knew that ‘geeks’ would be drawn to a lower cost device with a screen and keyboard, so they’ve made it quite easy to work with. In developer mode, you can boot from USB devices, and the Acer also has a cut down ‘BIOS’ called SeaBIOS which can be booted from the Coreboot bootloader, effectively meaning anything written for a ‘standard’ x86 PC can be booted.

After just a few minutes of tweaking, I’ve now got my Acer C720 to be a Chromebook OR a fully-fledged Ubuntu laptop. I can choose the OS at boot time depending on what tasks I want to get done. It’s definitely the best of both worlds. Ubuntu runs well, and the battery life is pretty good.

If you’re in the market for a Chromebook, or a cheap Linux laptop, then I’d recommend the C720 at this price point. Very portable, and great for people who like to get things done when out and about.

Categories
Amateur Radio

The Beast of Ballasalla

The GB3IM-S amateur radio repeater on the summit of Snaefell was brought back into service on 17th March. This led me to discover that the output frequency of 433.125 MHz becomes unusable when driving through Ballasalla, due to some strong interference on that frequency.

Now, in these modern days where everything has a computer inside generating radio noise, a little interference on the 70cm band is to be expected. The difference with this one is its strength. I could hear it mixing with the repeater’s output right from the top of Fisher’s Hill, Castletown and again at the top of Brown Cow Hill, Santon. It was clear that the peak was somewhere around the level crossing as you drove through the village.

Relaying my findings to the regular members of the morning net on GB3IM, other amateurs confirmed that they’d heard it too. Over the next few days, people drove around, walked around, took bearings and we all seemed to agree on a rough location in Balthane industrial estate.

This evening (on my way back from Code Club) I parked up in this area, and took a walk around with my Yaesu VX-2 handheld radio. With the receiver switched to AM mode, and the built in attenuator switched on, I was able to tune to the edge of the interference at about 433.200 MHz so that only very strong signals could be heard. This allowed me to walk up and down and see if the signal got stronger or weaker. After about 15 minutes, I’m fairly confident that the signal is originating from somewhere inside a particular group of buildings.

So, what is it? The signal seems to sweep rapidly across the RF spectrum, and appears to operate 24 hours a day, including weekends. It did seem to go off air on Tuesday 25th March but came back again. It sounds like it pulses at about 5 Hz, so maybe these are data frames for some networked device. Or maybe it’s a switched-mode power supply that has some kind of parasitic oscillation going on. Whatever it is, it probably shouldn’t be there.

The slight fly in the ointment is that the signal could be perfectly legitimate. In the Isle of Man (and the UK), the 70cm amateur band is a ‘secondary’ allocation. This means that the band belongs to another ‘primary’ user who has first claim on any frequencies. Given who the primary user of 70cm is (*cough cough*), I don’t think we’d ever find out if this signal is theirs.

Although I did notice that one of my suspect buildings was unmarked, with no hint of who owns it, or what is going on inside…