I told the priest, “Don’t count on any second coming.”

“God got his ass kicked, the first time he came down here slumming.”

“He had the balls to come, the gall to die, and then forgive us.”

“I wonder what he thought it would get us…”

– Concrete Blonde, Tomorrow, Wendy.

Xubuntu and Teensy 3.1

After purchasing a Teensy 3.1 from pjrc.com and attempting to install their add-on software to the Arduino package already shipping with Xubuntu (an Ubuntu derivative and including the same issues in both distros), I thought I’d create a few notes to speed things along for others as the Teensy add-on is not directly (or indirectly, apparently) compatible with the Arduino IDE package provided by Ubuntu / Xubuntu. Note that I’m running Xubuntu 15.04 but I would expect similar issues with nearly any Ubuntu distro at any revision.

First, in order to speed things up and simplify installation, it’s probably easiest to use install the included Arduino package from Xubuntu.

sudo apt-get install arduino

This will also install a few other libraries and support files.

Go to System -> Users and Groups and add yourself to the Dialout group (this allows access to the serial ports). Logout or reboot so the group change can take effect.

Run Arduino so it can go ahead and create its infrastructure. If you have an Arduino, go ahead and test it to make sure the basic installation works as Teensy requires the Arduino IDE to be fully functional.

Now, remove the arduino IDE. However, do not use the autoremove feature suggested after you’ve removed the package unless you’re going to manually reinstall the various required files.

From pjrc.com, download the Teensy Linux installer (.32bits or .64bits file) and the udev rules file. From www.arduino.cc, download the latest Linux file; it’s in a .xz format.

Pick an empty working directory (I use ~/Work) and decompress the arduino .xz file. After decompressing, untar the archive and copy the resultant directory to /usr/share. Finally, rename /usr/share/arduino-xxx to /usr/share/arduino. Note where sudo must be used as normal users cannot directly write to /usr/share.

xz -d arduinoxxx.tar.xz

tar xvf arduinoxxx.tar

sudo cp arduinoxxx /usr/share/

sudo mv /usr/share/arduinoxxx /usr/share/arduino

Now, create a symlink in /usr/bin that will allow running arduino from the command line. You can add this to the menus later after all steps are complete and working.

sudo ln -s /usr/share/arduino/arduino /usr/bin/arduino

Run arduino from anywhere on the command line. You should see the standard splash screen instead of the different one included as part of the standard Ubuntu package.

Once everything is working properly from the basic arduino installation, exit and install the rules file for the teensy and the add-ons to the Arduino IDE.

sudo cp 49-teensy.rules /etc/udev/rules.d

sudo chmod +x teensyduino.64bit  <this modifies the .64bit or .32bit file to allow execution>

sudo ./teensyduino.64bit

Note you must prefix the teensyduino.64bit with the ./ or it will not run. Navigate to /usr/share/arduino and you should see the Next button become enabled, recognizing that you are in the correct Arduino IDE location. If the Next button fails to enable, hit the help (?) button and see what is missing in order to resolve the issue. After Next, click Install, and finally Done.

At this point, you should be able to start arduino, connect your Teensy, select it from the Board menu, and begin tinkering with it.

Note that I am in no way an expert on Teensy or Arduino. I’ll be happy to try to help, but my current work area is almost nothing and I have very limited ability to build any significant projects.

Hope this helps; it wasn’t very intuitive for me and took a couple of hours to sort. If this shaves some time off for anyone, it’ll be worth it.

The Black Cat that Isn’t There

David Allen recounts an anecdote in which the Pope is discussing God with a true Atheist. The Pope tells the Atheist that he is a blind man looking for a black cat in a totally black room. The Atheist retorts that the Pope reminds him of a total blind man looking for a black cat in a totally black room, except the Pope actually found it.

FreeFileSync, GrSync, and Xubuntu 15.04

Starting with Xubuntu 14.10 (I think) I found that my favorite backup program, FreeFileSync, was not as easily installed via ppa as it had been in earlier versions. The getdeb repository contains this and many other programs but I had reason to wonder whether this would continue to be supported long-term. A few days ago I found grsync, a GTK-based interface to the venerable (but extremely powerful) rsync utility. Today, I put this to the true test: I needed to copy all of my user data from the exFat partition that I setup from my old Xubuntu Linux box to my completely newly formatted Xubuntu 15.04 box. See previous posts for details of the exFat fail. I copied about 800 GB of data during 1 session then copied the remaining 200 GB of data during another session. I first ran a simulation, though, as I was concerned about grsync’s ability to recover where it left off and not start from scratch or otherwise dump a bunch of data. Turns out, it scanned for several minutes but then happily continued from its previous location in the restore, with no fuss. I think I’ve found a new friend.

Of course, YMMV.

exFat, Linux, and Mac OS X partition sharing

I thought I’d finally found a great option with exFat. I was preparing to migrate to my MacBook 2010 and Mac OS X Yosemite for a while in preparation for taking some classes. I transferred my user files (about 1 TB) to a shiny new 2 TB USB drive after freshly formatting it with exFat file system. My MacBook installs with 10.6.2 but exFat isn’t compatible with that version. No problem, I updated to 10.6.8 to be able to quickly access some needed files (Little Snitch, etc). As it turns out, Apple has chosen to implement only part of the exFat specification in that you must format to 1024 cluster size (or less, apparently) for the system to work. If you happened to be unaware of this restriction and allowed your Xubuntu 14.10 box to choose its default (4096), you’re screwed. No way around it, you’ll need to copy all of those files off via Linux (or, presumably, Windows) to another drive formatted to the correct cluster size. Trying to do this through VirtualBox with a fresh virtual machine containing Xubuntu 15.04 and all the correct drivers resulted in a number of crashes. I finally decided that it was going to be easier to simply continue taking classes with a virtual Windows installation rather than screwing around with yet another Apple-imposed restriction. The hardware and software are generally great and rarely crash, but trying to do anything out of the box that Apple defines can result in some pretty large fails.

Summary: If you’re going to share exFat file system in order to be compatible between multiple platforms, make damn sure you read the implementations available for each OS.