Closed cammurray closed 4 years ago
did the client receive anything or just silence?
try to run the client in debug mode and write a trace file to understand what the problem is
Hey @oandrew complete silence - but that is to be expected, as the project i'm trying to use your code in is only for the accessory protocol stuff - e.g I just want to get a hold of the commands the car is sending for track control, and also be able to display on the screen. In my particular car, audio is not set over the USB, but instead via an AUX 3.5 jack. There are a couple of cars that do it this way..
The trace file comes back empty, which is a little weird. Any thoughts on that?
Funny timing, I'm looking to do exactly this with my 2012 Elantra.
From what I can tell the car needs to connect through a special cable like this one and won't work through a the standard iPod cable. This leads me to think that there might be something active in the cable itself preventing the car from recognizing the iPod (or PI in this case) as an iPod...
I'm still waiting on mine from Aliexpress and will post back with a tear down if there's anything interesting going on in the cable.
Hey @nadavami - great to see someone else with similar requirements, will be great to work together to come to a solution.
I thought the same thing as you, but I had one of the official cables. I ripped it apart and noticed there was a bunch of resistors, but I don't recall seeing any IC's. I'm away for work at the moment but if I get back before you get yours from Aliexpress i'll post a picture of the insides of mine.
Absolutely and thanks, pictures should really help!
That also reinforces some of my previous suspicions. I have a strong feeling the cable is using the resistors as a voltage divider to tell the car that the "OEM" dongle is plugged in and go into iPod mode (vs Mass Storage).
My guess is that they're using the Mic pin on the dongle's TRRS connector to do that. Especially since leaving the cable it's only TRS without the Mic pin.
Time will tell :)
So, I I got impatient and ordered a cable from Amazon earlier this week, I took it apart and it looks like the cheap knockoffs don't actually work or have any components inside.
Undeterred, I found an original on Facebook marketplace (which I should have checked in the first place) and spent the day reverse engineering it.
Here's a summary of what I found (i'll probably do a full blog post at some point).
@nadavami you might want to check out PodEmu app for Android + this thread: https://forum.xda-developers.com/android/apps-games/app-podemu-connect-android-to-30pin-t3234840
@oandrew Thanks for the tip! I've decided to build something specific to my use-case in the end.
For anyone else who might be interested in the future, here is the schematic for the cable used in these cars https://github.com/nadavami/Hyundai-iPod-Cable.
@nadavami did you manage to get this project working using one of your custom cables?
@cammurray I wasn't able to get this one working, but I have a working proof of concept running over here https://github.com/nadavami/iAP-to-AVRCP.
I'm trying to use this purely to obtain steering wheel controls and onscreen display of tracks. My car (Hyundai i30) takes the audio from an AUX port, and uses the USB port for iPod Accessory communication..
On the other end is a Raspberry Pi Zero which i've managed to compile the kernel module fine.
As soon as you load the iPod client, however, the i30 states; "Reading USB" for around a minute or two, then comes up with an error that it cannot read the USB.
I've tried changing swap_configs and product_id's when performing the insmod on the g_ipod_gadget kernel module as such:
insmod /home/pi/ipod-gadget/gadget/g_ipod_gadget.ko swap_configs=1 product_id=0x1207
i've tried various different product_id's to no avail.
Any ideas?