Categories
Hardware Isle of Man

The Things Are Coming

Recently, I attended #offcamp – a barcamp style discussion around open data which was organised by the Isle of Man branch of the BCS and was free to attend.

The morning sessions were OK and it was good to see that some thought is being given to making data open and available, especially data that has been collected by governments and already paid for by the public.

However, what really caught my attention was the crowd sourcing of data using sensors and the Internet of Things. I hadn’t realised that the problem of expensive telecoms links for remote IoT devices is beginning to be solved by new RF chipsets based on spread spectrum techniques similar to those used in QRP amateur radio experiments.

Sadly most of these RF technologies are proprietary, but that doesn’t mean that the infrastructure built with them has to be. A group of people from Amsterdam have built The Things Network which is an open movement with the aim of providing free and open communications for IoT devices around the world.

Given my interest in radio and electronics, together with the open philosophy of building something free for community use, I knew that I wanted to get involved with this. So, I’ve established an Isle of Man community with the aim of getting our very own Things Network established here.

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
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
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
Hardware

The Weirdest Bug

Today I offered to help a friend with their new Lenovo Ideapad S205 which they’d bought a year or so previously, but not got round to using. It had come pre-installed with both Ubuntu 12.04 and Ubuntu 12.10 but wasn’t quite behaving properly.

I thought the easiest option would be to start again, with a nice clean install of Ubuntu 12.04.04 LTS. I attached my trusty USB flash drive, and…

…corrupted display, and no boot.

It turns out you can’t press F12 at boot time, and choose to boot from the USB media in the list that appears. No. You have to go into the boot settings proper, and put the USB media at the top of the list. That was Bug number 1.

So, off goes the install of Ubuntu. All looks good, Wi-Fi working, hotkeys etc… time to reboot and…

….nope. PXE boot ROM kicks in instead. Check the boot settings. Yep, hard drive set to boot before other things, but doesn’t.

Back to booting from USB…. Fiddle with grub settings. No go. OK, re-install with manual choice of partitions… still no go… fiddle fiddle… hours pass…

Finally, I noticed the drive has an MS-DOS type partition table, despite it booting EFI-style to the previous Ubuntu installs, so I decide to delete it and create a GPT one instead. Still nothing… Add an *empty* EFI partition… re-install… nope… delete all partitions again… re-install… Voila! (I’ve no idea which step was the magic one either. Bug number 2.)

So, now Ubuntu booted quite happily, but without working Wi-Fi. No worries, I’ll attach an Ethernet cable and let it pull down latest drivers…

…but hang on, it has them all.

Poke about in the terminal for a while and realise the wireless is ‘hard’ blocked. But the wireless switch on the side is in the on position. Moving it disables Bluetooth. Moving it back enables Bluetooth. Still no Wi-Fi, but at least I know the switch works! Everything driver wise seems to check out. The laptop is adamant that Wi-Fi is disabled by hardware switch. I turn to many Google searches in desperation…

What? Seriously?

Yup. On the Lenovo Ideapad S205, the Wi-Fi will not function properly unless….

…the hard disk is the first entry in the boot menu!

Bug number 3, and I hit it because of Bug number 1…

Still, all’s well that ends well, but I never want to see another Lenovo S205 again!

Categories
Hardware

Hello Chromebook

I bought my significant other an HP Chromebook 11 for their birthday this week. I’ll admit that part of the reason for my choice of gift was my own curiosity. I wanted to see how good a Chromebook was, and whether it would be a better choice to use in schools than the current (expensive) i-tablet craze that seems to be going on…

First impressions are that the device is the perfect size and weight. The keyboard is great to type on (I’m using it now), with well spaced keys that have a responsive travel and good tactile feedback. Error-free typing without looking is definitely easy on these things, so anyone who needs to write a lot would find an HP Chromebook 11 very nice. The screen is much better than I expected at this price point, with a very bright and crisp display with excellent viewing angles. ChromeOS is easy to use without training, and of course it plays very nicely with the Google Apps stuff. If you’re a heavy user of Google Apps, I’d highly recommend carrying a Chromebook around with you!

The only snag was the inability to print. Sure, you can collect your docs from Google Drive on another machine with a printer, but that’s a bit clunky. Also, given that we have a networked printer at home I wanted to be able to use that. This is another of those Linux-to-the-rescue stories, so with a bit of tinkering all is well. Here’s my solution:

  • Install CUPS onto my HP Proliant Microserver and add our network printer to it
  • Connect CUPS to Google CloudPrint with some python magic from Jason: https://github.com/armooo/cloudprint
  • Set up an application specific-password to use in my Google Account (For better security, just in case…)
  • Give CloudPrint the account details
  • In my Google account, share the new Google Cloud Print printer with my better half, so they can use it too.

I still need to tweak things so that the CloudPrint connector will start automatically, but I very rarely reboot the server, so I’m not sure when I’ll be bothered to get around to that!