Fixing Android 2.2 Sync after Upgrading to Exchange 2010 SP1

Last night I upgraded my Exchange 2010 server to 2010 SP1. Unlike many other people’s experiences, this actually went rather smoothly, until I realised 2 hours later my T-Mobile G1 (aka HTC Dream) is no longer syncing my Email. I currently use Cyanogen’s Mod version 6 which brings the features of Android 2.2 aka Froyo to my poor ancient device (which I’m hanging on to because of the excellent keyboard!) and use the built-in Exchange ActiveSync (EAS) support to sync my email, contacts and calendar to my phone.

I read online about a few other people running Android 2.2 who had the same issue and some suggested it was a policy problem, so I deleted the default profile and recreated it, and deleted the device association on my phone and my account. Unfortunately this didn’t work either, leaving me with no email but more importantly, no contacts!

After enabling some extra logging on the server I could see it was unhappy about Android trying to get a folder sync without provisioning, but for some reason the device wasn’t attempting to apply the policy.

AccessState :
Blocked
AccessStateReason :
Policy
ResponseHeader :
HTTP/1.1 449 Retry after sending a PROVISION command
MS-Server-ActiveSync: 14.1

Curiously, enabling extra logging on the device just showed it successfully understanding the first OPTIONS request, then timing out.


[12:36:00] EAS SyncManager | !!! EAS SyncManager, onCreate
[12:36:00] AbstractSyncService | Testing EAS: example.contoso.com, domain\user, ssl=1
[12:36:14] AbstractSyncService | Validation (OPTIONS) response: 200
[12:36:14] AbstractSyncService | Server supports versions: 2.0,2.1,2.5,12.0,12.1,14.0,14.1
[12:36:14] AbstractSyncService | Try folder sync
[12:36:35] AbstractSyncService | IOException caught: Read timed out
[12:36:35] EAS SyncManager | !!! Eas SyncManager, onDestroy

Thinking I was going to have to apply my highly dubious Java programming skills to this solution, I downloaded the Android SDK and started up the emulator for 2.2. I attempted to set up my account on the emulator, and to my surprise it worked first time.

I can only imagine, Google have already patched up this issue and not yet released it, as the Android Open Source Project page for Mail.apk shows the last update 5 months ago. So I applied the best logic that I have as a Sysadmin… Scp the working Email.apk from the emulator to my server, and install it on my device. And it works! I lose the a few additions that have been made to the CyanogensMod version of Email.apk but I’d rather have it working.

If you’re experiencing this issue too and you want to apply my brute force method of fixing it and get your email syncing again, simply follow these instructions (you need root for this, but I suspect this is only a problem on modified builds):

  1. Download the 2.2 stock Email.apk from here using the Android browser. Don’t attempt to install it, let it go in to your download folder on your SD card.
  2. Open a terminal on your device. I use ConnectBot. Gain root using “su”
  3. Run: mount -o remount,rw /system
  4. Run: mv /system/app/Email.apk /sdcard/backup_Email.apk
  5. Run: cp /sdcard/download/Email.apk /system/app
  6. Reboot for good measure
  7. Set up your sync, and enjoy a refreshing beverage
    for your hard work

Disclaimer: I have no idea if this has any bad affects on your phone, your sex life, or anything and I make no guarantees about anything. If anything bad happens, it’s not my fault, you do this at your own risk! The process above makes a backup, so hopefully if you regret this you can put back the old version.

Naglite2 finally released

It’s been a long time coming (even longer than CactiView!) but finally I’ve cleaned up (as much as possible) and released Naglite2, a full screen easy to read status screen backed on to Nagios.

Naglite2

Perfect for a NOC or operations room, you get a at-a-glance view of your hosts and services status, which not only helps in sudden emergencies but also incentivise  your staff to get a “clean board” and fix the remaining niggly problems in your network!

The screen also compresses down quite nicely into a mobile browser, perfect for checking on the status of your systems whilst on the move.

The code is up over at Github, feel free to use/distribute/fork and modify or send me comments.

Get Naglite2 now

Draytek 2710 series and multi WAN IP

I recently purchased a Draytek Vigor 2710n router to replace my aging 2600plus. I’ve always had a very high opinion of Draytek routers. They’re fairly expensive compared to most home routers, but they do have a bucketload of fairly advanced features, that I was disappointed were lacking in others.

I changed ISP at the same time as getting the new router, taking out service with the (so far) brilliant Zen Internet after recommendations from colleagues especially Caitlin who used to work there before joining us at Last.fm. They’re a proper Sysadmin’s ISP, giving you a netblock of 8 IPs on a pretty inexpensive home connection.

Unfortunately for me I (foolishly) didn’t check to see whether the 2710n still supported this, since my 2600 did and I just assumed a higher model number meant it was actually an upgrade rather than a downgrade.

After a quick chat to Draytek support they told me this indeed was not available and never would be. I contemplated giving up with the 2710n and returning it, or just using it as a WAP, but I was somewhat peeved when I looked in the HTML and noticed the only reason the button was missing (the interface has hardly changed in the 5 years between the models) was because it was hidden using CSS:

<input type="button" name="btnWIpAlias" id="wIpAlias" style="display: none;" value="WAN IP Alias" onclick="wanIpAlias()">

Using Firebug, you can easily show this button and it’s functions work fine. I decided to do some more digging.

The Draytek have an excellent Telnet (and now SSH) interface too, and the functions are entirely available there:
admin> ip aux ?
%% ip aux add [IP] [Join to NAT Pool]
%% ip aux remove [Index]
%% Where IP = Auxiliary WAN IP Address.
%% Join to NAT Pool = 0 or 1.
%% Index = The Index number of table.
Now auxiliary WAN1 IP Address table:
Index no. Status IP address NAT IP pool
----------------------------------------------------
1 Enable X.X.X.110 Yes
2 Enable X.X.X.105 No
3 Enable X.X.X.106 No
4 Enable X.X.X.107 No
5 Enable X.X.X.108 No
6 Enable X.X.X.109 No

Sorted! The IPs then appear in the relevant places in the web interface too, for example in the “open ports” or “DMZ” sections. If IP routing is what you’re after (used to be called “For IP Routing Usage”) simply use the “ip 2ndaddr” command.

If you like configuration via the web interface, that’s pretty simple to enable too. Grab Firebug for Firefox, and use the “DOM” tab to display all the variables used on the current page.

Firebug DOM console
Firebug DOM console

There are tonnes of variables in here, many are set to “0”. Incredibly, all these functions do is tell the web interface to display extra features. They’re all there and available in the background, from static routing to Multi-Nat, to IP routing and extra VPN settings. You can even enable the WAN, Wizard and VoIP options if you really want to.

For Multi-NAT, double click on SHOW_INT_MULTINAT and set it to 1. For 2nd subnet IP routing, find SHOW_LAN_GEN_2NDSUBNET and set it to 1. Have a search through and enable the functions are need. By the way, this only lasts for as long as you’re logged in, so you’ll have to repeat it if you ever need to change the variables.

Before:

Before

After:

After

I will note that you should probably buy the 2820 as suggested by Draytek if you really want these features.. It’s only £40 more expensive, but saves you a bit of hassle. This guide is only for people who have been mislead and don’t want to send their routers back!

Firefox 3.6 Tab Opening Behaviour

I just updated to Firefox 3.6, yay! It took me approx. 30 seconds before I wanted to stab myself because they’ve made the default tab opening behaviour so that when you middle click a link it opens in the tab next to the tab you’re viewing, rather than at the end of the tab bar.

This probably pleases a lot of people.. I know people with extensions to do that. But it drives me crazy. I know my new tabs are supposed to be at the end, because all my tabs are in a certain order, and most of them I never close…

Anyway, if you want your Firefox 3.6 tab opening behaviour to be the same as Firefox 3.5, do this:

  • Type about:config in the address bar
  • Close the warning about screwing up your install
  • Search for “browser.tabs.insertRelatedAfterCurrent”
  • Double click it to change it to “false”.

Voila! Your tabs are back to normal. No need to even restart.

Hampshire Parking Availability and Trends

It’s a quiet Sunday-after-boxing-day and I’m wondering if I should go to the shops.

I was somewhat surprised to see that none of the large shopping centres in Hampshire give any indication of whether their car parks are full. I was more surprised to find that the Hampshire traffic information website ROMANSE gives live data on the car park status. As in, the exact number of spaces that are available updated every minute, and a couple of estimates on the number of spaces coming available soon. I actually only found it by searching for webcams of the area to try and look at the traffic on the roads, so I don’t know how many people know this wonderful resource exists.

A bit of PHP, HTML parsing and Cacti later and I’ve set up graphs to monitor how many spaces are available and the predictions. “If it moves, graph it”, my favourite motto.

So if you happen to live in Hampshire, and use any of the large car parks you can now check how busy it is, and work out the best time to visit based on the graphs.

Demonstration of a parking graph

All the graphs and details here: http://denness.net/carparks/

CactiView

It’s been a while coming and I apologise to those who have been waiting but finally I have publicly released CactiView.

CactiView

All the details are in the README inside the tar.gz, but here is a quick description for those who do not know:

CactiView gives you a clean and simple view of one graph from Cacti at a time. You can
name the graphs, and set the automatic rotation duration.

The display includes one main large graph for the last 12 hours, 3 smaller graphs with longer time periods and a couple of other bits and bobs of information.

Please let me know what you think.

CactiView is available for download here: http://denness.net/downloads/cactiview-0.1.tar.gz

Or on Github here: http://github.com/lozzd/CactiView/

Dell 5530 HSPA Mobile Broadband Card with Windows 7 64bit

If you have a Dell E4300, as wonderful as they are, you may have trouble sourcing a 64bit driver for Windows 7. It’s not listed on the drivers page on the Dell site (as of writing), nor is there even a 64bit Vista driver.

So, to google! (which is probably why you’re here after all) and there are a few suggestions of installing the 32bit driver and Dell Connection Manager. I was fully expecting to have some 3rd party software to at least connect to the network, but I wasn’t sure about the 32bit driver, so I continued on my Googling. And it bought me to a page hidden deep in the URL structure of the Dell support website. This link here! A 64bit 5530 HSPA Mobile Broadband driver for Windows 7.

It’s just listed a driver, so I thought it was a good starting point, so let’s install it. What happened next was pleasantly surprised. Firstly, it found a GPS port. Does this card also contain a GPS receiver? I haven’t managed to make it work yet, but that would be super cool… The best surprised was what happened when I clicked on the Windows 7 “Connect to” system tray icon.

Windows 7 Connect To Dialog
Windows 7 Connect To Dialog

What’s this?! I didn’t even have to tell it I’m on T-mobile, it just popped up and showed me the signal, and let me connect. No config, worked first time. From installing the driver to connected to WWAN in under 30 seconds.

Perhaps I’m easily surprised, but I think this is one of my favourite features of Windows 7 so far; it’s so nice that it’s consistent, as well as the improved UI for the “connect to” menu in general. It makes the utility for managing mobile broadband I used in Vista look like a childs toy…

That was easy 🙂

Nationwide Discontinues Support for Microsoft Money Syncing

I would consider myself to be “fairly good” with money; I like to try and save, I obsessively check my bank balance, and I use Microsoft Money 2005 to keep track of where it goes.
Microsoft Money is a fantastic little tool, even though I use very little of it’s capabilities. The ones I use mainly involve graphs and trends, and if you know me at all that won’t surprise you. It will learn that transactions with Sainsbury’s are food, and Shell is diesel. Over time it will provide me with graphs to tell me “Hey, your spending on food has increased 13% to £X” or “You realise you never spend anything on computer games but you do now?”

Of course, most people cannot be bothered with the sheer boredom of entering every transaction into Money. Some people can’t even be bothered to open a browser, log into to their online banking, download the CSV, import it, make sure it all makes sense… I am one of these people.

Until the 22nd of October 2009 Nationwide were the only bank in the UK to support completely automatic downloading of all your banking data and statements into Money. They were the only bank to EVER support it. Whereas it’s very common in the US for banks to do so, for some reason it never got a lot of interest in the UK which I think it a shame; I’ve been using it for at least 5 years through different versions of Microsoft Money and it’s worked flawlessly since then. I open Money and it instantly downloads all my new transactions, and all I have to do is approve them. It will even understands the difference between savings accounts, current accounts and credit cards, and what you get out is quick and easy to understand graphs and if you want, tips on saving money/paying off debts etc.

But now, all this is no more. Tonight I was only greeted with an error. A quick search on the Nationwide site reveals that just 4 days ago Nationwide shut off this service for good. I suppose I can’t be all that surprised, given that Microsoft hasn’t released a new version of Money for quite some time. Some Googling presents a quote supposedly from Nationwide:

“The decision to stop the Microsoft Money service, after so many years
is primarily due to the provider stopping their own support for the
product. As they assist us with any technical issues and licence us to
provide a dedicated server for this system and we will no longer be able
to do so from 22nd October, the service is no longer available. Please
note this software does not access our main online bank, as you do from
our homepage, it uses a special server designed and maintained under an
agreement from Microsoft they are no longer providing.”

These words are oh so familiar and makes the cut-off even less surprising: special server, license, support… I’m sure there is a lot of good reasons behind the scenes for the cut-off and with Microsoft powering the backend the end date was always going to come.

I do wonder, however, just how many people this affected. There was no communication at all from Nationwide or Microsoft; and searching for the issue online provides many blogs and forum posts of disgruntled users, who no longer have quick and easy access to their data. I do half wonder whether I could find out the file format of the system (OFX is a standard, if it does indeed use that) and write my own proxy that logs in and turns the data into something Money can understand. This is made even more necessary because apparently Money won’t accept a CSV, it will only accept OFX (which seems reasonably given OFX is an open standard for financial data exchange) and Nationwide won’t/don’t provide this. If they did, making the few extra steps to import my data wouldn’t be such a big deal, but as it stands it’s a huge pain.

Sennheiser CX550 Style II In-ear headphones review

I am currently in a position where I’m commuting to my job in London from the far away countryside of Hampshire. It’s a 2-3 month thing… And so far I’ve quite enjoyed it. More than anything it gives me a good 2 hours a day to listen solidly to music, whereas if I try and listen at work I get a lot of interruptions.

I had my Sony Fontopia MDR-EX71 in-ear headphones for at least 3 years and they had served me well; pretty good sound, quite bassy and comfortable. But as I was listening more and more I thought I would treat my ears, having a gift certificate for Amazon leftover from Christmas and them being in stock at a 40% reduction of the RRP. (Link goes to Amazon)

Enough rambling more reviewing. The box is very nice, and comes with a really nice carry case which I actually decided to use, a cable extension (also in use; far too short for me otherwise), a clip (not used yet) and 6 pairs of ear buds. The last item is the most confusing; I was familiar with the fact that in-ear headphones have the best sound when they have a perfect fit. However, the only instructions (printed on the back of the box) merely suggesting  that you should pick the buds that fit; they did NOT indicate what the difference between the two types of buds are. One set of 3 sizes are a standard rubbery dome, the other set are the same but with a ridge halfway down. I couldn’t work out what this was for, so I’ve settled for the non ridged variety. In the end I started with the smallest pair, which ended up being a tad small, so I moved onto the medium… Which are a tad big, but fit fairly well. I couldn’t tell any difference in sound quality between the two.

Let’s move on to the pressing matter of how they sound. I read so many reviews of in-ear headphones and which were the best for my budget, and it just made me terrified whether it was worth it at all! But in my opinion, it was totally worth it. I have a set of full size Sennheiser headphones at work, and the EQ set on my media player accordingly. I like bass. A lot. I plugged in these instead of my full size cans, and my ear drums almost exploded with bass! It sounded absolutely awful! With the EQ disabled things sounded… Perfect. (Röyksopp – Happy Up Here)

First train journey home and into the iPod (Classic), the main device these things will be powered by, and the first thing I noticed was the volume level.. Previously, I quite often had the volume turned up very close to all the way or all the way; with these I can only hit 3/4 before my ears start to hurt. This of course means a lot less distortion coming from the iPod (I still use the EQ on there to get the desired amount of bass) as it doesn’t clip.

Bass is impressive: I’ve had a mainly electronic week since purchasing simply because it sounds so great, full, deep, powerful. Kosheen, The Crystal Method, Goldfrapp, Leftfield, all sounding wonderfully full and bassy, with absolutely no distortion; the high frequencies still clear and crisp, without being harsh and thrashy. On the rockier side of things, Muse were sounding great too; beautifully balanced and once again providing equal volume without having to turn it down because of overly tinny cymbals. I haven’t found something that I didn’t enjoy to listen to yet, and having the extra volume is a plus since I have some tracks that were previously ripped at a low volume which I couldn’t enjoy listening to before because they were so quiet.

In terms of isolation, they work as expected; loud train announcements are 95% gone, everything else is a distant blur, fantastic for switching off. Actually, it freaks me out a bit much and I don’t use them all that much when walking around because I find the lack of sound a bit disconcerting, but that’s standard with these type of headphones.

Another thing that commonly harms in-ear headphones is the cable noise. A lot of the reviews of the Sennheiser CX95 (the predecessor of these) were put off by the cable noise; I personally don’t see that much of a problem when I’ve walked around with them, perhaps I listen to music louder than others; you do get a shirt clip included though, which some reviewers noted fixes the problem.

There is one other thing that lets these down; For some reason they do hurt my ears a bit after 45-50 minutes of use, which never happened with my Sony’s. This doesn’t happen every time, so I think it’s because they’re longer and you can wear them at different angles. Something to experient with. It’s the plastic hurting the exterior of my ears rather than the rubber parts inside the ear, so I think it’s probably my problem rather than the headphones.

It’s a real shame the nature of these type of earphones means you can’t really try before you buy; at least in this case the packaging could probably be resealed in a way that made them look unopened (none of that horrible plastic stuff here), but I wouldn’t want to receive a pair of headphones that someone had already had in their ears!

I would definitely recommend these to someone who was looking to purchase some headphones. Whether it’s worth upgrading from a pair worth £30-40? I wouldn’t call myself an expert, and there is no scientific test here; but I think they’re worth it. 4.5/5

Any questions, please feel free to ask in the comments.

If you’re considering buying this product, and I can recommend Amazon for their excellent service, please use the link below.