Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
This weekend's big accomplishments were running the accessory power, ground, and CAN wires into my glove box, and hacking up a quick Raspberry PI empeg display program based off of Jon's excellent work on his massive LED display.
Right now I just have it showing the empeg display on the TV in my living room while I work on what the rest of the interface will look like. With all the screen real estate left over due to the empeg's very wide aspect ratio, I was going to display track data and cover art from the current song, perhaps along with some sort of "now and next" display if there's room.
I haven't had time to do the CAN bus analysis yet, but now that the CAN wires are in the glove box it should be a lot easier since I won't have to tear apart the dash. Getting all the wires and the Lockpick unit to fit in there is hard enough that I'm hoping I never have to open it up again.
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
A little bit, but nothing else in the car. I've been focusing my time on getting the software bits together for the remote display stuff. Here's a short video of what it looks like so far.
Still plenty of work to be done making it look pretty and reducing delay in loading new tracks, etc. but it'd certainly usable at this point if I had the input stuff working (I guess I could go the IR extender route with it as-is, but what's the fun in that?)
Registered: 20/12/1999
Posts: 31594
Loc: Seattle, WA
Damn impressive. Someday I'm going to have a car with one of those kinds of screen-y nav-y thingys, and I'm going to need a solution like that. I think your solution is looking extremely promising, and when that day comes, I'm going to ask you for all the software and the hardware details so that I can build one myself. :-)
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yeah, it's mostly ideas stolen from Jon's RPi LED thing and old bits of emphatic code that I've repurposed. The CAN bus hacking part is going to be the big time sink, so I've been focusing on stuff I should be able to use whether or not I can make that work properly.
There are some issues -- you can see in the above video that the running length order starts out wrong and corrects itself, which is because the dynamic data partition takes a while to get updated when you select a new playlist or add tracks to an existing running order. I don't really have a solution for this, so getting now and next display to be 100% accurate might be out of reach, but I'll take what I can get at this point.
Are you saying the display shown doesn't match the front panel display on the empeg itself? Why not? Hijack provides a perfect snap of the current display in both raw and .png format, updated whenever it's read by any app. Use that!
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Yea, I'm grabbing the player screenbuf for the top half and generating the bottom half. What I'm saying is that in order to get the running order length as a number (not as pixels) I need to read the first sector of /dev/hda3, which some time takes minutes to update. This is why you see [1/6] on the top and [1/40] on the bottom, since the previous running order had 40 entries.
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
Not as much progress as I'd hoped. The RPi and empeg apps are fine -- I added album art display, configurable track data, etc. and it would be usable as-is if I could get the freaking CAN stuff to work. I can read CAN data on the OBD-II connector, but for some reason I can't get anything from the CAN-B (convenience) bus that connects to the radio. It's probably something stupid where I messed up a connection somewhere, but I've tried a bunch of different stuff, and since nothing's documented, it's hard to tell the "baud rate isn't what I think it is" problem from the "wires aren't connected" problem, since the CAN chip initializes successfully either way. I spent about an hour on it tonight and got frustrated, but am hoping to take a look again tomorrow to triple-check connectivity, maybe try something different with the Arduino code, etc.
If I can't figure it out, I'm probably just going to punt and order an IR extender so I can have something usable in the car. The major drawback to that (other than the fact that I'll need to reach for the remote all the time) is going to be that it takes six or seven button presses to switch back and forth from the Lockpick's A/V input to the factory stereo (something I was hoping to automate with the CAN stuff.)
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I'm sure about the connections, for certain values of "sure."
I used a multimeter to quadruple-check that the pin numbers are identical for my OBD-II-to-DB9 cable I'm using for the main CAN bus (the one that works) as they are for my custom radio harness to DB9 cable that I'm using for the CAN-B bus (the on that doesn't.)
The "good" news is that I'm getting at least some radio-related output on the "main" CAN bus. I haven't decoded it yet, but I definitely get unique message when changing inputs, presets, etc. I was led to believe all the radio-related stuff was on CAN-B, but that doesn't seem to be the case.
Figuring out how I can *initiate* these might be tougher, though I did get some code from someone who did it with an older Chrysler radio that I'll probably try tonight.
For now I'm going to work with the bus I can read, and if I can't make any progress, I guess I'll have to buy a scope or logic analyzer.
Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
That sounds like your custom radio harness isn't right if anything or somehow it's a different CAN.
Maybe CANH and CANL are the wrong way around? Perhaps with a multimeter it might show enough similarities or differences that you have things right or wrong. My limited understanding of CAN is that idle should go to something like +5 on H and 0V on L.
_________________________
Christian #40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I'm getting 5.66V or so on both of them, so maybe I don't have the right connections.
I can't find a good reference for the pinouts on the 2012 Charger since it's a relatively new vehicle, but the physical shape of the plug and the number of pins matches this guy, and this PDF does list the pinouts, with pin 2 labeled "CAN BUS (+)" (which I've connected to the CAN-H input) and pin 13 labeled "CAN BUS (-)" (connected to CAN-L.)
Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
Well if they are basically the same and the same polarity you probably have the right way but standard CAN should be 0-5V. So that's a little strange but at least consistent between the two buses.
If you're getting something on the general bus, how is that possible *without* the CAN-B bus working? There must be stuff going across those pins 2 and 13 with some kind of gateway between the two. Maybe monitor those pins whilst there is traffic like steering wheel button presses. Even with a multimeter you should see some small change.
_________________________
Christian #40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
One new data point tonight: the multimeter shows 2.5ish volts on the CAN pins on the known good cable connected to the OBD connector, which suggests that the pin numbers listed on that PDF are incorrect. I can't find anything more authoritative for the 2012 model year, and I'm not really sanguine on the prospects for poking around with the multimeter trying to find the the wires that way, so for now, I'm going to go with plan B and find an in-car IR extender just to get something working. I'll keep my eyes peeled for some sort of official documentation on where to get the CAN-B connections, and see if I can find anything on the main CAN bus.
Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
Originally Posted By: tonyc
I'm sure about the connections, for certain values of "sure."
I used a multimeter to quadruple-check that the pin numbers are identical for my OBD-II-to-DB9 cable I'm using for the main CAN bus (the one that works) as they are for my custom radio harness to DB9 cable that I'm using for the CAN-B bus (the on that doesn't.)
You write as if A and B are physically separate busses. Is that really the case? Or are you just talking about the differences in the connectors?
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
There are three separate CAN buses in these vehicles, as shown here and described here. The diagram is a few years old, but I'm told it should still apply to the 2012s. The "FCM (CGW)" box is apparently some sort of gateway that would let me get through to the CAN-B bus from the CAN-C diagnostic bus, and someone on the canhack.org forums claims to have done so, but hasn't described it in detail, so I'll believe it when I see it.
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
A kind soul on the canhack.org forums pointed me in the right direction for the pin-outs. This site has connector diagrams and pin numbers for almost any connector in any Chrysler vehicle. The right answer, found here, is pin #s 7 and 18.
Now my new problem is I've got a flaky speaker connection that seems to have come loose while I've been screwing around with all of this. I thought I'd fixed it last night, but it went out again while driving today. I'm hoping I can fix it permanently without professional assistance.
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
(Partial) Success!
Pins 7 and 18 it is -- got a good CAN-B connection and am able to read the data. Now comes the really time-consuming part where I reverse-engineer what's happening on the bus.
I also got the flaky speaker situation sorted out. I was blaming a loose wire going into the back of the factory harness, but it was actually a pin in the connector that was bending out of the way when I connected my custom harness. Nudged the pin back into alignment and everything seems solid. *crosses fingers*
Whew. What a hassle. On the bright side, I've gotten really good at field-stripping my car's dash.