Scott James Remnant

I can dance if I want to

Page 2


A road trip with Apple CarPlay

With almost impeccable timing, the firmware upgrade to support Apple’s CarPlay was released for my car’s heads-up unit the day before I was set to go on a road trip from San Francisco to Los Angeles and drive around that unfamiliar city for the weekend. This seemed like the perfect opportunity to put it through its paces.

IMG_0219.PNG

The heads-up unit in question is the Pioneer AVIC-8000NEX, their flagship unit with a 7" Capacitive Touchscreen display. This comes with its own built-in navigation software, iPod controls for music either by Lightning cable or Bluetooth and even support for apps via their AppRadio technology.

Not only is it the best of the aftermarket units for running CarPlay, it also provides a pretty decent unit in its own right to compare functionality and behavior to.

 Music

It’s arguable whether the number one function of a car’s heads-up unit these days is music, or

Continue reading →


The missing iOS 8 NFC API

There have been a bunch of comments and criticisms flying around that iOS 8 is missing any kind of API or SDK for developing applications to take advantage of the NFC chip in the iPhone 6 and iPhone 6 Plus. One article at least even went as far as to describe the decision not to provide one as “stupid”.

I disagree, not providing APIs in the first iteration of hardware has been pretty much an Apple standard operating procedure for a long while now, and I think it makes perfect sense in this case as well.

The most typical thing a software developer is going to do with an NFC API is write an app that reads NFC tags. The Android store is pretty much full of these; you download an app, you tap your Clipper Card on it, and it tells you a bunch of meaningless gibberish.

This isn’t very useful, because it turns out that the more interesting cases for NFC are when the phone is acting as a tag

Continue reading →


Songs of Innocence

The most surprising thing about Apple’s move to preload the new U2 album onto iPhones isn’t that they did it, but that people are surprised that users are angry about it.

For example John Gruber declared “Nailed It” in response to someone describing “removing a free album” as a “first world problem”.

Apple themselves said it in the very keynote they announced this. These iPhones, iPads and iPods are incredibly personal devices, to which users create a much more intimate bond than they do to pretty much any other device.

The WATCH is only going to be even more personal than that.

Apple have been preloading apps onto our personal devices for a while now, whether we like them or not, with no way to delete them. It wasn’t a surprising move for them to start preloading music either.

But they, and nobody else, should be surprised that people see this as an invasion of their personal

Continue reading →


iMagic

Apple are expected to announce some form of innovative new payment system tomorrow morning, but I think another company already has the jump on them for that: Disney.

If you’ve stayed in their Walt Disney World resort recently you’ll have encountered the Disney Magic Band, and the whole MyDisney+ experience.

Before you even get to the resort you receive your Magic Band, that you wear on your wrist the entire time you’re there. You get to pick your color, you get to buy cute ornaments and covers for it, and the whole thing is pretty reasonably ergonomically designed.

And inside is an NFC tag and a Bluetooth LE radio.

The band is your hotel room key, you simply hold your wrist up to the door lock and your room opens and allows you inside.

It’s your ticket into the park, combined with a fingerprint reader to ensure that the same person uses the same band each time. (Something they’ve

Continue reading →


Tracing on Linux

The Linux tracing APIs are a relatively new addition to the kernel and one of the most powerful new features its gained in a long time. Unfortunately the plethora of terms and names for the system can be confusing, so in this follow-up to my previous post on the proc connector and socket filter, I’ll take a look at achieving the same result using tracing and hopefully unravel a little of the mystery along the way.

Rather than write a program along the way, I’ll be referring to sample code found in the kernel tree itself so you’ll want a checkout. If you’re doing any work that touches the kernel further than standard POSIX APIs, I highly recommend this anyway; it’s quite readable and once you find your way around, is the quickest way to answer questions.

Grab your checkout with git:

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
# cd linux-2.6

 Tracepoin

Continue reading →


The Proc Connector and Socket Filters

The proc connector is one of those interesting kernel features that most people rarely come across, and even more rarely find documentation on. Likewise the socket filter. This is a shame, because they’re both really quite useful interfaces that might serve a variety of purposes if they were better documented.

The proc connector allows you to receive notification of process events such fork and exec calls, as well as changes to a process’s uid, gid or sid (session id). These are provided through a socket-based interface by reading instances of struct proc_event defined in the kernel header.

#include <linux/cn_proc.h>

The interface is built on the more generic connector API, which itself is built on the generic netlink API. These interfaces add some complexity as they are intended to provide bi-directional communication between the kernel and userspace; the connector API appears to

Continue reading →


Hiding arguments from ps

There are many articles on the Interwobble telling you how to set the process title on Linux; they all concentrate on the problem of placing an arbitrarily long string in argv[0] to report status information in the process list.

But what if argv[0] is fine, and what you want to do is remove the following arguments from the process list? Perhaps they contain sensitive information, or perhaps they’re just likely to be surprising.

A fictional example may look like this (I’ve added the $ to demonstrate a later problem):

11234 ?        S      0:00 some-program --username=foo --passphrase=bar$

 How not to do it

The first thing you’ll probably try is just setting those arguments in the argv list to NULL. For example, with code like this:

for (i = 1; i < argc; i++)
    argv[i] = NULL;

That won’t work because that array is just a list of pointers to the real area in which the arguments

Continue reading →