Mobile


I’ve been fighting K9Mail for weeks now, trying to get it to sync with MailStreet who hosts “exchange.ms”) hosted Exchange. If you’ve already followed the instructions at the K9Mail Wiki with no success, read on.

Thanks to the k9mail wiki on debugging connection issues and the fact that I already had the Android SDK installed, I was able to solve the 2 related errors I was getting. I would either get an “HTTP 404 not found” or an “HTTP 501 Not Implemented” depending on the settings I chose. With no additional settings other than suggested in the Wiki, I’d get a “501 not implemented”. If I tried to set a mailbox path, or a WebDAV path, I’d get the HTTP 404 Not Found.

In the debugging log, I saw that the system was calling “http://mail.$domain.exchange.ms/”$webDAVpath/Inbox – if I set it to a full URL, the full URL was getting appended. When I attempted to hit those same paths in a full browser, I’d always get an HTTP 404. So, digging in my history in Firefox, I found the following (cleaned) path:

http://mail.$domain.exchange.ms/exchange/$emailaddress/

In this case $emailaddress was my Exchange mail address with the “@” stripped out. Appending “Inbox” to the end of this path resulted in a valid load of my OWA inbox.

Plugging then: /exchange/$emailaddress/ into the WebDAV box in K9Mail, and my email immediately loaded up.

Now I have Android syncing my calendars and contacts, and k9mail is handling my massive inbox!

EDIT Dec. 4, 2012: Update!  I’ve written a new update to the configuration files referenced in the post below, over here: http://www.totalnetsolutions.net/2012/12/09/lenovo-t430-running-kubuntu-12-10-for-extreme-battery-life/ so please check out the CPU and battery sections of that post.

Thanks!
/EDIT

With the popularity of the last How To on Domain Controllers, I thought we should do some more. So here�s how I�ve nearly doubled my battery life on my laptop (2 hours max with Windows to 3:30 average with Ubuntu, which was originally 2:30). I used to use a series of programs on Debian Etch which are also available in Ubuntu. However, probably because of their lack of nice GUI interfaces, they�re not installed by default. If you are more interested in increasing your battery time, however, follow along.

  1. Install laptop-mode-tools and cpufreqd
    sudo apt-get install laptop-mode cpufreqd cpufrequtils
  2. Make sure that the proper CPU governers are installed for your processor. I have an Intel Centrino Duo 1.6Ghz (which clocks down to 1Ghz).
    sudo modprobe acpi-cpufreq (or speedstep-centrino or powernow-k8|k7|k6 or longhaul, depending on architecture – acpi-cpufreq should be the most compatible)
    sudo modprobe cpufreq-conservative
    sudo modprobe cpufreq-ondemand
    sudo modprobe cpufreq-powersave

    I use ondemand and conservative – ondemand for when I�m plugged in – no point running at 1.6Ghz when I�m idle – it just heats up the system and overworks the fan – and conservative on battery life – it only steps up slowly as requires, and I can still limit it well with cpufreqd. However, having powersave available on a moments notice to keep the processor locked at 1ghz is nice.

 

  1. Add acpi-cpufreq or whichever cpufreq driver you picked in the previous step to the end of /etc/modules to force the system to load them at bootup. Ubuntu didn�t pick this up properly for me on any install yet (Dapper, Edgy or Feisty), but Debian did in Sid and Etch
  2. Now open up a terminal (or Konsole) window and edit the files (or replace them with my versions). I�ve attached my versions below.
    laptop-mode.conf
    cpufreqd.conf
  3. A few things to look out for when editing these files
    1. set your cpufreqd.conf to the proper CPU speed limits. You can get the hardware limits for your processor from
      cpufreq-info -l
      Mine are obviously (when you read my
      cpufreqd.conf) 1000000 to 1667000
    2. Note which steps are available to you. On my Centrino Core Duo, I only have 3 steps, but on one Celeron processor I saw 10 steps from 2GHz down to133MHz.
    3. Make sure in this configuration that you�re disabling CPU monitoring in laptop-mode.conf. Laptop-mode-tools seem to do this well, but when I last read the man pages, it does all its switching with the usermode driver, which is a more expensive operation than kernel mode – where cpufreqd runs at; letting the speedstep operations run as intended in the core is much more efficient, cpu-cycle-wise� which saves even more battery life. Yes, every second counts.
    4. I personally set �noatime� as a default mount option in /etc/fstab for every physical drive in my laptop. However, you�ll also see my laptop-mode.conf has �control_noatime=1� set, in case I forget, or edit fstab. This does a mount -o remount on all drives when you unplug from the wall, setting the noatime mount option ONLY on battery power. This got confusing to me, having access timestamps sometimes, so I just disabled it completely, and know that my access timestamps are 100% worthless, rather than 50% worthless.
    5. Look closely at the cpufreqd.conf that I�ve created – you�ll see several different scenarios for how to control the CPU limits, based on utilization, battery life, AC status, and even which programs are running. These are settings that work very well for me – I doubt they�ll work well for everyone, but they do cover pretty much every situation I�ve been in on battery power, from doing a presentation out of VMWare to taking notes in a 4 hour meeting. I rarely play games in Linux, much less on battery power, so I can�t speak much to that. But I can get a full DVD easily, and 2 movies if they�re ripped to DivX on the HDD.
  4. Last step is to check the brightness of your laptop. In mine, I can set the brightness on battery power vs. AC power in the BIOS. I also have controls for it. Lowering your brightness by half increases your battery life a HUGE amount. I try to keep it as low as required to see it – in a dark meeting room, that means �as low as it goes�. Being a touch-typist becomes important here, cause that�s not bright enough to see the keyboard on my system.

That�s it. For reference, this whole post written on battery power tonight, while doing other things (like cooking dinner and going for a walk), never in sleep mode. Percentage battery remaing thanks to bat-stats.sh

robert@laptop:~$ bat-stats.sh
# Using governor powersave
# Battery max design 5100 mWh, last 4321 mWh
# Using last max for percentages.
22.0319

robert@laptop:~$ uptime
23:00:51 up 3:09, 4 users, load average: 0.20, 0.14, 0.10

I have a Sprint PCS PPC-6700 Windows Mobile 5 PDA/Phone. The battery life on it is decent, considering all that it does, but I still dislike it.

Heres why: its a terrible consumer device. Its great for geeks like me who understand software is buggy and difficult to write, but I couldnt imagine any of my end users dealing with this thing. Examples:

The phone is ok, but the Bluetooth radio randomly shuts off on me. The worst is in the middle of a conversation, my headset will go silent. And its ONLY ever in the car. So there you are, driving down the street, and having to fumble for a soft-button to turn on the speakerphone. Many MANY people will mention something or other about software upgrades required, and believe me, I have them. I had them before Sprint support knew what I was talking about. Im still 100% up to date, according to Starcoms site. No, Im not going to run a 3rd party update to a business tool, like I would my own personal phone.

The device requires a reset every 3 days. I have 2 pieces of add-on software, and Ive actually REMOVED 8 installs from Sprint (from the hidden ROM, so they dont come back during a hard-reset). I installed Google Maps, because its fantastically worthwhile, and TCPMP for media playing (Windows Media Player doesnt play Cisco UNITY voicemails sent to email). Out of the box, it required a reboot every 1-2 days. After 3 days of no reboots, ExchangeActiveSync stops reliably retrieving email. The touchscreen becomes wildly out of sync (I cant hit the scrollbar anymore, usually). Phone calls actually hang up in the middle of conversations. And the phone finally wont respond to any buttons or screentaps, save for the power button.

It Phantom-Dials. Ill read an email, put the phone back in its holder, and walk down the hall. 45 seconds later, one of the recipients of the email will call me back asking me what I called them for. Best I can figure, is that the joystick is getting depressed, scrolling up, getting depressed again (on a recipient of the email), and the call button is getting hit. In the holder designed for the device, on my hip. Ive been wearing cell phones on my hip for work since I was 19 – dont tell me Im hitting it with my elbow. Having to lock your phone in your pocket is understandable. But in its designed holster?

So, what DO I like about the phone?

I dont have to open my laptop at home to watch email every night, in case something breaks. Exchange ActiveSync DirectPush in conjunction with SMS for alerts is fantastic. I turn on the sounds for text messages, but not email, and if its an actual issue, I get the alert, hear it, and respond. But if its a co-worker sending out a I finished doing this overnight work. email, I dont get woken up. Better response time for the business, more sleep for me.

Charges from USB on my laptop. On the road, this has been a life-saver.

Can install all sorts of neat software. Games, document readers, etc. Adobe Acrobat for PPC and Microsoft Reader, combined, give me hours of reading material. Especially manuals for things I have to do the next day.

Pocket IE: www.weather.com, www.opentable.com, www.google.com (which has a great mobile device reformatter). I took just my phone to New York City for a 3 day weekend, and was able to book every dinner, find directions, and verify that Ferries were open on the days I wanted to go places.

Google Maps. I use this to check the traffic of my drive on my way to the car in the parking lot, so I can decide which way to drive home. Add accurate directions that I can pull from my contact list wow.

Now I just have to figure out RAPIP, so I can plug it into my Ubuntu Feisty laptop and sync THROUGH the GNU/Linux OS, rather than just through WinXP.