htc_one_x_wifi_banner

Fixing the HTC One X’s WiFi

A year or so back, I picked up an OEM HTC One X – which at the time was the nicest quad-core phone around that didn’t also happen to be a phablet.

Initially, I had no problems with the device, and the Android Jelly Bean update only brought better performance and a nicer UI.

Unfortunately, at some point, my device must have taken a knock causing the WiFi antenna to be less effective, dropping it’s effective range.

Luckily, this was still more than enough to be usable in most situations and I just left it as it was for best part of 6 months, after which a new update was pushed out from HTC.

Unfortunately (again…) the update changed the behaviour of the radio, causing the effective range for WiFi to drop to around a few feet, through walls, or a dozen or so if I had line of sight – thankfully by this stage I had invested in an ‘unlimited data’ plan, so I could at least leave the phone on HSDPA and still connect to the internet that way, and living in a town meant that most of the time I had more than enough signal that way.

Today,  finally my patience ran out, having struggled with this set up for a few months, and wanted to fix the actual issue – antenna replacement can’t be that hard, right?

 Step One – Getting Inside

One of the first problems with this repair is the nature of the device’s construction.

Phone manufacturers have moved away from the nice, hackable, screwed-together cases of the previous generation of phones, and started building ‘unibody’ cases, whereby the outside of the device is essentially a near-unbroken smooth finish.

Obviously this is a much nicer finish, but it does mean that DIY repairs or tinkering is made much harder.

Thankfully, the folks over at TechRepublic have put together a photo set showing exactly how to crack open the HTC One X’s case and get at it’s juicy innards.

Step Two – What Has Actually Broken?

Next, to find out what was the likely cause of my WiFi woes, I scoured the forums over at XDA Developers (who are consistently awesome!) for anyone with similar problems.

Fortunately (or unfortunately, for them and I) many other One X owners have had problems with the WiFi antenna, and the problem is fairly well documented.

Following the [HARDWARE FAULT] WiFi antenna fault post, over on the One X forums, and digging around in the links therein, I elected to have a go at repairing this myself, rather than trying to get HTC to do a fix for me (how hard can it be?!).

Another user in the thread usefully posted photographs of their own modification to the One X to fix the problem, and it was these that I used to fix mine.

Step Three – Crunch Time

Now that I had a much better idea of what had happened, and a good idea of what to fix, I set to work, cracking the case open and soldering a tiny wire between the defunct antenna connection and the antenna plate.

Soldering a tiny wire to a contact on the antenna plate. Note the additional small drops of solder on each connection point on the unibody... just in case.

Soldering a tiny wire to a contact on the antenna plate.
Note the additional small drops of solder on each connection point on the unibody… just in case.

While the user I had been following had only attached a single wire from the top contact to the antenna, in my case this did not fix the WiFi problem, and I ended up attaching both contacts.

Initially I attached only one contact to the antenna, as per the original post, which did not work in my instance.

Initially I attached only one contact to the antenna, as per the original post, which did not work in my instance.

I ended up connecting both contacts to fix the problem, after some experimentation.

I ended up connecting both contacts to fix the problem, after some experimentation.

With this done, I very carefully reassembled my phone, et voila! Working WiFi again!

Look at all those pretty signals!

Lookit Ma! WiFi signals!

Lookit Ma! WiFi signals!

Hopefully, with that, this is the last I’ll see of the signal issues I’ve been experiencing, and I can finally have my phone back to normal.

CheerLights Banner

Pulling Colours From The CheerLights API on Linux

I’m trying to do a new project associated with the CheerLights project every year, and this time, I’m using a Raspberry Pi to pull the last set of colours from the ioBridge server.

I’ll be putting a full write-up about the project itself up on here soon, but I’m still waiting for a few parts for it to be complete, but the bash one-liner is handy in and of itself, so I’ll put it here for now, in case there are others who want to start a CheerLights-based thing this year.

curl http://api.thingspeak.com/channels/1417/feed.json | jshon -e feeds -a -e field1 -u

This handy one-liner returns a nice list of the last 25 colours set by the API.

kittens_banner

Kitten Cam Offline

I’ve elected to turn off the kitten camera for the time being, as the kittens (more proto-cats now) are now so active that the camera angles almost never capture them, leading to a rather boring view of our dining room.

If the cats decide that they’re going to sleep somewhere predictable, I’ll reinstate the camera hardware – bandwidth permitting – but for now, both cameras are offline.

Thanks to the many, MANY (oh God so many pageviews!) folks who dropped by to see the kittens, and Kashka, Meeville and Malcolm (the cats), as well as Liz and I thank you all.

I’ll post photographs and updates on their progress here in the future.

Malcolm and I

Malcolm and I – Yes, he’s the same kitten as in the banner!

Arduino Banner

Arduino Batch Tool Prototype, version 1.2

I’ve been poking around in my batch tool, and have been pushing what you can do in the Processing IDE‘s add-on tool framework (turns out, not that much that’s every interesting without doing some fun Java hackery!).

With some slightly fancy trickery, the Arduino Editor now looks like this:

Stress testing the Arduino Batch Tool

Stress testing the Arduino Batch Tool

Yes, this is all loaded from an addon tool – not a rewrite of the IDE, not a custom build, just the stock editor with a single jar loaded from ~/sketchbook/tools and enabled in the menu.

Thus far, additions include:

  • A tabbed script console
  • Multiple target boards are configurable (for single-button-flash-everything functionality)
  • Multiple serial ports can be opened in their own tabs at the same time (and auto close and reopen during flash operations)

Non-visible additions include a partially implemented preferences dialog, and mutli-sketch multi-device support (flashing device A with sketch 1, flash device B with sketch 2, C with 1, etc. all from one button press, once configured).

I’ll be updating the download on the  Arduino Batch Flashing Tool page once I’m sure the tool is fairly stable.

If anyone uses this, I’d love to hear from you, especially those on Windows or Mac, as I’ve only tested this under Linux, but it should work on anything the Arduino IDE works on, as it doesn’t use any special binaries.

kittens_banner

The Kitten Cam!

The Kitten Camera – LIVE!
 

More views (in case the kittens aren’t in the box can be found here!)

Very recently, the cat we had “adopted” (read: “who had adopted us”) gave birth two three tiny kittens, and one not-so-tiny kitten.

Because various people wanted to see photos or videos of the kittens, I’ve put up the Kitten Camera so all can see them pseudo-live (there’s a delay of a few seconds or so).

For those interested, the hardware used is:

  • A Raspberry Pi running Arch Linux for ARM
  • A Microsoft VX-800 ‘Life Cam’
  • One 4G SD Card
  • One 8G USB drive
  • A fairly beefy phone charger to power the lot

I intended to use the official Raspberry Pi camera to do this with multiple Pi’s, but ParcelForce failed to deliver them in time, so the vx-800 will have to do until the better cameras are delivered.

Arduino Banner

Arduino Batch Tool v1.1

Development!

Arduino Batch Tool 1.1 - Port configuration

Arduino Batch Tool 1.1 – Port configuration

With the addition of tabbing, multiple serial monitors can be instantiated at once – and the batch tool will manage them all during flash operations (disable, write, enable).

Arduino Batch Tool 1.1 - Embedded Serial Monitor

Arduino Batch Tool 1.1 – Embedded Serial Monitor

The tool doesn’t create its own serial monitors, but instead instantiates additional Arduino serial monitors and embeds them in the tool’s tabs.

The stock IDE serial monitor should still work, as long as you don’t try to open the same port in both at the same time!

Release should be soonish, check back in the near future!

Radio Banner

434MHz Experiments

In an effort to find a vaguely affordable, 5v two-way radio solution with a decent range, I’ve been attempting to port the simplex RS-485 protocol I’ve been working on to work with pairs of 434Mhz radio transmitters and receivers.

Just a 434MHz transmitter on an ATMega32u4, for testing purposes.

Just a 434MHz transmitter on an ATMega32u4, for testing purposes.

Each node is to have a transmitter and receiver which can be enabled or disabled from code, following the same scheme as the 485 transceivers used on the wired network, and the same protocol can then be sent over wire and wireless alike.

A lashed together transciever made from an Arduino ProtoShield and a 434MHz transmitter/receiver pair

A lashed together transciever made from an Arduino ProtoShield and a 434MHz transmitter/receiver pair

However, at the moment I’m simply experimenting with the hardware to see if I can get a stable, long-ish range link using various Arduinos (Arduinae?) as my development platform.

For the curious – the JST connector on the micro board is for power, and is hooked up such that the normal polarity for a LiPo battery lines up with the GND and RAW pins on the board, hence the odd orientation.

Wildlife on Campus

Bird!

Its a ‘bird’ – they fly through the air through means modern science has yet to fully understand. This one lives on Lancaster University’s campus.

Tried to get some shots of the wildlife on campus yesterday, naturally everything vanished just as I got my camera out.

This bird was the only one to stand around long enough to get a long shot at, apologies for the poor focus – I had to take this shot on the move.

Random Web Radio Station

To pull a random radio station from my stream list, using vlc, jshon and curl on the terminal, enter the following:

cvlc $(curl -s http://johnvidler.co.uk/radio/data/streams.js | jshon -e $(shuf -i 0-`curl -s http://johnvidler.co.uk/radio/data/streams.js | tr -cd ‘{‘ | wc -c` -n 1) -e stream -u)

It’s not terribly efficient, but what the heck, it’s only ran once per radio station :)

Lions, Tigers and Site Updates, Oh My!

It’s been a while, I know, but I’ve finally got around to updating various bits on here, including and update on my RS-485 projects along with a new page for my Micro-CNC Milling Machine.

screenshot-yellow

I also have uploaded a new app to the Google Play app store, CheerLights Live Wallpaper which pulls updates from the CheerLights Project, changing the colour of the home-screen wallpaper to match the current CheerLights colour (with a latency of around 15 seconds or so).

User warning: CheerLights does seem to like ‘white’ in the early hours of the morning… sadists!

Until next time!

Upcoming Talk – Serial Communications

I’m currently slated to present a talk at the CSLU (Lancaster University’s Computing Society) on serial communications with micro-controllers.

In addition to the talk, there will be a lab session where we will be working on a simple, practical communication scheme using Arduino micro-controllers and these beauties:

11 RS-485 Shields for the Arduino

Arduino RS-485 Shields for the Arduino

All ready to solder up, when I have the stacking headers that is – shipping from Hong Kong takes way to long!

I’ll update when I have more information about the talk, and after the fact will update the ‘Talks’ page on here with the slides, should anyone want to follow along.

A New Look

Decided I needed a change on the site, something that would work across devices and screen sizes, that wasn’t fixed-width and had a more article-y feel to it.

 

This is what I found on the wordpress theme list, an it is close to those goals, but not quite there yet. Expect some alterations for a while, but I think this is much nicer than before!

At the controls of tram engine…

Took a quick video with me at the controls of the tram engine my Dad and I built some time ago.

I never reach anywhere near the top speed for the tram, as it has about a horsepower crammed into it’s comparatively small frame.

The track is 1240ft long and is 5″ gauge.

Those of you who know me might have seen the signal control unit I’ve been putting together for this track (not shown here, as the signals were already put away) and this was a full speed run to test the reed-switch based sensors in the track.

Internet Radio – Part 3 “The clock module, preview”

The motor arrived today. I’ll put a more detailed writeup when I have more time, but I stuck the new motor on the old one’s mounts (only about 1mm difference between mounting hole distances!) and spring-loaded it in place – and… well, observe.

Sorry for the poor quality – the focus length of my camera meant that to put it on the stand made it too close to focus properly.

The front of the clock module through the plastic cover

Internet Radio – Part 2

I said I would put some more photographs of the clock, so here we go. These were taken after the radio board and power connectors were completely removed.

The clock module is entirely mechanical, save for the constant-speed motor that ran the mechanism (now defunct, and 110v, yeesh.) but doesn’t it look nice!

The front of the clock module through the plastic cover

The dial on the left is the alarm rotor, which is a simple stepped cam triggering a microswitch on the back of the module – see the later photographs. The split-flap digits are perfect, no damage at all, and the action is smooth and constant.

The sleep timer, which rotates a cam past a second microswitch.

The Sleep timer rotates a small cam against a second switch on the top of the module. Nice! I spy an interrupt pin input!

The back of the clock module, showing the alarm microswitch and the back of the alarm display spindle

The alam rotor moves the metal arm shown on the right of the photograph above, and triggers quickly at ‘alarm time’ then slowly re-presses the arm against the switch over the course of approximately an hour, I spy another interrupt!

 

The switches along the top of the radio

The switches along the top of the radio are simple nPnT type, one with four position – the On/Off/Wake to music/Wake to alarm switch – and the other with two positions – the current AM/FM switch.

The four position switch will remain unchanged, both in function and device, but the AM/FM switch is obviously redundant now, and I will *probably* repurpose that as a stream/saved selector.

The switches actuate small plates behind the front panel with white markers in appropriate places.

The front panel includes a thin section along the top above the tuning gauge containing various basic indicators, composed of holes in the front panel with a sliding plastic indicator with white splotches at the appropriate position.

It is my intention to keep this top section intact for the final build, (as it covers the back of the switches!)  and all but two of the indicators make sense for the final build’s features.

The rest of the case is wholly uninteresting, and is mainly open space, leaving plenty of room for new electronics, and currently only contain the new power socket (a basic barrel-jack socket and two wires hot-glued in place over the existing grommet hole for power) and a medium-sized speaker with no markings (which will be investigated in a future post).

Until next time.

The donor clock-radio, how innocent it looks here, so unsuspecting...

Internet Radio – Part 1

I recently started working on a project I’ve been meaning to do for a long time.

I listen to a lot of internet-based radio stations, mainly Shoutcast or Icecast stations, and tend (at the moment) to do this on my phone, as I can leave it on the bedside table and listen with it charging.

But the sound quality from such a tiny speaker is… well… terrible, to be honest. While phone manufacturers are getting better at building half-decent speakers into their devices, they simply cannot compete with the much better dynamic response of a larger speaker, so the want for a better device to play music arose.

Further to this, my Fiance really hates my current alarm clock, (which displays time in binary, octal, roman numerals and boring old normal decimal) due to it’s hideous alarm, and having attempted to remedy this by cracking the case to see what could be done, I gave up due to the components mainly being surface mount and resin-blob type :’(

So. Half-decent sounding clock radio, that satisfies the Fiance-test and actually wakes me up. That doesn’t exist! Time to build it then!

I’ve started with a donor clock-radio, as shown here:

The donor clock-radio, how innocent it looks here, so unsuspecting...

It has a split-flap display! Excellent! (I love these things, and miss them from stations – they had a nice self-announcing quality as the noise they made when refreshing caught everyone’s attention without being irritating… but I digress) and the large tuning area to the right is perfect for a display of some variety!

The existing electronics were dead-on-arrival, so have been discarded (I wouldn’t feel right removing working parts from a ‘vintage’ radio) along with the 240v gear motor for the split-flap display. The power cord and connector were also discarded, and replaced with a barrel-jack socket on the back (photo tomorrow) ready for the 5v mains power adapter to drive the new electronics.

The existing speaker has been kept for the moment, until I build the amplifier I won’t know how good the sound is, but it is easy to remove, and the area it covers is easily large enough (and the new electronics small enough) to support larger drivers if required.

Unfortunately I didn’t have my camera with me during the disassembly, but photographs will be taken tomorrow and appended to this post.

So… it begins.

Enumerating PCI Devices

In a fit of ‘getting stuff done’ at 6am today, I wrote a basic PCI enumeration class, allowing my research OS to display what it has found along the PCI bus.

QEMU diplaying a list of PCI devices and their respective ID's

Acinonyx Jubatus running in QEMU, displaying the connected virtual PCI devices.

The actual enumeration itself is pretty straightforward, just a bit of indirect addressing and you get a nice structure back (sequentially) with the vendor and device IDs.

The awkward part was gleaning any meaning from those – obviously I can match an ID to a driver, but it’d be nice to output some human readable stuff so that we show that specific hardware has been recognised.

VirtualBox's PCI devices enumerated in my research OS

To this end, I enlisted the help of http://www.pcidatabase.com/ which provide an open list of PCI device and vendor IDs, as well as a C header (yay!).

Except that I’m using C++, and a fairly trimmed-down version of C++ at that, with the String libraries missing (I haven’t written them yet!) so the header won’t work without modification.

Thus, after many a minute of search/replacing, I’ve altered the header into a object/header pair (to avoid linker errors) that works with a stripped-down compiler.

In case this is useful for anyone else (god knows who) I’m attaching it here - PCIDevices.tar.gz - do let me know if anyone finds any use for it! I’d love to know what for…