Touch Pro 2 updates

As an update to a few previous posts, I decided to give HTC some credit where it is due.

HTC organised Fedex to come and pick up my Touch Pro 2 (after some confusion about the actual pickup date) and ship it off to HTC Singapore. While I was still annoyed that it had to travel to Singapore, the fact that HTC was going to pick up the tab for shipping - as well as sending it international priority (26 hours doorstep to doorstep!) made up for it.

I was expecting that my phone would be out of action until 2011 - however to my surprise, less than a week later I had a delivery from Fedex with my repaired Touch Pro 2. Later that day I even got a phone call from HTC to confirm that I had received it! Most of the issues seem to be fixed - some weren't but are minor enough to ignore.

I have to say thank you to Francis from the HTC Australia call centre (I think he is in the Philippines?) for organising a lot of this. If this level of service was standard from HTC then I would have been singing their praises instead of almost converting to an iPhone guy.

My thoughts on the NBN

I hate politics. I hate both political parties. That being said, I would support any political party that drew up the same plans for the NBN as what we have on the table. It just makes sense. Australia has been short changed in broadband and all the wonderful advances that it can make possible for many, many years.

Telstra was sold off and now are driven by making profit for their shareholders – not what is in the best interest of every Australian. This kills expansion. This gives the bush a raw deal. This is not acceptable.

The NBN isn't as much a political tool as it is a catalyst for change in ways that we never even imagined. It's about supporting business and fostering growths in IT and technology. With much faster broadband, we open up the opportunity to decentralise city areas providing more jobs to regional Australia. We open the door to working at home more. A better work life balance. More time for the family.

Screw the politics – this is about changing a nation for the better.

The plan that was tabled by the Liberals was a good attempt, but fails to address the many weaknesses of wireless technology. Noise & Distance. I've been involved with wireless for over 10 years now - and I will attempt to explain some of the reasons WHY wireless is just not up to the task.

1) Speed needs Hertz! - The higher the frequency, the more data you can squeeze into it. 802.11b/g uses 2.4Ghz and gets ~54Mbit air speed. This translates to about 22Mbit wire speed - that is close enough to 2.2 Megabytes per second.

2) The more Hertz, the more you lose! - You can only squeeze so much data into a certain frequency. The higher you go in frequency, the quicker that signal fades. This is called Free Space Path Loss. This gives us a limit on both how high in frequency we can go, and how much distance a base station can cover. 802.11b/g using 2.4Ghz can be unusable past 500 meters!

3) Noise - Radio Frequency or electrical noise is a fact of life. There is not much you can do about it. To overcome noise, you need more output power from the radio. The down side of this is that the more power you use, the more likely you are to interfere with other users.

4) Security - Wireless is a broadcast transmission. This means that EVERYBODY can see what you are doing over your connection - as long as they can hear your signal. This means that over several kilometers there may be 50+ people who can eavesdrop on your connection. Encryption can solve this, however even current wireless security encryption can be cracked in as little as a few minutes.

There are still more reasons as to why wireless is not suitable for large scale deployments to entire suburbs - however I believe that these are some of the more basic ones that would cause major issues. In short, Fibre is one of the best solutions available. It will give us the flexibility that the copper network has since its installation - but without the limitations of copper! That is something to be really excited about.

More on the ongoing HTC drama

I've still been talking to HTC regarding my faulty Touch Pro 2. I even managed to get the case escalated to someone who says they do this all the time. He has agreed that HTC should cover the postage costs as per the Warranty Statement in my previous post and that he'd get back to me with more details within 24 hours. Sadly, this timeframe expired yesterday.

He did however inform me that the repairs may take up to 4 weeks plus shipping. I objected to that as this would mean that the phone has been off under warranty repair for 8 weeks in its lifetime. Apparently this has been raised with HTC management - I'll wait and see what that actually means!

Sendmail and 'partly-there' domains

Just recently I had to set up a sendmail server for an office with 7 local users and more roaming users. The current setup had all users checking email via POP3 to the ISP. This is an issue as email sent locally within the office passed over the ADSL connection twice. Sendmail however is quite difficult to work with when it can't handle the entire domain. As not all users on the domain have an account on the office server, email would bounce back as user unknown - even though a POP3 account existed with the ISP.

Read on for more.

I'll write up a dummy scenario to make this clearer.

  • local1 - Checks email on the local server via IMAP. Server downloads email via fetchmail and throws it in the users IMAP mailstore.
  • local2 - Same configuration as local1.
  • remote1 - This user doesn't have an account on the local server but gets email via the ISPs POP3 mail account.
  • All users have the same domain name in their email address. For this example, we'll use

    The issue starts with a couple of common problems. a) If we put in /etc/mail/local-host-names, then email between local1 and local2 will be handled locally - which is great. The problem though is that mail between local1 and remote1 will bounce with a 'user unknown' error.

    b) Having a smarthost defined to send email out via the ISPs mail server will also mean that mail between local1 and local2 will also go to the smarthost - essentially uploading it to be downloaded again. This adds delay and also slows things down.

    To fix this, we can use the virtusertable to rewrite the addresses of the email addresses - but by default, sendmail does not run the virtusertable on any addresses of domains it does not own.

    We can however modify our with the following code to tell sendmail to run domains we specify through the virtusertable! The code is as follows: FEATURE(virtusertable',hash -o /etc/mail/virtusertable.db')dnl LOCAL_CONFIG F{VirtHost}/etc/mail/virtual-domains

    Now we can add the domains we want to run the virtusertable on in /etc/mail/virtual-domains:

    The final step in this solution is to then specify what users we want to rewrite to be local users. This is in /etc/mail/virtusertable: local1@localhost local2@localhost

    Now when we test these addresses using sendmail -bt from the server, we see the address translation happen: # sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> > /parse Cracked address = $g Parsing envelope recipient address canonify input: local1 @ mydomain . com . au Canonify2 input: local1 < @ mydomain . com . au > Canonify2 returns: local1 < @ mydomain . com . au . > canonify returns: local1 < @ mydomain . com . au . > parse input: local1 < @ mydomain . com . au . > Parse0 input: local1 < @ mydomain . com . au . > Parse0 returns: local1 < @ mydomain . com . au . > ParseLocal input: local1 < @ mydomain . com . au . > ParseLocal returns: local1 < @ mydomain . com . au . > Parse1 input: local1 < @ mydomain . com . au . > Recurse input: local1 @ localhost canonify input: local1 @ localhost Canonify2 input: local1 < @ localhost > Canonify2 returns: local1 < @ intranet . mydomain . com . au . > canonify returns: local1 < @ intranet . mydomain . com . au . > parse input: local1 < @ intranet . mydomain . com . au . > Parse0 input: local1 < @ intranet . mydomain . com . au . > Parse0 returns: local1 < @ intranet . mydomain . com . au . > ParseLocal input: local1 < @ intranet . mydomain . com . au . > ParseLocal returns: local1 < @ intranet . mydomain . com . au . > Parse1 input: local1 < @ intranet . mydomain . com . au . > Parse1 returns: $# local $: local1 parse returns: $# local $: local1 Recurse returns: $# local $: local1 Parse1 returns: $# local $: local1 parse returns: $# local $: local1 2 input: local1 2 returns: local1 EnvToL input: local1 EnvToL returns: local1 final input: local1 final returns: local1 mailer local, user local1

    Checking against any other email address should show the normal delivery method - either normal MX lookup and delivery, or via a defined smarthost.

    HTC - When warranties go bad

    As a lot of you know, I got myself a HTC Touch Pro 2 a few months ago - and boy - am I starting to regret it. I bought the phone in March - it was returned under warranty in April, and now has to go back under warranty again. Read on for the full details of how HTC support is more than useless in looking after its customers.

    The full story: Optus (my carrier) have rolled out an extensive 900Mhz 3G network over most of the regional and non-metro areas - so it makes sense to have 900Mhz 3G support. Sadly, Telstra seem to be the only carrier that has the Touch Pro 2 in Australia - which means it only supports 850Mhz & 2100Mhz. For this reason, I purchased my Touch Pro 2 directly from Singapore - as they are the only location I could find (other than Europe) that has support for 900Mhz & 2100Mhz 3G services.

    I purchased my phone on 12th of March 2010. The phone arrived on the 18th of March. Great so far! I unwrapped the box and fired it up and was VERY impressed. I spent hours exploring every new feature. After a few days, I had it set up in a way that was just right for me and was getting very used to using it quickly and efficiently. Then after 2 weeks, the USB port died.

    It was certainly a hardware fault. The USB port was not detected via Windows, nor could the bootloader show it connecting via USB. With all my time dealing with HTC devices, I knew this meant a warranty return.

    I started off contacting HTC Australia - which then handballed me off to the "Global Warranty Service" area of HTC - which means calling HTC in Singapore. Sure I thought, after reading the Warranty Card. This should be nice and easy. How wrong I was.

    First, I'll draw your attention to the HTC Warranty Card. Specifically this part:

    9. In the event of Product failure, the Customer should take the following actions: a) Refer to the user manual in order to identify and possibly correct the problem. b) If the problem cannot be resolved by reference to the user manual the Customer should then contact the dealer where such Product was purchased or visit your local HTC website, or HTC service center or for further information. c) Before the Customer contacts HTC service agent, please ensure the following information is at hand: • The model and serial number, IMEI number of the Product. • The Customer’s full address and contact information. • A copy of the Customers original invoice, receipt or bill of sale of the purchase of the Product. HTC will provide the Customer with instructions regarding how and when the defective Product should be returned. HTC will pay costs in connection with both the return of the defective product to HTC and the repaired Product back to the Customer if the Defective Product is within the Warranty Period.

    Awesome! HTC really stand by their product - or so it seems. In reality, as soon as you contact HTC regarding the warranty, you realise that not only do you have to pay for shipping directly to HTC, they will also hold your device to ransom until you pay the shipping costs back to you FROM HTC as well! Sadly, I didn't find this out until AFTER HTC already had my device. After lots of arguing with HTC Singapore, they decided to be nice and pay the return shipping costs. To make matters worse, until HTC contacted me to say I had to pay the shipping costs, I couldn't find out if my phone had even been received by HTC!

    So after 3 weeks of having no idea where my phone is or even if HTC were going to send my phone back to me, a package arrived with my repaired phone. In the box was a report telling me that they had replaced the LCD module and main board. Essentially, all they left the same was the case. This would normally be good news - however it goes further than that. When I received the phone back, the keyboard didn't fit in its spot properly and felt warped. To add to this, the LED behind one of the keys is always stuck on full brightness. Surely this shouldn't have even passed the QA on the repair - let alone be shipping back to a customer in this shape! That being said, I figured I could live with this - as I really did not want to go through the support process with HTC again!

    Now lets fast forward to October. Oh no. The USB port has died again. The exact same symptoms as before. This time however, there is a new twist. The battery drains VERY fast. A full charge that used to last 48+ hours now only lasts 12. This is not good.

    I started talking to HTC Singapore again. After a while of talking to them on the phone, I realised that this wasn't going to get anywhere. Anything beyond basic English is well beyond them. They cannot understand why I am annoyed at the whole process and they refuse to do anything but 'ship it back to us, pay us and we'll look at it' - paraphrased from broken English of course. After almost 4 weeks of waiting for them to get back to be via either email or phone, I decided to contact HTC America.

    The good news is that HTC America actually understand English! The bad news is that they seem to be just as unwilling to help. After expressing my deep concerns about the entire process, Alan (referred to later as HTC Guy) tells me that in all reality, after paying to ship my device to HTC, I might be waiting 2 months for the repair, then the time for shipping back to me. Oh, and I have to pay for shipping both ways.

    So, after about an hour talking to HTC Guy, I finally asked for a copy of the Global Warranty Statement - as it sure as hell isn't the one that is on their web site. After a long time on hold and lots of consulting with a supervisor, I get asked for my return number and they will get back to me with some details of what the actual Global Warranty Statement is - as nobody could seem to find it.

    edit: After 24 hours, no reply from HTC at all. For some reason, I am not surprised.

    At the moment, all I can see is that the lovely 12 month warranty will consist of 1 month in transit, 2 months at repair facilities, 3 months of being faulty, 6 months of normal usage (if I'm lucky!).

    It even got to me so much that I wrote letters (yes, actual postal mail letters!) to both HTC Taiwan and HTC America. Surprise, surprise though - no response to them either as yet.

    Digital CoPilot Update

    Its been a while since I've given an update on my Digital CoPilot project. Things are progressing VERY well - The new WAC charts from AirServices should now be accurate to within 85 metres - which is 1 pixel! Route planning is completed and the device is currently being flight tested. A few bugs have been found and have been ironed out, but all in all, everything is slowly coming together.

    SELinux on XFS filesystems

    I've been a huge fan of XFS for many, many years. Its quick, its efficient, and it works very well. Times have changed however since the first time I used XFS. There seem to be a lot of misinformation on the web of using selinux with XFS - mainly about the size of the required inodes.

    A bit of history Ok, so in a filesystem you have these things called inodes. Inodes basically store information about files and folders, such as (user and group) ownership, access mode (read, write, execute permissions) and file type - Wikipedia.

    SELinux stores an extended attribute in the security namespace as part of the inode. Now the key part - if the inode is not big enough to fit its usual data and the extra selinux data in, then a block from the filesystem is used to store the extra data. This usually means that the system will use 4Kb of space for around 50-60 bytes of additional data.

    This is a problem. Not only because we waste 90% of the 4kb, but for performance as well as for every read to this inode will also require a read of the 4Kb block associated with the inode - wherever that may be on the filesystem.

    The misinformation Many sites around the web say that it is better to use a 512 byte inode. This will just about guarantee that all information required is in the one inode. This used to hold true - however these days, XFS uses a different method to write these inodes.

    This means that the data for 99.9% of files will fit within a 256 byte inode - and it may even increase performance to do this. The change can be seen in Eric Sandeen's post to a bugzilla report regarding this subject.

    This is summerised as such:

    Ondisk format extension for extended attributes (attr2).
    Basically, the data/attr forks now grow up/down from either end
    of the literal area, rather than dividing the literal area into
    two chunks and growing both upward. Means we can now make much
    more efficient use of the attribute space, incl. fitting DMF
    attributes inline in 256 byte inodes, and large jumps in dbench3
    performance numbers. It is self enabling, but can be forced
    on/off via the attr2/noattr2 mount options.

    So what does this mean? In short, if you are using XFS and SELinux together, you should do perfectly well with the defaults of your XFS creation by the OS installer. Running xfs_info /dev/sdaX on your system will allow you to check the size of your inodes (isize) and if attrs=2 has been set on your filesystem creation. You should see something like:

    meta-data=/dev/sda3              isize=256    agcount=4, agsize=15112064 blks
             =                       sectsz=512   attr=2
    data     =                       bsize=4096   blocks=60448256, imaxpct=25
             =                       sunit=0      swidth=0 blks
    naming   =version 2              bsize=4096   ascii-ci=0
    log      =internal               bsize=4096   blocks=29515, version=2
             =                       sectsz=512   sunit=0 blks, lazy-count=1
    realtime =none                   extsz=4096   blocks=0, rtextents=0

    If you do, all is well. If not, lodge a bug with your distro!

    Oh, and if you want to check your existing XFS partition for out of inode data, run the following: for FILE in find / -xdev; do xfs_bmap -a $FILE; done | grep -v "no extents"

    This will list all files that have an extra block allocated for extended attributes.

    Linux on the Desktop

    It's been almost an eternity since I've had Linux on any desktop. Fedora was known as RedHat Linux, Ubuntu didn't exist, and Windows XP was the norm (and some argue it still is!). While I've always used the Redhat Enterprise Linux (RHEL) clone CentOS on server systems, I've strictly run Windows or OSX on all desktops.

    Things changed recently when I got myself an Asus EeePC 1005P netbook. It's quite a nice machine - but it just seems to thrash around a little under the shipped Windows 7 install. It doesn't get any better replacing it with Windows 7 Ultimate either. I'd heard a lot about running Linux on netbooks on the various geek sites ( etc) and I figured I'd give it a try.

    With my RHEL background, I decided to go with Fedora 13. Installation was painless, it booted and just ran. With about half the memory footprint of Windows 7, the increase in speed was quite noticeable. A faster hard disk and things would be much nicer - especially if I swapped out the standard HDD for a solid state drive.

    As far as compatibility goes I was more than impressed. The onboard wifi, bluetooth, ethernet, even display controller were detected and ran perfectly - right out of the box. Power management seems to be much better implemented. A few simple scripts later and I had the Super Hybrid Engine working correctly as well. Much, much better than my last attempt at linux on the desktop!

    What impressed me even more is that I turned up to do a contracting gig and needed to print to the office printer. The first thing I thought was "oh no, here we go". Imagine my surprise when I pointed Fedora to the printers IP address and away it went. No external drivers, no fuss. Even advanced features like duplex printing worked out of the box.

    In summary, Fedora has come a long, long way since the RHL days and I've been using it every day for around 3 weeks now with no major issues at all. Keep up the good work!