- What is MacXM?
- MacXM is a program designed to
allow a computer running Mac OS X to control an XM PCR.
- What is an XM PCR?
- An XM PCR is an XM radio that is
powered and controlled by a host computer via a USB connection. XMPCRs are no longer being sold by XM (as of late summer, 2004). If you can get ahold of one, they still work with XM's service and can still be subscribed just like any other radio. There are also adapters that can make in-car XM receivers work like PCRs.
- What is XM?
- XM is a subscription
direct-satellite-broadcast audio service. You can learn more about XM
radio at the XM home page.
- Where do I get MacXM?
- You can download the latest version here.
- What do I need to run MacXM?
- You need a computer running
Jaguar (Mac OS 10.2) or newer with a free USB port, and of course an
XM PCR. You also need to download and install the driver for the
USB-to-serial adapter chip that is inside the XM PCR.
- Where do I get an XM PCR?
- They're no longer being manufactured. Your best bet is to search for either used or new-old-stock units on eBay.
- Can I control other XM receivers with MacXM?
- It turns out that the XM PCR control protocol is used by all XM receivers (It may even be used by some Sirius receivers). Some receivers make the serial interface easier to get to than others do. If you can manage to connect to the right place to get serial control of your receiver, MacXM should be able to control it. If you're using a serial port on your computer that isn't controlled by the FTDI chip found in the XM PCR, you'll need to perform a small additional hack to disable the normal checking that limits the list of ports that show up in the device list. Open a terminal and type this line:
defaults write com.kfu.MacXM DisablePortDriverCheck -bool true
Note that hacking up your radios is even more unsupported than using MacXM is. You'll probably void your warranty. You may break your radio. You may cause cancer in laboratory animals. In any case, don't blame me. You were warned.
- What are the license terms for MacXM?
- MacXM is
distributed under the terms of the GNU Public License (there is one added term, but it doesn't really matter to most users. It is there to make it easier for other projects to rip the guts out of MacXM and use them with
javax.comm). You can read the full license in the "About MacXM" window.
- What if I want to distribute MacXM and/or modify it?
- You may do so with or without my consultation or assistance, provided you adhere to the GPL. This means you must make the source code of your modifications available to anyone to whom you give the modified binaries. I am open to discussing alternate license terms for OEMs who wish to make modifications to MacXM without releasing the source code, but if you adhere to the GPL, there's no need. I am also available for consultation or assistance, should there be a desire or need for it. Contact me if you'd like to talk more about these subjects.
- How do I get it to work?
- The procedure is documented on the first-time setup page.
- I'm having trouble. Where can I turn for help?
- Your best bet is to ask on the XMPCR development forum at the XMPCR development forums.
- Do I have to have my XM PCR activated before I can use
- No. If you turn on an unactivated XM PCR with MacXM,
you'll see a lot fewer channels in the channel grid, and you'll see a sheet open up offering to Activate your XMPCR. Simply pick either online or telephone activation and follow the instructions. After activation leave the XM PCR turned on for at least the
next hour. You should see the channel grid fill in once your XM PCR
has received its activation signal.
- Is there a particular version of the FTDI driver I should use?
- The current version is 2.0.1 (13-Sep-2005). I can't imagine that upgrading to this version would break any other devices that might have installed older versions of the driver, but I could easily be wrong. If you have other devices connected to your computer that use FTDI USB/Serial chips, you should proceed with due caution.
- I hooked the line-out jack of my XM PCR to the line-in jack of my computer and I don't hear the audio. What's wrong?
- Unlike many PCs, the mac doesn't route audio from line-in to the speakers by default. You can download a small application from Rogue Amoeba called Line-In that will do this for you, or you can simply hook up a pair of powered speakers directly to the line-out jack of your XM PCR.
- How do I record the audio from my XM PCR?
- The XM user agreement disallows you specifically from recording or streaming any of the XM channels. Since I want to stay on XM's good side, I won't tell you how to record the streams and I won't put any recording functionality in the code.
- Is MacXM supported in any way?
The XM PCR ships with only software for Windows. It is only officially
supported under Windows 98, 98SE, ME, 2000 and XP. This software comes
with no warranties of any kind. In particular, it comes with no
warranties of merchantability or fitness for a particular purpose. There
are no guarantees at all that this software works.
So send your lawyers elsewhere.
- Does the audio play through the computer?
- No. The XM PCR
is powered and controlled over the USB connection, but the audio is
output through a standard analog line-out jack (1/8" stereo "headphone"
style plug). You can run the audio into a pair of powered speakers, or
you can run it into a line-in jack on your computer.
- I forgot my filter lock password. Now what?
- Quit MacXM, open a terminal window and type this line:
defaults delete com.kfu.MacXM FilterLockSetPassword
Next time you start MacXM, the filter drawer should be unlocked.
Why is this so easy to do? Because I figure if the kid's old enough to figure out how to do this, he or she is probably old enough to not be damaged by tuning to 150 and hearing Dennis Leary or Lewis Black material.
- What is the XMFan Tracker?
- If you register for the forums at the XMPCR development forums, you can have your post signature show exactly what you're listening to at all times. Until version 1.7, you had to use a dodgy AppleScript to do this. Now the functionality is built-in.
- I'm seeing reliability problems with MacXM. What's going on?
- Do you have your XM PCR plugged into a USB hub?
Almost every report we've received so far where there are funky problems have been caused by connecting the XM PCR to a flaky USB hub.
There used to be a paragraph here about the power supply requirement configuration data supplied by the XMPCR, but I believe that paragraph was in error. If you look at the PCR with the System Profiler, it does indeed report a demand for 500 mA. My bad. But that leaves us without an explanation as to why some hubs work and some do not.
The workaround remains the same: always plug the XM PCR directly into the USB ports on your computer while you're setting it up or troubleshooting.
- I've found bugs. What do I do?
- Drop me a line.
- Who do I blame for this?
- What's MacXM written in?
- MacXM is a Java/Cocoa
application, with a small JNI helper method. Cocoa is the primary Mac OS
X application development API, but as befiting Mac OS X's NeXT roots,
they'd really rather you wrote your software in Objective C. I much
prefer Java to Objective C, despite the fact that all the Cocoa-puffs
out there keep telling me to use Objective C instead.
The JNI method
simply opens the serial port in non-blocking mode and does some
ioctl() calls to prepare it for I/O. Java, being OS
neutral, has no way to do any of that.
is designed to provide serial port access to
Java applications. I would have used it, except that there are deficiencies in the Java/Cocoa environment that more or less make
System.loadLibrary() not work. Since I wanted to get a version of MacXM out quick,
I took the path of least resistance.
For a pure Java (SWING) approach, go check out the JXM project.
- How do I build MacXM from source?
- You first need to install Apple's dev tools. Fortunately, they're freely available for download from Apple's ADC site. Next, use CVS and fetch the source from SourceForge. In the top of the source folder, you'll find an XMPCR project file. Open that up in project builder and click the 'build' button. That's about all there is to it.
- What are you planning for the future?
- Go check out the Feature Requests (RFE) section of the SourceForge project.
- Is MacXM AppleScriptable?
- Yes! As of 1.3, you can control MacXM via scripts. The grammar is a bit limited at the moment, but it is sufficient to change the channel and find out what is currently playing. Some example scripts:
tell application "MacXM"
set channel number to 48
tell application "MacXM"
get channel name
get channel genre
get current song title
get current artist
If you want to make an XM alarm clock, use the AppleScript editor, write the top script (the one to change the channel), then save it as run-only, as an application. Then you can use crontab (from the terminal) to schedule the newly created application to run whenever you like. Merely telling MacXM to change the channel is sufficient to launch it and power on the radio (so long as the XM PCR is plugged in).
- Any last rants?
- Apple: Where is the Java
performSelectorOnMainThread? Or if you don't
like that one, how come the
NSRunLoop isn't thread-safe? Or, the real
question that both of those questions skirt around: what is the Cocoa
SwingUitlities.invokeLater()? How are worker
threads supposed to update the UI?
- XM: Where is the developer's documentation for the XM PCR? How about developer's documentation for linking to the XM web site? How about a URL that takes a radio ID as part of the URI and starts the activation process (
http://www.xmradio.com/activate?radio_id=XXXXXXXX)? What are all of the magic numbers in the protocol?
XM, XM Satellite Radio and XM PCR are all registered trademarks of XM Satellite
Mac and the Mac logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. The Mac Badge and the "Built for Mac OS X" graphic are trademarks of Apple Computer, Inc., used with permission.