Unoffical empeg BBS

Quick Links: Empeg FAQ | Software | RioCar.Org | Hijack | jEmplode | emphatic
Repairs: Repairs | Addons: Eutronix | Cases

Topic Options
#367442 - 26/08/2016 09:28 I made a Bluetooth interface.
FieroSTi
member

Registered: 07/05/2007
Posts: 104


Check it out here. Is this something people are interested in? Do people even use their empegs any more?

If I were so inclined, how would I go about writing to the screen every so often to display current track data? Maybe be able to intercept button presses and send rewind/skip commands to the bluetooth source? This would all take place in AUX mode, and with the sled serial connector.

On a somewhat related note; can anyone tell me more about the tuner serial port? I'd like to be able to control the empeg from there like a wired remote as I'm using the other for the Bluetooth interface. I feel like I remember getting a bunch of garbage from the tuner serial port when I was trying to connect to it one day, though. Is it RS232 or TTL? Basically, I'm trying to bypass the tuner so I can have a wired remote.

Top
#367450 - 26/08/2016 19:40 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
Interested!

Right now I have a cheap third party A2DP interface plugged into the AUX port on my empeg. The idea is for when my girlfriend wants to play stuff from her phone in the car. It works, but it doesn't allow for the buttons on the face of the player to send play/pause/skip commands to the phone.

An integrated solution (with onscreen track data and rewind/skip controls on the player) would be amazing, if you can get that working. I would buy one if it worked. I'd be willing to help you test the software, though I can't help you write it.

Would there be a way so that your device could have an AUX passthrough, to mix the actual AUX plug audio with your bluetooth audio, so that I could have my free AUX jack back? The idea would be that you'd resistance-mix the two sources, i.e., it wouldn't matter whether audio is coming in from the passthrough aux jack or from the bluetooth interface, either one or both will play sound. (I like being able to have my AUX jack available for a portable CD player for those super-rare situations when I buy a CD and want to hear it right away before I rip it.)

Regarding how to get the programming done: You'd need to interface with the kernel somehow. If you were already planning on having a connection to the serial port, you could submit a change to the hijack kernel which outputted some "coded" information on the serial port when buttons on the face of the player were pressed. Then your interface could read the serial port. Commands could be like simple ASCII text output on the serial port:
#E2DP:AUXMODE_SELECTED
#E2DP:LEFTPRESS_DOWN
#E2DP:LEFTPRESS_UP
#E2DP:AUXMODE_DESELECTED
You'd also want to do the same thing for commands from the Rio remote control.

Unless... Does hijack already have a secret setting for outputting button press information on the serial console? If so then no hacking needed for that part, you'd just activate that feature.

The Hijack kernel could also be hacked to interpret incoming coded data from your interface, containing track information, and put that up on the screen. That *would* need to be a hijack hack. But I'll bet it's doable.

Oh by the way, did you like how I already suggested a name for your product in my message samples up there above? "E2DP"? Cute, huh?
_________________________
Tony Fabris

Top
#367453 - 26/08/2016 22:41 Re: I made a Bluetooth interface. [Re: FieroSTi]
FieroSTi
member

Registered: 07/05/2007
Posts: 104
I'm pretty sure I've read posts from Mark about the wonderful things Hijack can help me do with this little fellow, I'm just not exactly sure how to use them.

I don't really want to do anything complicated. I want to use the AUX-in for audio and the sled serial port for basic two way control. Only need skip/rewind and pause/play, really. The 8-pin Molex on this interface will receive a custom extension harness with the required RCA jacks, DB9 serial port and tuner connecter on the empeg end for power and tuner Rx/Tx. Current Track information is on the wish list and is fully possible. Just need to connect the dots. It's all done by sending ASCII commands to the RN52 to which it will respond with either a HEX value or an ASCII string, depending on what you asked of it. I would just need to write a little userland 'thingie' to parse that information and write it to the screen, hence the difficulty for me as a non-programmer. I'll be working on that this winter, I suspect. I ordered 6 of those boards to test with, but I have a feeling that I'll be revising it once or twice before I've got a 'final' product. For what it's worth, I had a working prototype on the breadboard. The RN52 is a pretty amazing little chip. It's $25, but it's pretty much fully self contained. All I added was an i2s DAC for better sound and a level shifter for comms.



I'm also working on a microcontroller as an ADC for the 'steering wheel control' buttons. It's supposed to emulate the controller used in the original tuner to add a steering wheel interface as well. That might be somewhat challenging. I'm working with an Arduino Nano as I'm somewhat familiar with the architecture. Anyway, the 4-pin Molex connecter carries 12V/GND and the tuner Rx/Tx wires for running to the remote panel. The remote panel is basically the empeg face without the screen. Basically, I want to mount an empeg face in my center console, but leave the screen on the dash. I have two sets of display extender boards, but I don't think they're applicable here.

Name's decent. Hah. I like it.

Top
#367454 - 26/08/2016 22:49 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
Quote:
I would just need to write a little userland 'thingie' to parse that information and write it to the screen, hence the difficulty for me as a non-programmer.


I don't know if it'll be easier to write a userland program or to make changes to hijack. Certainly hijack already has a lot of the plumbing for what you need to do. Those who have written code in both areas would probably be able to answer that more definitively.
_________________________
Tony Fabris

Top
#367459 - 29/08/2016 01:57 Re: I made a Bluetooth interface. [Re: FieroSTi]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 1906
Loc: Brisbane, Australia
Unfortunately my empeg is not used in a car any more - this would have interested me back when I did.. This should work quite well. It shouldn't be too hard to get some button presses one way to it and track data from it on to the screen.

Have you tried it in a running car? Whilst experimenting with other interfaces I found they were a bit susceptible to ground loops etc and so alternator whine and other interference might be a problem.

Nice one.
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#367460 - 29/08/2016 17:17 Re: I made a Bluetooth interface. [Re: Shonky]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
Yeah that's a big deal. Takes a lot of work to get the whine out when you add stuff to Aux.

Hm. I wonder if you could make this "E2DP" unit an internal thing? Inline insert into the connector where the dock wires plug into the mainboard. Mount it in the slot where a second disk drive would go....
_________________________
Tony Fabris

Top
#367465 - 29/08/2016 19:12 Re: I made a Bluetooth interface. [Re: FieroSTi]
FieroSTi
member

Registered: 07/05/2007
Posts: 104
I'm not terrifically worried about ground loops as I'm using one of Stu's S/PDIF cards with digital coax running back through the car to my amps. Absolutely nothing I did when I installed the unit into this car would get rid of the terribly loud alternator whine that I had. Nothing. Except's the Eutronix card, that is. I suppose I could still induct noise on the analog AUX signal before going back to digital, but that's not likely to happen. Also, in this board I used a completely isolated i2s DAC chip [PCM5102A] external to the RN52 with it's own highly regulated 3v3 power supply, as I found that the internal audio processing is very poor and highly susceptible to noise, even from UART activity.

I absolutely could make this an internal thing, basically replacing the second hard drive. I suppose that I had never really considered that. The smaller analog/digital Molex connectors at the logic board for the docking connector are still available from Mouser/DigiKey, so I could fairly easily make this a plug and play sort of thing as all of the required connections are in those two harnesses.


Edited by FieroSTi (29/08/2016 19:16)

Top
#367466 - 29/08/2016 20:32 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
I know that if it were an internal add-on to the Empeg, it'd end up installed quicker than if it were external. For me, it's easier to sit down at my desk and open up the player than it is to dig into the rat's nest in my car's dashboard.

Though that might not be the case for all folks.

I also like the idea that the module and a kernel upgrade would basically "make the player bluetooth capable" as if it were integrated. There's some awesomeness associated with that.
_________________________
Tony Fabris

Top
#367467 - 29/08/2016 23:13 Re: I made a Bluetooth interface. [Re: FieroSTi]
FieroSTi
member

Registered: 07/05/2007
Posts: 104
Tell you what. I've got a MendelMax 1.5 3D printer sitting on my desk that I've assembled, but not yet gotten working quite right. I could potentially make cases and boards for either application, should I sort that monster out. A board like I've already designed [or a future revision] with matching enclosure for external tuner-type connection and one for internal HDD tray mounting and direct Molex harness integration. Everything is fully open source and boards are/will be be available directly from OSHPark. All components are SMD save for the Molex connectors to save costs and shrink overall size. All is available from the usual suspects, i.e. Mouser, DigiKey, JameCo, etc. The discretes are all 0805 package, so; easily solderable. The RN52 and PCM5102A are a bit tighter pitch, but I managed to hand solder 5 of the latter for Raspberry Pi DACs back-to-back and didn't muck up a single pin. I have a Weller WESD51 iron with ETS 1/64" conical tips for the dirty work. They're wonderful for tight pitch soldering.

EDIT: I'm not sure if I mentioned this or not, but this RN52 piece is also capable of HFP and HSP profiles as well, so I could potentially add a microphone buffer into the next rev board to handle really bringing this little engineering miracle up to current standards.


Edited by FieroSTi (29/08/2016 23:18)

Top
#367468 - 29/08/2016 23:48 Re: I made a Bluetooth interface. [Re: FieroSTi]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
Yeah, I'd totally buy that kit and source the components myself and do the soldering.

But the software would need to be mostly worked out (ie, to a testable/alpha point) before I went to all that trouble; I'd want to know I'd have something working on the other end of the journey. smile

I'm in the middle of a time-consuming project right now which I expect to take me until ~November 7th to finish, but after that I'll probably be dying for projects like this one to tinker with.
_________________________
Tony Fabris

Top
#367480 - 31/08/2016 09:38 Re: I made a Bluetooth interface. [Re: FieroSTi]
julf
veteran

Registered: 01/10/2001
Posts: 1290
Loc: Amsterdam, The Netherlands
I am interested, but also realize this project is overkill for my needs. Yes, being able to control an external device from the empeg, but most of all I just need audio pass-through/override to accommodate sat-nav audio interrupting music as needed.

Top
#367488 - 31/08/2016 18:30 Re: I made a Bluetooth interface. [Re: julf]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 30543
Loc: Seattle, WA
Originally Posted By: julf
I just need audio pass-through/override to accommodate sat-nav audio interrupting music as needed.


If it just resistance-mixed the existing Aux Input with the bluetooth Aux input, would that solve your needs?
_________________________
Tony Fabris

Top
#367492 - 01/09/2016 09:44 Re: I made a Bluetooth interface. [Re: tfabris]
julf
veteran

Registered: 01/10/2001
Posts: 1290
Loc: Amsterdam, The Netherlands
It would have to include the override functionality (muting/pausing the music when the satnav tries to speak).

Top