Apple Mac

A Lovely Bug in Mac

The Niceties

One of the niceties of OS X (since 10.6 Snow Leopard) was its ability to directly connect to a Microsoft Exchange Server (as long as it has service pack 2 or higher.)  One of the things I like about Mac Mail is the fact that it is a dedicated app.  While Microsoft Outlook isn’t “bad” I find that when I want to look at my mail and my calendar it forces me to switch between the two.  Mac Mail and Calendar being separate apps makes this much easier. I like the fact that they address two different work domains and thus two different apps.

The Bug

At my day job I am using 10.9 Mavericks.  As Apple makes it quite simple, I was easily able to connect to my employer’s Exchange server.  I knew that the “automatic” feature of checking email in Mail’s preferences didn’t work very well for receiving new mail in a timely fashion.  So, I simply set it up to poll for new mail about every 3 minutes.  I’d set it up similarly before at a previous employer and it had worked quite well.  However, I noticed after about an hour, I would stop receiving emails.  I could close Mail, then reopen it and I would start receiving mail again.

Screen Shot 2014-04-16 at 8.53.09 PMWhen opening up the “Activity Window” via the Window->Activity you can see the ongoing operations.  What I saw when I stopped receiving mail was that it appeared to be hung while reading mail.  The picture to the right what looks like when successfully querying Gmail.  The stop sign icons allow you to stop requests.  Similarly on the hung Exchange Server request I could cancel the current operation and the subsequent requests would work again…for awhile.

No Solution, Yet

It seems this is a known bug and Apple suggests a solution.  Their solution is effectively “turn it off and turn it back on agai“.  Other suggestions imply it manifests itself in a variety of ways all of which make not very useable other than ensuring you are no longer bother by emails (since it will stop checking them).  I got so frustrated I have resorted to using Outlook on the Mac.

The forum post suggests that Apple isn’t handling an edge case of authentication negotiations and dropped connections.  While Apple might argue “Microsoft isn’t doing it right” it doesn’t matter from the perspective of your users, Apple.  Mac Outlook works and older on Lion works.  If it requires a bit of a hack to fix the issue, then solve the problem of your user’s pain, Apple.



Embedded Development, Linux

Building a Cross-Compilation Environment for the BeagleBone

Do What?



Want to write a native executable for the BeagleBone?  You have a few options.  One is to compile the code directly on the BeagleBone with the native compiler that is included with the BeagleBone distribution you are running (if it includes one).  The other is to use a cross-compiler and compile the code on another computer.  This first option will work fine for smaller programs and the official distribution for the BeagleBone is Angstrom Linux-based and includes a compiler.  However, compiling on the Bone itself will be slow for large code bases (like the whole Linux kernel.)  Cross-compiling is better suited for bigger software programs and is much faster on modern PCs.

Here are a simple set of instructions for building the cross-compiler tools for two of the more popular Linux distros to allow you to compile native applications for your BeagleBone.  This information isn’t new and I’ve included the links to the original material below.  However, I’ve added a few tidbits more of information for compiling in either an Ubuntu or CentOS.

What OS Do You Need?

This tutorial assumes you have already installed Linux natively on your hardware or as a virtual machine.  I used a VM in VirtualBox to accomplish these steps.  One VM was an Ubuntu variant (Xubuntu to be exact) and the other VM was CentOS.  Both worked well.  Ubuntu seems to cooperate better out of the box with the VirtualBox Guest Additions to allow the VM to operate more seamlessly.  This is primarily because the base Ubuntu distros include more packages.  CentOS is a slimmer default install but will work fine, too, with some manual tweaking.  The Guest Additions are helpful for things like cutting-and-pasting text to and from the guest OS and for resizing the VM to fit various window sizes.

I allotted both CPUs of my dual-core laptop as well as 2 GBs of memory to the VM.  This much memory is required for the build as the OpenEmbedded/Yocto compilation process builds up some large caches that require the memory.  Anything less than 2 GBs will likely cause build failures.  Once the cross compilation tools are built, you can reduce the amount of memory for the VM if need be.

Note, too, that the build process will generate almost  20 extra Gigabytes of data.  Therefore, count on sizing the virtual hard disk of your VM to be able to handle this file data.  I typically use a dynamic type disk in VirtualBox, but only allocate a small portion of it to the OS.  This let’s me grow it later.  I started out giving Linux only 40GB of a 120GB disk.  My CentOS VM started out at about 3 GB and grew to almost 23 GB.  In retrospect I probably should have gone ahead and given it 100 GB so as not to have to worry about do other kernel builds while maintaining my old ones.  I can always resize the partition later.

Get the Linux Packages You Need

Before the Angstrom Link process will completely build, you need to ensure you have all the required packages on your build OS/VM/PC/Computerthingy.

UbuntuPackages for Ubuntu

Using apt-get, acquire the following packages for your build:

sudo apt-get install git subversion gawk texinfo texi2html chrpath diffstat gcc gcc-c++ libgcc libstdc++ make

CentOSPackages for CentOS

Using the yum installer, acquire the packages below for your build.  Note that if you followed the CentOS instructions for setting up the Virtual Box Client Additions, then you will have already acquired some of these packages so this will progress quicker:

su -c 'yum install git subversion gawk texinfo texi2html chrpath diffstat gcc gcc-c++ libgcc libstdc++ make'

Grab the build scripts

To start the build process you’ll next need to grab the build scripts. These build scripts are based on the OpenEmbedded project’s build system of BitBake recipes.  This system is an alternative process of constructing Linux builds vs. the Buildroot method.  The build scripts are responsible for pulling down the required source, setting up the build environment, and then executing the build.  First, from your main user directory, make a directory to hold the build scripts.  I often named it “development” but you could name it “Francis”, “lemonmeringue”, or “portuguese_antelopes” if it makes you happy.

mkdir development

Change directories into this directory and retrieve the build scripts from the official Angstrom repository:

cd development
git clone git://

Note that the distribution of Angstrom Linux I was running on the BeagleBone which I was testing was an image created in November of 2012.  Since I pulled the latest version of the Angstrom distro and followed the generic instructions for building the BeagleBone kernel and libraries, I’m assuming it will work with the latest, too.  I had tried using the latest version of the official BeagleBone Angstrom distro (June 2013), but experienced trouble with the gadget driver not even showing up (at least when interfacing to my MacBook.)  This build compatibility implies that the kernel version has stayed similar enough to be binary compatible with BeagleBone builds in the last year or so.  If the builds aren’t binary compatible (compatible to the kernel headers) the application just won’t run.

Tweak It a Smidgen

The default build configuration will delete the kernel sources once the build is complete.  This might be annoying if you want to make any tweaks or changes.  So, you’ll want to edit the configuration to prevent this.  Open the file “conf/local.conf” file (that is within the “setup-scripts” directory) using your favorite text editor and comment-out or remove the following line:

INHERIT += “rm_work”

You can comment it out by inserting a hash, “#”, in front of the line.  I chose to comment it out.

Build It Already!

From the terminal prompt within the “setup-scripts” directory type the following three commands in succession.  The first will take about five minutes to execute (depending on the speediness of your computer).  The second less than a minute.  And the third will really depend on how fast your machine it.  My CentOS VirtualBox VM running in a host OS of OS X 10.8 on a 2.3 GHz Intel Core i5 took about 3 hours.  The three commands are:

MACHINE=beaglebone ./ config beaglebone

… lots of output gets spit out after this one …

MACHINE=beaglebone ./ update

… lots of output gets spit out after this one …

MACHINE=beaglebone ./ bitbake virtual/kernel

… lots of output gets spit out after this one ….  Here are the last several lines of the output from my successful build:

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL, attempting MIRRORS if available
WARNING: Failed to fetch URL, attempting MIRRORS if available
WARNING: Failed to fetch URL, attempting MIRRORS if available
WARNING: QA Issue: linux-mainline: Files/directories were installed but not shipped
NOTE: Tasks Summary: Attempted 907 tasks of which 249 didn't need to be rerun and all succeeded.

Where Are They?

The cross-compiler executables are located in the directory listed below.  The path to this directory may be different for your build, but will still be similar.


The contents in this directory are:


Build a Simple App

To test that the cross-compiler is working, let’s build an incredibly simple “Hello World!” type application.  First, make a new directory from beneath your development directory (or whatever you called it) and name it, “howdy”

mkdir ~/development/howdy

Then cut and paste this text into a text editor and save it as howdy.c in your newly created directory:

#include <stdio.h>

int main(void)
   printf("Hey you!  Yes, you, the big nerd in front of this monitor!  This program worked.\n");
   return 0;

Next, update your path environment variable like so (you can make it permanent if you want by adding it to your .bashrc file.):


Then compile your file to get a simple executable:

arm-angstrom-linux-gnueabi-gcc -o howdy howdy.c

You should see that a “hello” executable file is created.  One that you can’t run on your Linux build box, by the way, since it is for the BeagleBone.  Next, copy this file to your BeagleBone (using “scp” if you have a network connection is the easiest).  Try to run it and it should spit out the the correct text.  That’s it!  Here’s the “scp” command I used to copy my compiled file from my VM to my network connected BeagleBone whose IP address was

scp howdy root@

And here’s the output on the BeagleBone:

root@beaglebone:~# ls -al
total 32
drwxr-xr-x 3 root root 4096 Jul 14 02:09 .
drwxr-sr-x 3 root root 4096 Nov 21 2012 ..
-rw------- 1 root root 139 Jul 14 02:05 .bash_history
-rw-r--r-- 1 root root 20 Nov 22 2012 .bashrc
-rw------- 1 root root 623 Nov 22 2012 .viminfo
drwxr-xr-x 2 root root 4096 Jan 1 2000 Desktop
-rwxr-xr-x 1 root root 7866 Jul 14 02:06 howdy
root@beaglebone:~# ./howdy
Hey you! Yes, you, the big nerd in front of this monitor! This program worked.


Much thanks to these two posts from where I regurgitated all this material.


6502 Was The Second Assembly Language I Learned

Saw this link today and it took me back 20 years.

The first assembly language I learned was for the Motorola 68000 as part of a college class (circa 1992).   Motorola 68000 assembly is a beauty of clarity to behold and quite easy to learn.  I came home for the Christmas break and saw my old Commodore 64 sitting on my desk.  Thinking, “Dang, now this thing makes sense!” I ordered a $15 C compiler and assembler for it.  I wrote a few small programs in 6502 assembly and then never used it again, but had tons fun over Christmas break basking in my new computer enlightenment.

I had written Basic programs on the C64 that “PEEKed” and “POKEd” values into memory, but I never quite understood those machine language programs and how they related to assembly language.  Even after reading tons of computer magazines as a high schooler, the relationship between machine language and assembly language never really “clicked” in my head.  What was lacking in my reading was a nice tutorial like the one above in book form.  Of course, there were no computer classes of that level available to me in rural Western North Carolina and I was hacking in a vacuum.

The 6502 has an X and Y general register, an accumulator (A), a stack pointer (SP) and a program counter (PC).  That’s it!  It doesn’t get more simple than that.  8-bits of glory!

Apple Mac, Google, How To

An Easier Way to View All Your Google Calendars on Your iPhone

So Google now provides a tool to allow you to pick the calendars that sync to your iPhone.  It is:

Once you’ve added your main Exchange gmail account, use this link to pick which calendars sync.  I just saw this link today via and have not yet tried it, but it looks a lot easier than my previous post.


Chipping Away

I’m a lucky individual.  I grew up in a stable household with two parents that loved me.  I never doubted that love or that security.  I have two loving sisters with whom I still place great trust and hold great admiration.  My family continues to be amongst the most favorite people I’ve ever known.

I’m a blessed individual.  My parents example helped me pick a perfect mate and the love they parented deep into me now keeps me focused to work to be a caring spouse and loving parent to my children.  Note that I said “work” as in a “work in progress.”  My parents example proved to me that it was worthwhile and rewarding work.

Bouncing on Papa J's knee.

Bouncing on Papa J’s knee.

The picture I have posted here is of my father with my firstborn son in 2008.  Dad had already been living with cancer since 2004.  It was because of experimental treatment funded by efforts at the Preston Robert Tisch Brain Center at Duke that he was able to live with an incredibly agressive cancer for almost five years.   18 months of that time he was in remission.  The treatment he received gave him time. It gave us more precious time with him.

Cancer took my father from this world far earlier than he should have gone.  Dad passed away on June 19th, 2009.  He fought to the end, until he knew it was time to turn and go home.  I’m so grateful for the time we had.  I’m so blessed to have been given that time.  But, I confess, I wanted more.  I miss my father, especially those times when I need advice that I know only he could have given.

We’re lucky individuals.  We live in a time when the prospect of finding a cure for cancer is real.  And we can be a part of making it happen.  Once again this year I’m raising money for the Angels Among Us 5K and Family Fun Walk.  The money raised goes directly for finding a cure for brain cancer.  All donations chip away at the wall that keeps us from the knowledge of the cure.  Finding a cure means providing more time with our loved ones, it means more life and more living. That’s worth fighting for.  Won’t you join me?

To donate to the Angels Among Us 5K and Family Fun Walk simply follow the links in this post.  Thank you for your help.

Apple Mac, Opinion


Lion Upgrade

I upgraded to OS X 10.7 Lion a few weeks back and have been “enjoying” its new characteristics.  I have a few complaints, but overall I am generally happy.  I used to suggest to most folks considering an Apple OS upgrade to wait for the first OS update from Apple (10.7.0 to 10.7.1) before upgrading so that the “paint can dry.”  The same holds true with Lion.  That update has since been released and the next is on the way.  However, this time I would also suggest that unless there is some specific feature that Lion offers that you need, wait an update or two more.  Here are the problems/quirks I’ve encountered so far.

Numero Uno… Complainto?

I tried very hard to get used to the “natural scrolling”.  This new feature basically makes the touchpad scroll like the iOS devices do (which is backward than the way it used to work.)  This actually makes a lot of sense and I found that only after an hour or my mind got the hang of it.  I think it really is better.  I thought, “This will really work because I don’t use my trackpad on my Windows laptop at work so my brain won’t have to adjust.”  Except….

For some unknown ergonomically-challenged reason Apple chose to also apply “natural scrolling” to the mouse wheel.  Reversing the mouse scrolling is not intuitive at all!  While it might make sense for the multi-touch magic mouse it doesn’t not make mental sense for a standard scroll wheel.  Add on to that the fact the I use my scroll wheel on my work laptop all the time.  There was no way my brain could switch back and forth between them.  As of now there is not a way to independently leave natural scrolling on for the trackpad and turn it off for the mouse.  Although, the system preferences imply you can because there are two independent checkboxes in the trackpad settings and the mouse settings.  However, these separate checkboxes affect the same setting (and don’t update the other checkbox to reflect the change–bad UI design Apple!!)  I haven’t found a online hack to allow this other than having to buy a third party mouse utility like USB Overdrive.

I was pretty bummed by this limitation and had to switch natural scrolling off.  Boo, Apple!

Second Gripe

The second issue I had was merely a default setting that needed to be corrected.  The default setting for: System Preferences->Trackpad->More Gestures->Swipe Between Pages is “Swipe left or right with two fingers”.  This seems to disable multitouch swiping in all other applications except Safari.  Thus I noticed swiping to navigate was no longer working in iPhoto.  I needed only change it to “Swipe with two or three fingers” and things were back to normal.  My complaint is that it took me doing a Google search regarding iPhoto before I figured it out.  It seems counterintuitive to me that Apple would enable this setting such that it affected so many other applications.  I’m sure newer Apple applications will make use of the new gesture.

On the positive note, Preview now has a nifty set of screenshot options in the “File” menu with which I made the screenshot above.

Third Gripe

My last issue is with iCal.  I’m not a fan of the new look.  I realize Apple is trying to help transition customers to the whole new iPad and touch ethos (and new customers coming in from that world.)  However, making iCal look like a real leather desktop calendar is, well, cheesy.  I’m using one of the worlds most advanced laptops.  Same complaint goes for the Address Book app.  Why the heck would I want my calendar app to look like a leather desktop calendar which I haven’t used since…ever.

I find the delay imposed by transitioning between months (in month view) a needless delay.  I did find that once I adjusted the scroll setting listed above that I can transition between months without the animation by using a three finger swipe instead of a two finger swipe.  I do like the new day view, however.

My last issue with iCal is not new and that is the event editor needs popup calendars when choosing dates.  Also, a quicker method for choosing the time for the event could be handy.  I did go to Apple and give them feedback about the iCal issues.  I should do the same for the mouse and trackpad issues rather than just complaining to the intergooglewebs.

Last One

Lion won’t allow backing up via Time Machine to a networked Samba share.  Only AFP (Apple Filing Protocol) shares will work.  While this may seem like a niche geeky requirement (OK, it is) the fact that I used-to-could do this in Snow Leopard and can’t now has forced me to go out and buy an Apple Airport Extreme primarily to serve as my network attached storage.  Of course, this was probably Apple’s intent.

Granted, there were still other options like me setting up a Linux box to serve this function.  But, my intent was to backup to my media computer (the kid’s computer) which is acting as my always-on iTunes server for my Apple TV.  Since it is a Windows computer (unfortunately) I can’t just setup a share from it to which to backup my laptop.  And, I didn’t want to have to run yet-another-power-hungery-computer all the time.  So, my compromised was a refurbished (purchased from OWC) not-so-power-hungry Apple Airport Extreme which will have two laptop hard drives hanging off of it via a USB hub.

As an aside, Apple updated their version of AFP (the Apple Filing Protocol) in Lion and NAS providers that used the open-source version of AFP (netatalk) were scrambling for awhile awaiting the open source version to be updated.  There was a bit of a saga about this hiccup.  Though a temporary glitch, it was a glitch nonetheless.


Though those are several fairly significant (in my little universe) complaints, I do like many of the new Lion features.  Mission Control is cool.  Versions is sweet.  Time Machine backup from an encrypted home folder while logged in is much needed.  The list goes on.

P.S. Here are honorable mentions in the complaint contest:

  1. The “clickable area” around most of Apple’s controls is too small.  I’ve noticed that Windows is much more forgiving about clicks in that it give you the whole button area on which to click.  OS X tends to require you to click dead-center on things.  Combine that with the very small editing area in things like iCal’s event editor and it’s darn right frustrating.
  2. Safari 5.1 eats memory like a hungry elephant.  Their “enhancements” must mean “enhanced eating of memory usage”.  5.1 seems worse in Snow Leopard.  I switched my wife to using Chrome until they’ve resolved it.  I bumped both our machines to 8G and that’s helped.  I’m hopeful Apple will rectify this in an update soon.