Thanks, Mark!

You make a lot of excellent points!


Quote:
I expect to catch up to you within a few weeks perhaps, using such a setup, blatantly stealing ..re-using.. your code/ideas to run directly on the empeg.


It's not stealing if I *want* you to take it. smile Of course, you're going to have to rewrite it significantly to get it working on the empeg. There are some things you'd have to do quite differently on the empeg.

I'm really hoping that you'll catch up and surpass me, so that either one or both of us are successful. I can envision either you completing something that works before I finish mine, and I just drop what I'm doing and use your project instead, or I get my project working well now, use it for a little while, and then eventually switch to using yours later.


Quote:
So.. now that you've rolled your own RS232 level converters, perhaps think about using that to interface the BT board directly to the empeg, rather than having an extra processor (Arduino) in the middle?


I clearly see the advantage to doing it that way. To be successful at that, I'd need to level up in a couple of areas that I don't have enough experience in right now: Code development on the empeg itself, and the necessary EE knowledge to get the bluetooth chip working directly on my own board. Both would require that I get outside help that's a little bit higher level than what I've had so far. Right now, the solution I'm building is within my power to complete soon, and I'd like to try to get that working first, even if only for better debugging the code and understanding all the bluetooth communication tricks. In any case, whenever you get something working with your method, I'm happy to take your design and your code and roll with it.


Quote:
I'm not sure that the empeg really has the concept of an "Album" (or does it?). It knows about "playlists" though, and those have names which could be made available.


Yes, the empeg has a field for the album name and displays the album name on its screen just fine. That's just one of the fields that wasn't included in the serial port output at the moment.


Quote:
If the pause/play status is being lost somehow, you can still detect it in your middleman by noting that the timecodes either stop or stop increasing.


Indeed! I thought about doing just that very thing as soon as I saw the root cause of the issue. However there is a problem with doing it that way: If you are fast-forwarding or rewinding when the player is paused (something that it possible to do on the empeg from its front panel), then it might falsely tell the host stereo that it's playing when it's actually not. Still, that might be better than what it's currently doing.

By the way, that's another bug in the current code: It does not implement fast forward and rewind from the car's front panel or steering wheel controls. This is because my car doesn't do that and so I have no testbed that implements the feature to get that working. My car is weird in this regard. It has several things where you might expect FF/REW to work, and it simply doesn't work this way at all. There are no independent buttons for FF/REW, and holding down the Next/Prev buttons does nothing in most cases. What's interesting is that it does implement FF/REW in one particular specific case, but its absence in other cases is puzzling:

- Honda stereo connect to smartphone with bluetooth to play music: No FF/REW.
- Honda stereo connect to smartphone in "iPod" mode via USB cable: No FF/REW.
- Honda stereo built-in CD player (this is where I expect it to work most): No FF/REW.
- Honda stereo connect to iPhone Apple Car Play with USB cable: FF/REW works.

The bluetooth AVRCP commands that I receive from the module have a "button down" and "button up" message (a press and a release) so you'd think that I could implement it by having my own code detect the time span between AVRCP PLAY PRESS and AVRCP PLAY RELEASE commands. You'd think that. But the Honda stereo doesn't split them out. If you hold the button on the Honda stereo, it waits until you release the button then sends both of those messages simultaneously after your release. Sigh.


Quote:
I finally appreciate just how tiny the actual WT32i BT module is. And it really needs hardly nothing to hook it up directly to something like an empeg.


Like what? I haven't been able to decipher all the specs on the datasheet yet. It's a lot of information to get through.



Quote:
If the WT32i board were mounted inside the empeg, say onto a drive bay, then it could draw power from the empeg itself, and even use digital audio input (I2S) from the empeg (no hum!).


Yes yes yes! This! I have thought about this many times as I have been working on this. I have no idea where to even begin implementing something like this. Stu might know. smile I wonder if it's as simple as connecting some wires from the empeg to the I2S inputs on the BlueGiga chip, or if a ton of circuitry is needed? That BlueGiga dev board has a ton of digital audio interface pins.


Quote:
There is the small issue of a low powered RF device tucked inside an all-metal shell, but that could be dealt with in a number of ways. Eg. a replacement empeg lid made of a different material, or perhaps just a strategically located hole in the lid.


I wonder if it would "Just Work". The empeg shell isn't a proper faraday cage to begin with, is it? And the BlueGiga chip has a really decent range (I tested it out to be approx the width of my entire house the other day) so maybe having it in the car trunk inside the empeg would be fine? Dunno.

The other option is an external antenna of course. The chip has provision for that, I'm sure. Run it out the back somewhere. Perhaps replace one of the pins on the dock connector that you won't be using any more, such as the cell phone mute wire (won't be needing that wire any more since the bluetooth handles all the cell phone muting now).

Anyway, exciting times!

Thanks Mark, and to everyone else on the BBS, who has been offering tips and answering questions as I go along with this project. You've all been so great!
_________________________
Tony Fabris