Serial port project - possible?
From: Ryan J Alder (astrallink_at_gmail.com)
Date: 08/31/04
- Previous message: Exillis: "dlclose() causing segmentation fault on exit from main()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Aug 2004 11:00:11 -0700
Hi, I have a car audio project I want to try, but before I waste my
time on a wild goose chase, I was hoping someone might let me know if
it's possible, or perhaps some major pitfalls I might not be seeing.
I'm going to be putting a linux box in my car, to be used as an mp3
player. It's going to have Apache and be running a php-based web form
for playback. I will be using a wireless PDA w/ a browser for control
from the cabin. This is the easy part, I have all this planned out.
What I would also like to do(the hard part) is emulate a CD changer
from this box, for a couple reasons. If I don't use the CD-changer
input on the head unit, I need one with an aux-in line. These are
becoming popular, but this still limits my options for HU's, and I
also don't want to replace the factory system quite yet, so using the
factory cd-changer inputs would be handy. Also, this would allow me
to do simple play/pause/track changes from the HU, not needing to pull
out the PDA, and also when the HU powers off, or I switch to the
tuner, it can signal the computer to pause playback.
Here's a rough plan on how I would like to do it. All this assumes
I'll be able to track down the wiring schematic for the radio and fine
out what outputs do what on the CD-changer port. I would like to buy
a real cd-changer, used off ebay, I suppose, so I can sell it back
when done designing. I'll wire the radio to the first serial port,
wire the changer to the second serial port, and write a simple program
to pass traffic from one to the other, and watch what they do. Then
just write a program to do what the changer does, and respond how the
radio expects. Writing the functions to do the actual track changes,
etc, will be fairly easy, I imagine. It's talking to the radio that
I'm worried about. I've never programmed anything with serial ports.
I don't know if the radio would even speak in a way the computer is
capable of understanding. How versatile is computer hardware in
talking to other devices? Could unexpected voltage from the radio be
a problem? I doubt it would be extreme, but I don't know if serial
lines need a strict range of voltage on the line. I know this won't
be an easy project, but I'm willing to refresh my dusty memory of C
and give it a shot, if it's a reasonable shot. My major concerns are
incompatible line-levels and just plain incompatible languages between
the hardware. I would also need to run the control lines from the
serial port, and the audio lines from the sound card (like some crazy
hardware-based ftp connection). This part, of course, depends on what
the design/requirements of the radio's cd-changer port, and if it can
take plain signal-level sound input.
Any thoughts/comments would be greatly appreciated, even if it's just
to tell me I'm crazy.
Thanks, Ryan
- Previous message: Exillis: "dlclose() causing segmentation fault on exit from main()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|