Monthly Archives: October 2012

Hack-The-Hub Prototype

These days, I ordered the first bunch of hardware for my recent home automation project. However, beside all the sensors and actors I want to put into my home, I also would like to monitor and control as much devices as possible. Therefore, I came up with a little prototype to check whether some of my devices are online or not.

Candidates for my prototype where my

  • Thecus N4200PRO  (NAS)
  • Lexmark Optra S 1255 (LAN-enabled laser printer)
  • Canon PIXMA MG3150 (WLAN enabled inkjet printer/scanner)

My first thought was about using a tool such as Icinga for monitoring purposes. The tool is open source, well supported and used by many IT Pros in large companies. Icinga is based on NAGIOS, providing a REST API and a AddOn mechanism. However, the overhead to learn everything from the scratch was to much.

For now, I just wanted a prototype to verify whether my ideas work or not or if there are maybe any showstoppers.

While implementing the prototype, programmatically checking the availability using a simple ping was quite easy as the NAS and the laser printer both use a static IP address. However, the Wi-Fi-enabled inkjet printer uses dynamic assigned IP addresses from the DHCP server.

For the inkjet printer, only the MAC address is known. Chris Pietschmann wrote quite a nice post how to wrap arp.exe in a small .NET class, though.

For those not familiar with ARP, ARP is the acronym for Ethernet Address Resolution Protocol and was originally specified in the RFC 826arp.exe is a small Windows command line tool, allowing you to view the address translation tables.

“Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP).”

Based on this, I wrote a small client capable of checking whether any device talking over TCP/IP is available or not if either the IP or the MAC is known.

Hack-The-Hub Prototype

Boot Camp Windows 8 – Me haz Drivers?

Works on my MachineYou own a MacBook Pro? You run Boot Camp? You run Mac and Windows? You want to upgrade to Windows 8 but you still hesitate because Apple has not released a new Boot Camp version supporting Windows 8? First of all: I did it. I have to admit, I haven’t spent a single though on drivers before I upgraded to Windows 8 – and still I just blog from Windows 8 on my MacBook Pro.

What happens when I upgrade?

If you upgrade, some devices will work some won’t.Even if the Microsoft Upgrade Assistant does not show any incompatibilities with any of the MacBook’s devices in its report, they probably won’t work.

Windows 8 Upgrade Assistant Report

After installing, Windows 8 will show various devices in the Devices list indicating, there are no drivers available. Other’s simply won’t be detected at all, e.g. Windows8 won’t be able to detect the MacBook Pro’s WiFi at all. Function key, keyboard backlight won’t work and the graphics chipset might reset the screen resolution between the MacBook’s native resolution and something about 800×600 from time to time.

Where to get the Windows 8 drivers for my MacBook Pro?

To solve the driver issues, you simply start the Boot Camp Assistant from your Mac OS and follow the instructions until you find yourself faced with the following dialog.

Boot Camp Assistant Task

Chose Download the latest Windows support software from Apple and continue. In the following step follow the on screen instructions either burning a DVD/CD or copying the files to a USB drive or any folder accessible from Windows (don’t drop the files to the Mac OS’s partition, though).

Will it blend work?

Restart Windows 8 and insert the disc, stick and select the setup.exe in the WindowsSupport folder. This will install a whole bunch of drivers.

Boot Camp Windows Drivers

Based on Apple’s Boot Camp 4.0 FAQ , the Windows Support Files contain the following drivers

  • Apple Bluetooth
  • Apple Keyboard Support
  • Apple Remote Driver
  • Apple Trackpad
  • Atheros 802.11 Wireless
  • ATI Graphics
  • Boot Camp control panel for Microsoft Windows
  • Boot Camp System Task Notification item (System Tray)
  • Broadcom Wireless
  • Intel Chipset Software
  • Intel Integrated Graphics
  • iSight Camera
  • Marvel Yukon Ethernet
  • nVidia Graphics
  • Cirrus Logic Audio
  • Realtek Audio
  • SigmaTel Audio
  • Startup Disk control panel for Microsoft Windows

Once installed and the machine restarted, everything seems to work fine, the Windows Bluetooth and Boot Camp icons are shown in the notification area, light sensor, FaceTime camera and sound work perfectly and the graphics card runs smooth like butter.

Windows Networks under Boot Camp

One last word on function keys – they won’t work out of the box. You have to start the Boot Camp Control Panel from the tray and switch to the Keyboard tab.There check the Use all F1, F2… box.

Boot Camp Control Panel

Windows 8 on the MacBook Pro is a great experience even without touch display and retina. Upgrading without checking for the drivers of course was a greenhorn mistake. However, I hoped (yes I know indeed, hope is not a strategy) during the inplace upgrade, Windows will keep the drivers. However, the fact that all drivers still work, clearly shows that the driver architecture from Windows 7 to Windows 8 did not change at all. That’s good as manufacturers do not need to update drivers in a hurry based on a new architecture, but on the other side it shows that there are not that many improvements how Windows deals with the hardware. But again, maybe this is not necessary at all.

Before you upgrade to Windows 8, run a backup! I did so using Acronis True Image 2013. Even without thinking about drivers, I was not sure whether the upgrade process with Boot Camp on the machine will maybe brick my box. Also run a backup of you Mac OS partition using Time Machine.

Said that kids, please bear in mind, that this worked fine on my machine, and might fail on yours. Also there is probably no support from Apple for Boot Camp 4.0 running Windows 8.

Because you’ve been so impatient with the Upgrade Assistant – How to get the Windows 8 ISO File

Windows 8 is there. Two days are gone and after waiting so long, you probably already purchased and downloaded Windows 8, as Microsoft came along with a time limited offer for a great price model, if you already have a PC running Windows XP, Vista or Windows 7

Once you run through the purchase process (they accept credit card or PayPal), at one point after the download finished, the Windows Upgrade Assistant comes up with the following dialog:Install Windows 8

Because you’ve waited for so long you are quite impatient and go straight  for the first option because you think you can create the media later one… If done so, the Upgrade Assistant will install Windows 8. Eventually, there won’t be any option to create the media later on.

What now? If you just need the files, you can turn on hidden files in Windows Explorer (it’s now in the Ribbon). You will see a folder ESD on the root of your drive containing a Windows folder with the downloaded installation files. Go ahead and make a backup if required.

Hidden ESD Folder

If you try to create an .iso file using the Upgrade Assistant again, you probably fail by getting the following result.

Windows 8 isn't available for download

In case you still need (or just want) the .iso file, there is a way to obtain it. First of all, check your mail for the order confirmation of your Windows 8 copy. At the very top of the mail, you will find a link to download Windows again.

Thanks for your order

Following the link, you will download the Windows 8 Setup (windows8-setup.exe). Once started this will straight let you choose whether to install, download or to postpone the installation as seen above. Chose Install by creating a media and either choose to burn a DVD to to copy the files on a USB stick (3GB required, though).

Choose which media to use

You will be asked to choose the place where to save the .iso file, after which the download process starts immediately.

That’s all you have to do. Whether you have been impatient, clicked to fast, did not read carefully or just clicked ‘next’, ‘next’, ‘next’, there is still a way to get the .iso file afterwards.

How to get the favicon.ico from any Page

Recently, I was in the need of retrieving the favicon.ico file from a website. As I had to process the file programmatically and render it on a website, it would have been quite a lot of manual work to get the .ico file and make sure the browser does render it in the correct way. After digging around, I learned about a secret URI probably provided once by Google’s social bookmarking service Google Shared Stuff. While Google Shared Stuff was launched in 2007,  it was already discontinued in 2009. However, this one URI seems to work perfectly maybe because it is still used within Google extensively.

The Secret

To get the favicon.ico file from any arbitrary page you simply have to use an URI using the following pattern:

http://www.google.com/s2/favicons?domain=www.example.org

Eventually, this URI will provide you the following image: Image retrieved using http://www.google.com/s2/favicons?domain=www.example.org

How it Works

Some More examples to see how it works:

  • Facebook
  • TechChrunch
  • aheil blog
  • Google
  • dotnetpro Magazine
  • heise.de
  • Google+

As most of the sites do keep their favicon.ico file right in the root of the web site, others like Google don’t. Actually, you might find Google’s plus icon located at

https://ssl.gstatic.com/s2/oz/images/faviconr2.ico

While this is probably not a problem retrieving the favicon.ico file using the standard URI at all, the secret URI provides one major advantage: you’ll get the icon as a nice 16×16 PNG file, ready to be rendered in any <img> tag right away.

The Risk

As every time building up on a Google service as I did before, it might disappear tomorrow without notice leaving your site with quite a bunch of 404s though. Even worse, as it seems there is no official support for this URI, there won’t be any notice or deprecation period until switched of as done for other services like Feedburner.

Inbox Zero – Does it Work?

Recently, I explained to a colleague the idea behind inbox zero which was introduced by Merlin Mann. Since I introduced inbox zero more than a year ago  for my personal mailbox, I literally save time each day.

How does it work?

Four simple steps are the secret behind not using your mailbox as an personal wikipeda:

  1. Answer it
  2. Archive it
  3. Transform it into a task
  4. Delete it

And for heavens sake, do not use any highly sophisticated taxonomical folder structures to archive your mail. Use one (or if really required just a few) archive folders. The search capabilities of today’s email clients are outstanding or if you are using a IMAP server searching by using the server’s database engine is just aewsome. If you are not satisfied with your client search engine try tools like xobni.

Does it work?

Zero Inbox - Please do not stop, nothing to see here...It does. For example, to maintain my inbox in this (zero) state, did cost me 14 Minutes this morning. This morning, there was noting to answer, and nothing that important to archive. I had to change a few mails into tasks while I was able to perform most of them immediately.

  • I got the information about an updated MEAP e-book from Manning, so I downloaded book and deleted the mail
  • I got an information someone asked a question on a blog comment I wrote, so I answered it
  • I got a request to write an article from the chief editor, so I created a task in my backlog
  • I was told there is a new credit card statement available, so I downloaded it.
  • I was informed, there is a new O’Reilly e-book available in my personal book list, so I simply kicked of the DropBox sync (which is an awesome feature, I wrote recently about)
  • I got a link about an interesting blog article I should read later on, so I created a task in my backlog

Why does it not work for you?

You tried inbox zero, but it does not work for you? Your mailbox already contains an endless list of mails? Here are some reasons this happens to many of you:

  • You maintain no backlog or todo list, neither written nor digital. Of course there is no place where to keep tasks.
  • You have a list but it now has as much tasks as your inbox mails before. So you tend not to move any mails in there as tasks… That’s another problem as you do not work on your tasks… I’ll probably write up how to do so in a further article.
  • You don’t transform mails into tasks, because the tasks are boring, stupid or just unpleasant… Probably that’s what happens to most of you.

If you have a look at the task list above, there were many things not being pleasant at all. Downloading the books is just stupid work, a task you perform again and again (I already consider to write a script for that). O’Reilly provides this great synchronization feature to DropBox. Still leaves you to log in to yet another site and find the download list to kick of the sync, though.

How to improve the annoying?

What would keep me from performing these tasks? What’s the most annoying thing I had to do? Right, I had to sign into four different portals to perform tasks. I use a tool that speeds up this process and does not keep me from doing my actual work. I simply use the Firefox plugin Password Hasher which allows you to quickly create and use passwords for different sites.  Eventually, the annoying task of logging in into different sites became less brain busting and therefore, I have no reason to put the mails on the back burner anymore.

MacBook Pro’s Bluetooth Gone Fishin’

Today, I spend literally hours in trying to fix a hardware problem on my MacBook Pro as the Bluetooth suddenly went fishing without saying anything to me. Said that, I run Apple’s Booot Camp with Mountain Lion and Windows 7 which makes troubleshooting sometimes easier, sometimes harder. As I turned on my MacBook Pro this morning my Microsoft Wireless Notebook Presenter Mouse 8000 (great device but a way too long name) mouse was – let’s say – working but not working. Left and right button and mouse movements worked fine but the mouse wheel as well as the middle button did not work at all. I followed some simple debugging rules from David Agan’s book Debugging The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems how to analyze faults in systems.

For the Impatient Ones

Jump to the very end of this article, do not learn anything, do not improve your analytic skill by one but see how to fix it.

Check The Plug

First, I checked the Microsoft IntelliPoint software (Still working? Latest version?) and it said there is no Microsoft Mouse connected.

No Microsoft Mouse Detected

Next step, I checked Windows Device Manager telling me here is a unknown device. Maybe Windows did not know, but I was pretty sure the device Windows did not want to know anymore today was the MacBook Pro’s Bluetooth chip.

Unknown Device

I checked the device properties and found that

“Windows has stopped this device because it has reported
problems. (Code 43)”

What kind of problems, you’ll probably never known.

Unknown Device Properties

If you dig a bit you’ll probably come along the TechNet entry for Error Code 43 saying

“A device driver notified the operating system that the device failed.”

With some years of experience in this kind of business, I tried of course

  • kicking the laptop (most of the time works quite fine with other people’s hardware)
  • rebooting several times
  • un- and re-installing the device drivers
  • running Windows’s Hardware and Device troubleshooting

Make it Fail

As nothing worked out for me, I rebooted into OS X to figure out if the device fails here as well and found a similar situation – Bluetooth went into its weekend saying

“Bluetooth: Not Available”

Eventually, that’s no driver issue, that’s definitely a hardware problem. One machine, two operating systems, different drivers (well module in OS X) resulting in a similar failure. Saturday noon and a not that satisfying Apple Store density in Germany, there is little one could do before next Monday. Hardware dies; usually at the most unpleasant moment you can imagine and nothing you can do about that.

Bluetooth: Not Available

Get a Fresh View

I did not follow the debugging rules in their given order, but I always try to keep the rule Get a Fresh View in mind. Often one is biased by some ideas in ones mind, some posts read while doing research or personal previous experience.

Eventually, I remembered what I have learned about power cycles during studies and realized that rebooting nowadays is not a hard reset of your machine anymore – there have been times (I do still remember) when PCs provided a (at least by me frequently used) reset button causing the device to hard reboot by turning the power of and on again.

So what’s the difference by rebooting the laptop several times, or booting into another OS? Right, this is no cold start and probably all devices keep their previous (faulty) state even after the reboot. As a consequence, plug out the power source, turn of the machine – leave it for a few seconds and turn it on again. Bluetooth is up and running again for both, Windows and Mac OS.

Geeks in Teams – Team Geek by Fitzpatrick and Collins-Sussman

teamgeekSome weeks ago, I came across a quite interesting title from O’Reilly Media, Team Geek by Brian W. Fitzpatrick and Ben Collins-Sussman. There are quite a lot of books out in the shelves trying to explain how to behave as well as how to improve your life as a professional programmer. However, most of them are either hard to read, difficult to understand or just boring while repeating stereotypes over and over.

Team Geek is quite different, though. It seems the book benefits from the experience of the authors. Both come up with a bunch of experience working at Google and probably dealing with quite a lot of people during their professional life.

The Content

Six chapters, each about 20 pages – some with topics you probably never thought about and others just confirming what you ever thought of but never believed in. And that’s basically what you most benefit from. The book shows you are not alone with your thoughts how teams and collaboration should work. It’s about you as a developer (as a human thing) but also working in a team of geeks (often not understood as humans at all).

The Truth

Based on my very own experience during my professional life, I have to acknowledge almost everything the two authors write is true. Considering the fact, the book is written based on an US American context, with different culture, people and background, most of the topics are true for European developers as well. It seems the kind of human becoming a developer is the same all over the world. Whatever if it was during my time in UK or Germany, the you can apply many of the patterns provided in the book to your daily job.

The Reader

Professional developers, managers, team leads, architects, open source developers and even designers could benefit from the book. However, I would definitely recommend to already provide some experience in this kind of business to fully understand (i.e. to feel with the authors) what’s written and to benefit from the book. Not sure if beginners (e.g. students) or juniors can benefit from the book. Eventually, the reader will find some hints how to improve his or her daily life within a world of geeks and nerds and how to strengthen the very own standing within the company or group.

Pros

  • well written and easy to read
  • chapters of the right size to read during an evening
  • nice illustrations (not a reason to buy but really nice to look at)
  • great content
  • references for further reading given

Cons

  • terrible to useless index
  • not suitable for juniors and beginners (but that’s fine)

Where From

You can order the paperback or the Kindle version from Amazon or get the entire set of digital formats directly from O’Reilly.

A Pi’s Home

A few weeks ago, I ordered my very personal Raspberry Pi. I ordered mine with element14 from the UK. Actually element14 is Farnell, which in turn is well known in the UK. In fact, we ordered many times with Farnell during my time at Microsoft Research in Cambridge when we needed sensors and stuff for our projects.

The Case

I also picked a case for 6 Euro from RS Components which is available in white, black and sort of transparent plastic.

Raspberry Pi and Case

The board firs perfectly into the case, even with a little bit of fiddling. To fit the board into the bottom part of the case you need to bend the circuit board quite a bit so it moves under the clips.

Fitted Board

At bottom side the case provides quite good rubber stands with a quite good friction. Even with all the cables in the Raspberry Pi, the case should be relatively stable – considering the weight.

Raspberry Pi Case Bottom

Once assembled, the case look pretty nice – all ports and slots easily accessible.

Assembled Raspberry Pi Case

Still working through the Raspberry Pi’s possibilities, it now looks at least much more like  something you can put on your desk.

iPhone 5 Battery Review

Almost three weeks after receiving the new iPhone 5, I wanted to write a few words about the battery life of the new iPhone. If you check out the Apple support forums, you might find thousands of people complaining about the battery drain of the new iPhone.

Also you find dozens of tricks how to extend the battery life by turning off all kind of features (which make the phone interesting  in the fist place).

Battery Life Now

iPhone 5 Battery LifeAfter three weeks, I have an average usage similar to the following screen:

Given six and a half hours of usage and 41 hours of standby, I have to charge my phone every seconds day, which is similar to my previous iPhone 3GS and iPhone 4/4s I am aware of.

To Lithium Ion or Nothium Ion

I did not turn of any features and I did not re-install my phone from the scratch. I restored my iPhone 3GS backup and kept all the settings. I have turned on WiFi all the time and most of the time I use Bluetooth as well. Also 3G is turned on all the time. I have some calls and write several text messages during the day, but I do not switch the phone of during night (but do use the new do not disturb mode). I check Facebook and Mails a lot during the day, read tweets on a regular base and check in as often as I can using foursquare.

When I used the phone during the first few days, the battery did no last longer than eight hours (i.e. the phone turned of before a working day was over). I “calibrated” the battery in letting it drain completely and loading it up to 100% several times – which is a very questionable technique considering the underlying technology.

The lithium ion technology is a quite clean technology. There shouldn’t be any learning effect on the battery, the first charge should be as the 20th and fully draining the battery should not affect its overall capacity.  One of the few drawbacks of lithium ion batteries might be their complete failure after two or three years.

The last then percent of the battery drain quickly when being used, however, after the first three weeks the battery seems to be fine. Alexander Olma run some tests on the phone with extensive traffic usage resulting in 3h non-stop downloading bits and bytes until the phone turned off.

Due to the lack of data for comparison (i.e. data I can access), I can’t say whether there are other smartphones out in the wild with extensive longer battery life than the iPhone 5. However, a fully charged phone can make its way through a normal business day and a nice evening while still waking you up the next morning.