Browsing Posts in Technology

After my post yesterday about the ‘rallyduino’ a few people emailed me asking for the source, so I threw everything together quickly into a Google Code hosted project. I did want to get it into SVN anyway as having only local copies was starting to get me nervous.

The power regulator I’d ordered arrived last night (Turned out to be well and truly overkill, but it only cost $10) so now just awaiting the Arduino prototyping shields and I can give this a real worlds test.

So recently I’ve started playing slightly more seriously with my Arduino, I’ve even gone so far as having a plan on what the hell to do with it. For some time I’ve wanted to try my hand at putting together a homemade Rally computer and the Arduino seems to almost be the perfect platform for this (Though not without one or two shortcomings). For those not familiar with them, a rally computer in its most basic form is essentially just a glorified odometer, in other words, it measures the distance your car has gone. Very briefly the differences are:

Considerably more accurate

Can count up and down as well as being able to pause

Resetable, usually via a remote control

Usually also calculate average speed

If you want to lookup existing rally computers, I recommend you checkout manufacturer websites such as Brantz and Terratrip.

So why make your own when there’s already such good existing products? Well I can give you 3 reasons: price, openess and fun. All the units currently on the market are quite expensive ($500+) and are all very much proprietory, closed systems. My goal is to put something together than costs about $200 and is as open as possible.

Do demo what I’ve got going so far, checkout the video below:

So as you can see, the system is up and running with all the basic functionality. I need a few extra pieces of hardware (Case, power regulator and prototyping shield), before I give it a test in a real world scenario, but at the moment I’m confident things should work OK. The biggest problem I’m having at the moment is the responsiveness of the Wii nunchuck as a controller. It works OK in tests, but when you get the Arduino processing the input pulses (At around 150Hz) things start to slow down. Obviously priority is given in the following order:
Pulse Counting->Speed/Distances Calculations->Screen Updates->Nunchuck input

That’s about all for now. I’ll probably post about this again after I’ve done a real world test on a car so it will have to wait until the extra bits and pieces arive. The source code isn’t yet available (Simply because I don’t think there’d be much interest), but if anyone would like to see it, just leave a comment and let me know.

I know I’ve been promising to do another screencast, specifically showing the music player in Gloss, but I’m afraid it isn’t done. What is done however is Gloss 0.1, including a new screencast showing all its features!

Whilst being very much a developer / testing release, it is moderately stable and works ‘out of the box’ on multiple different systems I’ve been testing on. It is available for download at http://gloss-mc.googlecode.com/files/gloss_0.1.tar.gz or if you’re on a debian / ubuntu based system, an apt package is available in my launchpad PPA: https://launchpad.net/~gloss-development/+archive. If you want to check it out before downloading, a screencast is below (Quality warning: Where is the killer linux screencast app?):

So what’s actually been done? A LOT of work getting what was in there already to a stable, portable state. That’s not to say it won’t crash, some areas are still quite fragile, but everything that’s there will work given the right setup. The new Gloxygen theme has been included also. This initially started life based around the KDE Oxygen iconset, but has evolved a little bit since then. It has the advantage of being fully open licensed, unlike the Pear theme which is of questionable origin (For this reason it is not included in the apt package above).

The plan going forward is to get as much testing as possible done ASAP with the hope of having a 0.1.1 and maybe a 0.1.2 release out the door quickly. When Clutter 0.8 is released, SVN will temporarily break as the API is updated accordingly, meaning that the ubuntu Hardy package will also break given that there is no Clutter 0.8 available for it.

That’s probably about all for now. I urge you to have a play with the release above if you have a chance and log any problems you find (And you will find them) in the bug tracker!

For a long time, one thing that has always solicited gasps from my technological friends is that I run my home wifi connection without any encryption or MAC blocking. It is free for anyone within range to use without my permission and, in most instances, I won’t even be aware it’s happened.

I do this for a number of reasons, partially because I believe in openess and community, but mostly because its something that I would like to see become a common thing. If I’m away from home then typically my net addiction will kick in and I’ll want to check email / blogs. In all honesty, if there’s an open wifi nearby, chances are I’ll use it.

“The prosecution needs only to prove the communication came from a particular system. Once this is achieved the onus is on the individual to prove his or her innocence.”

What I simply don’t understand is how this fits in any way with the trusty old ‘innocent until proven guilty’ ideal. Proving that data travelled through your router should definitely NOT mean that the onus now falls upon me to prove my innocence. That same data probably passed through 10+ different routers before reaching its destination, why is it my router that gets targeted and me that gets hauled along to court facing 10 years for child pornography? Its not even reasonable to argue that my router was the last in the chain as for all anyone knows, someone could’ve bridged my wifi through another device and shared to 10 people over a wired ethernet. This comes down to the fact that I am simply the ‘easiest’ person to point the finger at and 90% of people won’t understand the technical reasons why the logic is rubbish. Really the *only* thing that proves my guilt in a case like this is the data being stored on my systems, and even then it is questionable if I’m running my connection through some form of local caching proxy.
I don’t want to point fingers at authorities for why we are in this position as my emotions would become far too unrestrained (Words like laziness and ignorance might get used), but the fact remains that clearly we need to form of official legislation in this area. In my opinion (And this is a whole other rant), it should not be illegal to use an open wifi connection without permission, the onus should be on the owner to secure it if they do not want others to use it. Of course enacting any laws that ensure the innocence of the home user running open wifi is going to increase the workload on authorities when cases come up, so will no doubt be met with serious opposition from these corners. It is a worrying trend however when the focus of law making becomes making life easier for authorities rather than to protect innocent citizens.

So for now I will continue to run my open wifi. I will lament the utter lack of technological expertise within out legal system and simply hope that this changes sometime soon (Though I won’t hold my breath). I’d love to hear others thoughts on how this should be handled froma legal point of view if anyone wants to leave a comment.

I’ve read a few blogs posts recently regarding consumer NAS devices, specifically linux based ones (See entries from Peter Hardy and Matt Bottrell) and, for the most part, these have been fairly positive. So as a warning to others, I thought I’d pop up my experience.

A few weeks back I got a call from my Dad saying he’d bought a network HDD and wanted to know if i could come around and set it up for him. No problems, I thought, should just be a matter of plugging it into his (fairly basic) network and setting up mappings on the various machines he runs.

I head around and find a Western Digital ‘My Book World Edition’ 500gb drive. It came in some fairly slick packaging (Very Apple) and generally looked pretty good. The hardware part of the install was a breeze and within minutes I was installing the ‘MioNet’ software on his main machine. My instincts had told me that installing software for a device like this shouldn’t be necesary, but one of the things it offered was secure remote access via a browser, which could come in handy at times (my dad travels a bit and is forever asking me to pop around and email him files he forgot to put on his laptop). This is where the problems started. Upon installation and reboot of the machine, the network interface was completely gone. Nothing, nada, dead. I tried everything I could think of for the next hour or so but nothing I did would bring it back. Finally I uninstalled the software, rebooted, and everything was fine again. Not the most reassuring experience.
Nevertheless, I continued, Dad can live without the crummy software as the device offers a direct SMB share ability. I setup a few shares via the devices web interface and mapped them on 2 machines. Everything seemed fine. So we started the initial backup (About 30gb of data) but almost immediately noticed 2 things:

The speed. At its best, this thing got up to about 4mb/s, pretty poor for something that was on a gigabit network (It is a gigabit interface on the hdd).

After about 1gb of transfer, the copying terminated saying that we no longer had permission to write to the share. I tried creating a text file. No go. In fact, it wasn’t until we rebooted the unit (Takes about 90secs) that we again had write access… For about 2 minutes when it again cancelled the transfer and refused to let us make any changes to the drive.

Being somewhat stumped, I called Western Digital to see if we had a dud unit. I eventually got onto a rather stressed sounding guy who advised me that this was a known issue, to upgrade my firmware and cross my fingers (ie there was no promise the upgrade would solve the problem). He also advised that the 4mb/s was about the theoretical maximum throughput of the device due to a hardware restriction (The speed of its CPU). Now, putting the firmware issue to one side for a second, how can you knowingly advertise a device as having a 1000mb/s network interface when the rest of the hardware struggles to cope with 100mb/s speeds!?! I wanted to unload on this guy, but deep down I knew he’d heard it before and that a return of the drive was already looking likely.

Getting back to the firmware upgrade. This did eventually go through (Was about an 80mb download) however it downright refused to do this until I had blanked the drive. It continually advised that there were current connections (Despite me disconnecting all shares, rebooting PC/Device, plugging a laptop directly into the unit etc) and refused to do the upgrade with these in place. Long story short, the firmware upgrade made absolutely no difference. The problem having write access still occurs for transfers over about 800mb making proper backups all but impossible.

I was almost disapointed then to discover that this device actually runs linux. Presumably the Windows sharing is provided by Samba which makes me really wonder what is causing the access problems. The unit is obviously under powered hardware wise based on its transfer rates, so I’d like to think it is dubious quality hardware causing the other problems as well. Whilst I could delve in and start tinkering to try and fix things, this is a consumer device, that was definitely not purchased to be a tinker-toy, and I didn’t want to unkowingly change something that could potentially lead to data loss (now or down the track).
The result of this ordeal is that the unit will be going back shortly, it is simply unusable in its current state, and all I can really say to other people is to avoid this device at all costs. It really is a poorly designed package (HW and SW) that will cause you move grief than benefit.

I thought I should post a bit of an update on the status of things at the moment. An article which was published on linux.com recently (http://www.linux.com/feature/135096) has generated a bit of interest in Gloss and whilst for the most part the comments have been positive, there have been a few questioning my motives and/or saying its a waste of effort to start a new project.

In many cases, these arguements are 100% correct. There’s already a number of really great projects out there, not to mention the official mythfrontend itself, where efforts could possibly be better spent, but personally that’s not what I’m looking for at the moment. The best suggestion I’ve seen so far is that I should ‘swallow my pride’ and work on an Elisa plugin getting myth functionality (ie live tv / recordings) happening there. This is something I am going to seriously consider and now that I have a reasonably complete implementation of the myth protocol in python, it shouldn’t be too hard to do. That said I haven’t looked at Elisa’s plugin structure at all and I am assuming that, like Gloss, the ability to feed data through to gstreamer should be pretty much taken care of already.

As for my motives for writing Gloss in the first place, I never wanted to step on people’s toes, I was simply intending to have something that would, at the very least, generate some discussion regarding the current state of the myth frontend and where it is and should be heading. Frankly, I don’t care if not a single person ever uses Gloss seriously, its something that currently I enjoy hammering away at and I will continue to do so regardless. Its nice to have a project of your own, where you understand it from one end to the other and where you don’t get tied up so much in the ‘politics’ and egos of open source development. Maybe I’m too thin skinned for it. That’s not to say that help isn’t appreciated and other opinions considered, just that I don’t feel I need to be continually justifying myself and my work to other people. I get enough of that every day at work.
At the end of the day, if you don’t like Gloss, ignore it and don’t use it.

OK, so with that rant over, I’ll say that the movement in Gloss has been a little stunted, but still coming along. I do hope to have another screencast VERY soon (Yeah I know I said that last time too), but I mean it this time. Beyond that, I am going to start looking at packaging things up for a 0.1 release and move onto 0.2. At this stage, the things I definitely want in 0.2 are:

Full adherence to existing myth key bindings (Actually already started, but will not be done for 0.1)

I’ve been a bit slack on the posts lately, although it is at least in part due to the fact that I’ve felt like I’ve nothing to say. I took a bit of a break from coding for a week or so as work has been doing my head in lately and have had a few technical hurdles in Gloss that are beyond my ability to fix in the ways I was hoping. That said though, I’ve got back into it the last week and made some nice, if not astounding steps forward, mostly on the music player, although there’s been a heap of little things fixed in the shared elements code. Screencast of the music interface should finally be done soon, just need to add a nice screen to show when a playlist is running. I’d like to add visualisations also, but at this stage, I have no idea how to implement such a thing.
I’ve also started forming in my head the ‘roadmap’ for what I want to put into a 0.1 release. The main items are:

All currently started modules themed and in a working state

A full readme doc written up

Proper installation packages (should go without saying I guess)

Potentially recording viewing

I’d really like to reach that sort of point within the next month or 2, but it does come down to how much time I have of a night.

One of the things I’ve been constantly delaying on Gloss is the development of the music player module. For a long time this was simply because I had no idea in my own head about what it should look like. I’ve bitched and moaned along with all the others about the existing MythMusic interface, but when it was all said and done, I didn’t have anything better to offer.

Well that is now a thing of the past. There’s a plan in my head and some code in SVN. What I’m picturing is a mix of the interfaces from Elisa and FrontRow, hopefully being a little simpler in the end. One of the crucial things I decided early on with this idea though was that it would require images. Lots and lots of images. Nobody likes sorting through a list of band names when you could be rolling through some form of pretty image display (ie Coverflow).

The obvious problem with this though is, of course, actually having the images. ID3 data in the files themselves is ok, but it really doesn’t represent the band itself. If you’ve got a band with 5 albums, which album cover do you pick to represent the band? So whilst Gloss will now pull images out of ID3’s, the solution is for the higher level pics fairly obvious, Last.fm. Last.fm offer a reasonable web service interface allowing you to get information, including images if you look hard enough, on bands, albums, songs etc. Integrating with Last.fm wasn’t too difficult, although bringing it all together is still a work in progress.
Currently, Gloss will run through your existing music collection and download (in the background) images for artists and albums, storing them locally for future use. This is a fully automated process and has about a 95% success rate. Once the images are downloaded, artists and albums can be searched in a pretty growing/shrinking image row, similar to what Elisa currently uses. I’m thinking in future that I will also pull general info about bands (description, tour dates etc) from Last.fm, but these would obviously require further DB updates, which I am hesitant to do.

So that’s about it for shiny new stuff type updates. There’s been a bit of work ‘generifying’ some code to make it usable across the whole system rather than just in specific modules. Code reuse is a glorious thing when you sit down and make things useful
Depending on how busy I am over the next week, I’d like to have another screencast with the basic Music interface up within 2 weeks, but there’s still a lot to do.

So time for another update, this time accompanied by a mini screencast. Recently I’ve been focussing on the TV functionality part of Gloss as it has been a bit neglected since it was first written. The backend streaming code has received a partial rewrite (Still very much in progress) that aims to lay the code out in a way that more closely resembles the official Myth Frontend. Needless to say I’ve been poring over this code, and when not getting confused, have learned some really interesting things. I’ve also been tuning the transfer parameters a little to try and achieve smoother, more consistent playback.
The ability to change channels is now firmly in place and with it comes a basic on screen display featuring channel names/logos/guide etc.

A couple of people have recently been on the IRC chat too (#gloss on irc.freenode.org) and have provided some really useful feedback. This has lead to a heap of compatibility bugs being corrected, as well as the addition of a –debug mode allowing a different level of verbosity in reporting.

As I said, I’ve done another screencast, but its only a short one showing some of the new features since the last video. Enjoy:

After attending Jon Oxer’s fantastic talk at lca2008, “Joining Second Life to the Real World”, and purchasing one of the Arduino kits he had for sale, I’ve spent a bit of time reading up on both the board itself and stepper motor controllers. So this weekend I finally started putting something together.

For a while dad and I have been ‘dreaming’ of fitting up a throttle-by-wire system to the (as yet not quite finished) race car. This has the advantages of being more flexibleÂ than a mechanical system as well as having the capability of multiple (potentially non-linear) throttle maps (ie one for road and one for track).
We looked for a kit that offered such a thing however having found nothing, we put the idea on the “good idea only” pile (We did also investigate pulling one out of a factory TBW car, but all have the controller built into the ECU making it an expensive proposal). The Arduino though is nearly the perfect device to act as the controller!

So anyway, without dragging on too long (I’ve not done much hardware stuff like this so it has been a series of ‘woohoo’ moments over simple things), I’ve so far managed to hook up a unipolar stepper motor (Pilfered from an old HP inkjet), a 1k pot and a darlington array to the Arduino and set the position of the stepper based on the position of the pot. The position is decided by an array lookup so having different maps should be a simple matter of changing arrays. This is, in a very rudimentary way, the same thing that a TBW system does (with the pot being a throttle position sensor and the stepper being hooked up to the carby actuator).

So whilst its still a LONG way from the end goal, its a step in the right direction. I quickly learned that the stepper motor I’m using will need to be replaced as I’ll need one with some form of position reference feedback (eBay seems to have heaps). We’ve also briefly discussed hooking the Arduino up to the pulse counter on the front wheel, adding another pulse counter on a rear wheel and creating a basic traction control system. To do this though I’d need to read up a bit on how the Arduino goes at pulse counting. Interestingly, having accurate pulse counting would also make something like cruise control a reasonably simple addition.
So lots of possibilities and lots of this to play with over the next few months