Mac

What’s missing in the Airport Express?

Apple Airport ExpressApple introduced the Airport Express today, surprising observers who expected product announcements to be on hold until the WWDC conference in San Francisco later this month. Apple-watching is a surprise-fraught art not unlike Kremlinology used to be, with the added risk of cease-and-desist letters by the notoriously secretive and litigious company.

The Airport Express is a compact little wireless network in a box, offering an IEEE 802.11g WiFi access point cum router, an Ethernet port, an audio port to stream audio (interestingly, it supports both conventional electrical line-level output as well as Toslink optical in the same jack), and a USB port to allow printer sharing (no word on whether this also allows scanner sharing the way Keyspan’s USB server does).

This unit replaces 2 or 3 boxes (and their associated wall warts), is relatively inexpensive at $129, and will no doubt become as popular and widely (yet poorly) imitated as the iPod was in its day, specially given it can be used by Windows PCs. If I did not already have a Slimdevices Squeezebox (with beta support for the Apple lossless encoder), I might have be tempted, in spite of the lack of a display or remote control.

I am not all that fond of the wall-wart concept, but the plug can be removed and replaced with a standard IEC-320-C7 cable (which can certainly be found far cheaper than the ridiculously expensive $39 Apple charges for them), or even powered from Ethernet using the new power-over-Ethernet standard 802.3af (the USB port is disabled in that case), a nice touch that exemplifies Apple’s attention to detail. As a side note for those of you who have a hard time coping with wall warts, I highly recommend the Power Strip Liberator Plus, a simple but highly effective solution to the problem of clogged power strips.

That said, there is one port missing, one that would have turned the Airport Express from a well-designed piece of electronics into a visionary product: a phone jack. A RJ-11 jack that can be plugged into a phone line (FXO) or into which a phone can be plugged (FXS) would bridge one of the few remaining domains not covered by Apple’s digital hub (the other one being TV). With iTunes AV, Apple has a very capable Voice over IP (VoIP) client, but no way to interface it to legacy POTS (Plain Old Telephone System) networks. I am not sure if this is deliberate and if they want to introduce this as a value-added feature to their .Mac Internet services suite, but Apple has lacked decent telephony product since the introduction of the Geoport ten years ago.

It should be straightforward to add telephony software to a Mac and have it able to act as an intelligent voice-mail or IVR system (forwarding voice mails via email the way Panther’s Fax feature can with faxes). Computer-Telephony Integration, widespread in the PC world, is also an essential feature for many enterprise applications (think call centers or CRM). Many small businesses use Macs because they cannot afford full-time IT staff to baby-sit Windows machines. Offering them an integrated telephony solution would be a very attractive proposition.

Keyspan USB Server review

I saw the Keyspan USB Server at MacWorld SF a few months ago, but it has only recently started to ship (I received mine yesterday). This device allows you to connect a Mac or PC to up to 4 USB 1.1 peripherals remotely over Ethernet, much as a print server allows you to access remote printers. It also allows sharing of USB devices between multiple computers.

I use it to reduce clutter in my apartment by moving away bulky items like my HP 7660 printer and my Epson 3170 scanner away from the iMac in my living room, which has progressively become my main computer, even though it is probably the slowest machine I have.

You install the driver software (Windows 2000/XP or Mac OS X, no drivers for Linux so far), and it creates a simulated USB hub device that takes care of bridging the USB requests over Ethernet. There is a management program that allows you to configure the settings on the USB Server such as the IP address (zeroconf, a.k.a RendezVous is supported, a nice touch), password and access mode. The user interface is functional, if not perfectly polished. To use a USB peripheral hooked to the USB server, you fire up the admin client, select one of the USB devices and take a “lease” on it. I have links to some screen shots of the GUI below:

The process is as smooth as it can possibly be, given that USB devices are not designed to be shared between multiple hosts, and thus some form of locking had to be provided. I tried my scanner over the Ethernet, and have not noticed any perceptible degradation in performance. The software copes with sleep mode correctly. The only nit I would have to pick is that the power adapter “wall wart” DC connector slips off the device too easily (not enough friction to hold it in place), disconnecting it.

Many families are becoming multi-computer households. The Keyspan USB Server is a surprisingly effective way to share peripherals or to move bulky and seldom used peripherals out of the way. At a street price of around $100, it is not inexpensive, but I found it a very worthwhile accessory for my home network.

Making Mac OS X sleep from the command line

In a previous article, I showed how to use Wake-on-LAN to remotely wake a sleeping Mac. I often log on to my home Mac remotely using SSH via my Solaris home server, waking it in the process. With the default settings, the machine will go back to sleep after a few minutes of inactivity.

I recently changed my system defaults to never make the machine sleep, however, because OS X’s sleep functionality will cause the system to sleep even when active Unix jobs are running, like long compiles. That is because the OS has no way of distinguishing between live applications and background daemons. There does not seem to be a command-line utility allowing the user to put the machine to sleep, however, so I quickly wrote one, using Apple Q&A 1134 as a starting point.

You can download the command and source code (including a Panther binary) here: macsleep-1.0.tar.gz (Tiger and Intel users, see below for 1.1)

Restrictions: this command will only work if the user ID it is being executed from matches the user ID of the currently logged on user (not a problem for me because I have auto-logon enabled).

Update (2003-12-06):

Mike Harris reports another similar utility already exists, SleepNow.

Update (2005-11-30):

Kalvis Jansons suggests using AppleScript and the System Events application introduced in 10.3 to achieve the same results, using the following shell script:

#!/bin/bash
osascript << EOT
tell application "System Events"
     sleep
end
EOT

Update (2006-04-02):

I have rebuilt the program for Tiger in both Intel and PowerPC flavors, as well as a universal binary. The new version is macsleep-1.1.tar.gz. The source code itself is unchanged.

Panther’s Linux pandering

I installed Mac OS X 10.3 “Panther” on my iMac yesterday, after a false start. I prefer to do a virgin reformat and reinstall rather than use the upgrade options, and I made a backup on my WiebeTech Fire800 external hard drive. When that turned out to be thrashed, I thought the installer had reformatted both drives. It turns out there is an incompatibility between Panther and Firewire drives using the Oxford 922 chipset, firmware revision 1.0.2, at least when connecting a Firewire 400 Mac to a Firewire 800 drive. After upgrading the firmware to 1.0.5, everything is back to normal. Fortunately I have off-site backups for most of my files. Normally, I would have a second backup on a drive that I specifically selected because it uses a different Firewire bridge, the Indigita-powered EZQuest Cobra+, but as Murphy would have it, it was back at the manufacturer for replacement after the hard drive in it started failing. Never assume anything…

An interesting thing is there are some changes to the Panther BSD core that are clearly designed to make it more familiar for Linux users, at the risk of breaking things for previous OS X users. The default shell is now bash rather than tcsh. Some userland utilities like tar are now the GNU rather than BSD version. Terminal.app sets the environment variable TERM to xterm-color (it used to be vt100), another Linux idiom. vi has been replaced by vim, a close, but not strictly identical substitute.

Since I burned out of the Linux constant upgrade treadmill in 1993 (after having had to recompile gcc and the kernel three times in a week just to install applications), I appreciate system stability like the one provided by Solaris, and have very mixed feelings about these changes.

Mac OS X 10.2 “Jaguar” upgrade woes

I upgraded my iMac G4 (flat panel, with SuperDrive) today. I prefer doing a full reinstall of any major OS upgrade rather than an upgrade install (because I am afraid there might be leftovers of the old OS that can trip me up later), and I did so.

The install procedure worked smoothly, but it did not install iDVD. An upgrader for iDVD is available for download from Apple’s website, but it requires the presence of iDVD 2.0, which can only be ordered from Apple for $19.95, not downloaded. And of course the iDVD 2.0 disc is not included in the disc set provided by Apple with the iMac G4 (at least, the one I got; I ordered my iMac the very day it was announced, perhaps people who got it with Mac OS X 10.1 were more lucky). Grrr…

I found a workaround, which is as follows: copy the disk image files iMac HD Disc 1.dmg, iMac HD Disc 2.dmgpart through iMac HD Disc 6.dmgpart onto your hard drive from the system restore CDs. then double-click on the first one, which will be mounted. You can then drill down to the Applications folder then drag-and-drop the iDVD folder into the Applications folder on your startup disk. After that, apply the iDVD 2.1 updater you downloaded from Apple’s website.

I haven’t tried burning a DVD yet, but the program seems to work.