Rfduino Chip vs Thermometer

Well, I’ve now debugged a few issues with my scripts from my last post.
(made them a bit more fault tolerant and actually take notice of $? exit statuses) .
Recap: Temperhum (USB) -> Raspberry Pi -> Xively chart, now also
RFDuino (bluetooth wireless) -> Raspberry Pi -> Xively chart

Tip:  If you’re struggling with the bluetooth on linux giving rx timeout errors (check the syslog if it’s not in the console),
update the software with the following commands:

sudo apt-get update
sudo apt-get upgrade

The Rfduino has been sitting next to my usb Temperature and Humidity sensor for a few weeks collecting data.

IMG_20140514_223244041r
RFDuino and Temperhum

Since it had been both collecting data for a few weeks and sending them to Xively / Pachube / Cosm, I had a quick look to see how closely the readings match.

Rfduino vs thermometerr

The graphs do show correlation, thank goodness, but it looks like the RFDuino’s temperature scale isn’t right. The RFDuino is only updating the graph once a minute whereas the Temperhum is 2x a minute.

I didn’t really expect great accuracy for the RFduino thermometer seeing as it’s measuring from the chip. But this would still be useful in some more basic cases.

I think next on the roadmap for the RFduino is connecting sensors/remote controls (it would be cool to attach my RelaySockets to this and control the 2 connected relays via bluetooth from my Pi and Android smartphone!

 

My Humidity and Temperature sensor

A Temperhum from PCSensor.

A great little bit of kit – once you work out the conversion values for the C++ USB/i2c/HID code that lets linux talk to the thing!

Mythubuntu 12.04 and Radeon 9200

Hi all, I was having trouble installing Mythubuntu 12.04 on an old PC I had lying around.
Mythubuntu is based on Ubuntu 12.04 so if you’re struggling with the ATI Radeon 9200 on there these steps should help.

(Since I have a Hauppuage Nova-T 500 dual freeview pci card from old projects, and a 2tb drive from new ones, I wanted to see about recording some films!)

Basically, when booting it would come up with a garbled, black or blank screen.

If this happens during the livecd boot, preventing you from installing, when you see the logo:

Logo that appears when first booting ubuntu from livecd.
Logo that appears when first booting ubuntu from livecd.

Hit enter, and F6 for other options, select nomodeset, hit enter to enable then Escape and enter to boot.
If operating from a laptop, you might want to try noapic too.

 

In the latest grub setup – grub 2 – the boot menu is hidden, making it near impossible to access.
Might make it look pretty but is major frustrating for troubleshooting!
The script /boot/grub/grub.cfg it uses is supposed to boot in textmode if it has failed to boot, but this does not work.

The fix:

Note: you can login, type

sudo su

and then skip typing sudo with every command below (it gets quite annoying I know!)

  1. To access the grub bootmenu, hold down shift – after all your pc’s bios and add-on cards bios screens have disappeared and until it pops up – it takes a while to appear!
  2. To access the console – textmode, insert the word text and remove ‘splash quiet’ from the kernel options,
    also insert the word nomodeset
    then press F10 or Ctrl-C to boot with the new settings.
  3. Connect to the internet, if using Wired connection you may need to connect (hopefully you connected ok during the install)

    sudo nmcli -p con up id “Wired connection 1”

    If that doesn’t work check your wireless connections names with and edit the above command appropriately

    nmcli con

  4. Install xserver-xorg-video-ati

    sudo apt-get install xserver-xorg-video-ati

    (don’t freak out when you see ‘Removing Mythubuntu-desktop’ it seems to come right in the end.

  5. Create a new link for the X server
    (Not sure why this breaks after the upgrade but it won’t work without this step!!)

    sudo ln /usr/bin/Xorg /usr/bin/X

  6. Edit the default bootmenu script
    Add nomodeset to the default grub bootmenu

    sudo nano /etc/default/grub.cfg

    Change this line near the top:

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
    to
    GRUB_CMDLINE_LINUX_DEFAULT=”nomodeset”
    #”quiet splash”

    The # tells it to ignore this bit, it’s a backup so that we can make it quiet again later. You’ll notice text streaming by as the system boots instead of the cute (Myth) Ubuntu …. logo

    Ctrl-X to exit, type s and Return to save

  7. Update grub

    sudo update-grub

  8. Reboot and Revel in the shinyness

    sudo reboot

I actually ran this command to to start the windows manager, (and I haven’t tried rebooting yet, shhh)

sudo start lightdm

If you have any extra trouble, comment below, check the ubuntu forums and google.
I managed to work this out on my own as I couldn’t find the answer!

 

I also created a script to set the resolution of lightdm at boot, following the guide here:
LightDM Resolution

This did not work as when I started lightdm, the resolution was set higher than I’d set in lightdm, so I don’t think this was part of the fix.
Thankfully it was within my monitors capabilities. I think I set the output name wrong.
I need to figure out the display outputs are available but couldn’t query it from the command line without x running, which seems kinda silly.

Hope this has been helpful!

Sports headphones Review

I’ve been looking for a really good set of headphones to use while doing extreme sports (Bocking) which has got to be the best test of how well the headphones stay in your ear!

I’ve tested a few different sets headphones designed specifically for sports (jogging) and ones that are not (in ear/noise isolating silicon ones.
Here’s a short review with ratings 1-5 (where 5 is best) in various categories. Scroll to the bottom to find out the overall winner!

Sennheiser Mx55 ((£15 from HMV)
Comfort 4 (can get a bit unconfortable after a few hours in)
Sound 5 (excellent sound quality)
Volume 4 (Not as loud as i’d expected, but also doesn’t leave my ears ringing after listening with my player on full volume)
Quality 4 (the snap on interchangeable covers designed to let you bling it up a bit are pointless and come off too easily. I’ve superglued one already, but at this price, who’s complaining?!)
Hold/fit 5 (they stayed in for hours while i bounced around, amazing!)

EDIT: Superglue the rubber bits on too, they fall off in pocket!

Skullcandy in ear
Comfort 4 (pretty comfortable until i took them out then found my ear holes were quite sore)
Sound 3 (good, but lacking something, and no matter of EQ tweaking could give me that…too crisp)
Volume 5 (ear blisteringly loud :()
Quality 2 (poor, the metal mesh on one of them fell off after about a week, and then the speaker on that side got kind of bent in and the volume halved)
Hold/fit 2 (fall out often, not suitable for jogging/sports)

Sony Active MDR-AS20J Ear Clip Sports Headphones ~£12
now it’s been a little while since i used these headphones so forgive me if i’m a little less specific. These have got to be my second favourite since the Sennheiser MX55.
They disappeared a while back and I can’t seem to find them anymore 🙁 lol.
Comfort 4
Sound 4
Quality 5 (survived being chucked into my bag with various implements until they disappeared)
Volume 4 (not as good as the in ear ones obviously, but louder than the MX55’s)
Hold/Fit 4 (the stay on, but its a bit fiddly to get them on)

Sennheiser CXII300 In ear noise isolating ~£30
These were quite expensive for me, but sounded greate and lasted ages. The hold while Bocking wasn’t too bad (it helped taping the cable to my neck with a plaster to prevent tugging).
I killed them by accidentally snagging the cable on a street sign and turning round. The cable separated at the connector.
Comfort 3 (got a bit uncomfortable after an hour or so)
Sound 5
Quality 4 (good, rubbery cable didn’t seem to kink and was easily wrapped but the rubber cable ends on the buds slid down after a good few months of kicking around in the bag)
Volume 5
Fit/hold 4 (not best suited to sports, the cable always caught on my clothes and dragged them out of my ears. Better fit than the skull candy though.)

My recommendation? Get the Sennheiser MX55. Great hold and sound quality for an amazing price. I don’t miss the volume, my hearing seems to be improving now (i think a volume rating of 5 is excessive!!).

The in ear/noise isolating ones especially the sennheiser were pretty good, but i quite like being able to have some sound from the surroundings. Even though the hold was pretty impressive for something not secured to your ear, the cable always won and ended up yoinking them out of my ears.

Edit: added comment to Senheiser Mx 55 section.

Day 7 – A week & building pcs

Wahoo! I’ve been able to post every day for a week! I wasn’t quite sure that I’d manage it. I’ve come quite close (half an hour) to failing.

Had some advise and help from a colleague working on my new desktop – pulled the motherboard back out of the case, and rested it on the anti-static bag. Plugging it back into the PSU, and then using the on-board power button (Yay, don’t need to use a screwdriver 😉 ) to initiate it. But, the same thing that happened as in the case – power flicked the CPU fan and on-board led lit up, but the system didn’t POST.

So, with the CPU socket clear, the board is DOA1. So, I guess I won’t be playing RA3 for a while.

Here’s two photos, as asked 🙂

  1. Dead On Arrival aka never worked properly

Day 6 – Kicking hardware into working

I spent this evening building my new computer, getting it all plugged in with the cables tidied away in a small (read a little too small) case.

3 hours later, everything is connected. Moment of truth… and nothing happens. Red light on the motherboard, not POSTing. 1 On initial power, the CPU fan twitches.

I’ve seen this one happen once before – the motherboard is probably touching the case. (A hardware guy at work also suggested that it might be fluff in the CPU socket, bent or damaged pin.) You can get plastic sheets to put under the motherboard. Last time, I and my brother used sellatape – put it over the pillers the motherboard is raised on, and then screwed through the sellatape. Before I try something quite that drastic though, tomorrow evening I’ll try taking the board out and check its raise clear from the case. I’ll probably also remove one or two of the pillers.

I did mean to take pictures of building it, but then I though, who would be interested?!  Heh, I’m just dumping this from my mind as I haven’t had time to prepare anything else… If this is actually interesting to you, please comment 😉

  1. The Power On Self Test is the basic test a computer goes through when you switch it on. Hardware information is displayed on the screen (unless its been replaced with a logo), and at the end of it, it normally beeps if its OK. Otherwise, it doesn’t make a sound.

Day 5 – Datacentre work

Today, I was planning on scanning through NaBlogPoMo’s blogroll and pick out a couple of good ones. However, life always likes to intervene, and at about 1730 a server decided to fail. Wouldn’t boot up, nothing on the console.

As I’m on call this week, it was my turn to head into the datacentre, to have a look and try to fix it. For some reason, whilst it was showing network lights (so the network card was obviously initialized), it wouldn’t show anything, nor would it respond at all to server commands. I was planning to switch the hard-drives into a spare server, but a colleague of mine called to say that I should first reset the BIOS. (Take the battery out, short the contacts).

In the end, doing that cleared the problem, and the server came back online OK. A little confused – it thought it was 1400, rather than 2100, but apart from that it was fine.

I’ve only ever seen that trick work once before, on an old desktop machine. Still, that’s a good thing to try – if the BIOS confuses itself into oblivion, you can reset it by taking the battery out and shorting the contacts. (With a screwdriver is normally easiest – you’ll probably just have used it to open the case.)

Another hardware trick I often use, I’m not sure how relevant this will be if you’re not in the UK – Plug the computer you’re going to work on into a power socket, but make sure the socket is off at the switch. The earth pin is never disconnected – the switch will only ever interrupt the power flow, not the earth. So, if you’re not sure about static electricity in your environment, its a good way of making sure you’re clean – as the earth will be connected to the computer’s case via the PSU 🙂

A quick spelling / grammar question to those reading – is “online” a valid word, or should it be written “on-line”? I’m never certain, but my spell checker seems to think that it should be “on-line”…

Day 2: Church

Yay! I’m actually going to get to church this week, for the first time in 4 weeks 🙂

(Yes, for those readers who don’t know, I’m a Christian)

Reasons I haven’t been to church the past 3 weeks:

  • Week 1: Moving servers from old datacentre to new one
  • Week 2: On-call busy weekend. Worked 22 hours in 24, I was asleep Sunday morning. There’s a story in that itself…
  • Week 3: Moving servers again. Yay, 2 down, 1 to go.

So this week I get to go to church, and next weekend I don’t, as we’ve got the last server move. I’ve been trying to find a new church at the moment, which is harder than it sounds in London. At the moment, I’m going to one that my friend (and old youthleader) Roger is working for 🙂

If anyone reading knows Rog and Terry – Roger has picked up Terry’s ‘Bones’ 😉

Week 2’s story… A server failed during the day (partitions went read-only) and so I had to go to the datacentre, to replace the hardware. (That was when I was twittering about a debian install being stubborn about picking up mirrors. In the end, a reboot and reinstall from scratch sorted it – its routing table was stuffed.) Started to go in at 2000 Saturday, arrived back in town at about 0030 Sunday. ish.

Anyway, that’s enough rambling. I need to run to catch the tube 🙂 Hopefully tomorow’s blog will have a bit more content and a little less rambling 🙂

Move Complete :)

My blog’s move is finally complete 🙂

As I said, my new RSS feed is available from https://kirrus.co.uk/feed/

With the move, my commenting system is now open, and does not require registration. Be patient for comments to be posted – the first time you post, your comment will be moderated. Also, I have a set of spam filters that may be a little too exacting; if a comment hasn’t gone up after a while feel free to contact me.

As well as the blog move to WordPress, had all three interviews. On the final interview I was offered the job and I accepted it. I started two days after the interview (thursday). Yay! Currently, my commuting time is a total of 5 hours a day, so I’m already thinking about moving closer to the office.

Interview – I had to take a brief test, which was interesting. The first section was grammar, one of which we had to find what was wrong with “LCD Display” and “PIN number”. Later, it turned out, that the website of the company which I’m now working at has a very similar error, with “ZDR reboot”. Fun fun.

I will be working on a theme for this blog shortly – this is a stock “K2” theme. I saw that elwoodicious is using K2, and it seems to be quite handy 🙂 (Look at the footer for a link to info about K2)

Photographs – My memory card reader is ready and waiting next to my laptop for me to download another batch of photos from my camera, so the next post will be the best out of that batch.

Computer – I’m back on my laptop, because my new hard-drive has failed in a very similar way to the old one. I’m guessing that theres’ a problem with the PSU or SATA PCI control card.

General Update Ramble

The following is a random update, covering everything from my explorations of Linux to life stuff. Feel free to skip if you don’t care 🙂

Hardy Release Party

Was really nice, once I’d got past my initial reluctance to go and the butterflies in my stomach as I traveled to it. I said on IRC before I left, that the first person to recognise me, would get a drink on me. Daviey failed, he was outside having a cigarette when I finally arrived. To be fair, he wasn’t on the IRC channel when I said about the free drink… I managed to get lost, walking from the tube (Embankment) on the way to the pub – asked directions three times. Had the obligatory chat with Daviey about asterisk (I like asterisk!) and some of the pros and cons of the FreePBX interface add-on. (As suggested by Popey on the mailing list. Thanks!)

I went in with Daviey, and saw Alan Pope. He was in the middle of a conversation, but was about to say “hello Kirrus” to get his free drink, when Josh (Jerichokb) popped up, and nabbed it first :). Funnily enough, we had this conversation on IRC before I left:

<jerichokb>    Kirrus: thank you in advance for the beer :)
<Kirrus>       jerichokb, don't count your chickens...

Heh… I guess he can count them after all 🙂

I had a really nice time, which is *really* unusual for me in a room with that many people in it. (I don’t do lots of people… I normally can’t cope, and leave asap, or sit in a corner hiding…). Sad to leave at 9, but I got lost 4 times(!) on my way back to the tube station, (asking for directions each time… one guy gave me dogy ones…).  Next time I find a good map. Missed the train I was aiming for, and ended up taking the last train, got home midnight. (Yes, three hours travel. Missing the train will do that for you.)

Distro Experimentation / Hard Drive Failure

Well, my CentOS install died with my harddrive, about 2 days after my posting about it. CentOS is useable, and is quite nice, though I didn’t reinstall it when my new drive arrived. Unfortionatly, it turns out that my new drive has some bad blocks on it. Repaired the filesystem using “e2fsck -c” on the live cd, and reinstalled gutsy. Upgraded to Hardy RC. A lot of work. I’m going to have to boot back into the LiveCD sometime and check the filesystem again, to see if there’s any more corruption. If so, I’m going to have to get another Harddrive, and RMA this one. Just what I didn’t need with my dwindling savings and no job. Update:(Thanks, as always, to the Ubuntu-UK irc guys for the help and advise as I tried to repair my partitions)

Jobs

I’ve had 2 interviews so far, one at Codian, one at Canonical. I’d  really like to get the Canonical one (working in a datacentre, looking after servers), as it sounds like an enjoyable thing to do, that and giving me plenty to learn. But, I don’t think I will. (Heh – my natural state after any interview. Then getting the job is a pleasent surprise rather than a disappointment.) Millbank tower is NICE, and the commute into Vauxhall fairly simple.. I just take a slow train from a town about 3 and a half miles away… an hours walk, or 15/30 minutes cycle depending on the traffic, and which way you’re going. (To is easier. One big hill up, then mostly downhill to the station.) I’m still awaiting a reply from Canonical HR about blogging guidelines as applied to interviewees, so I won’t go into too much detail about that interview here. Suffice to say, it was interesting.
The Codian interview was by far the most difficult, I was asked a tonn of questions by three different people, over 2 hours. Decimal to binary (on a whiteboard).. I’m a bit rusty at, not having done it much before, but got there in the eventual end. Decimal to Hexadecimal, mathmatics is not my strong point, but again, got there in the end. (6E == 110).Very friendly receptionist 🙂

I’ve one interview/meeting left, at Positive Internet. Sounds interesting…

If you know of any Junior/Trainee Linux/Ubuntu-Based jobs in London going around, let me know.

To Do:

  • Process, upload and blog photos. Recharge camera’s battery (rarely need to do!)
  • Continue Job Hunting.
  • Look at the feasibility of moving onto a new blogging platform, but staying with my current email and domain host.
  • Hunt for jobs.
  • Bug Triage.
  • Think about applying for temp work to tide me over.

Useful Ubuntu Things to Remember

  • To open a terminal in Ubuntu, go to Applications > Accessories > Terminal
  • To add shortcuts from the applications listing to your desktop or top/bottom panel, browse to the location of the program under applications, click on it DON’T LET GO, and drag it to the bar at the top, or onto you desktop. Let go.
  • To run a unattended upgrade on an (K/X/U)buntu machine use the following command in a terminal:
apt-get update; apt-get upgrade -y
  • If you only want the upgrades to be downloaded, and not installed as well, then use this one (I think, this hasn’t been tested, and you could probably do it a bit more neatly with -dy):
apt-get update; apt-get upgrade -d -y
  • Most linux variants store their programs (e.g. lspci) under /usr/sbin
  • To force evolution (linux version of MS Outlook) to close completely, open a terminal, and run the following command:
evolution --force-shutdown