Giter VIP home page Giter VIP logo

podemu's Introduction

About

PodEmu is Android application that allows you to connect your Android device to iPod docking station or your car audio system. PodEmu supports both AiR (Advanced) and Simple modes so you can control your Android music app directly from docking station or from your cars steering wheel. PodEmu uses serial protocol to communicate with iPod docking station so it will work only with "old" 30-pin iPod connectors. Lightning interface is not supported.

XDA Developers discussion for this app is here

PodEmu in action:

PodEmu in action

Features

  • No root required
  • Display track/time information for currently playing song on your car audio system or docking station display.
  • Control your favourite Android music app (eg. Spotify, YouTube, Amazon Prime Music, Apple Music) directly from car's steering wheel or docking station remote control
  • Download docking station color image to android device. Car audios usually have this feature.
  • Support for Bluetooth serial devices. You can assemble the dongle and connect your android completely wirelesly.
  • Entirely Open Source :) You can modify and redistribute as long as you comply with GPLv3.

Screenshots

PodEmu with cable not connected PodEmu with bluetooth connected and connection with the car established PodEmu with Apple Music
PodEmu with Apple Music PodEmu with Amazon Music PodEmu Settings (screen 1)
PodEmu Settings (screen 2) PodEmu Settings (screen 3) PodEmu Settings (screen 4)

Requirements

  • Android device with USB host support (USB host support not required if you are using FT311D or FT312D dongles, or Bluetooth)
  • DIY cable or DIY bluetooth dongle. Unfortunately there is no ready-to-use cables available on the market so you need some basic soldering skills to assemble your own cable. Read further for details.

Supported Music Application List

PodEmu will support any music application out of the box if this application properly declares notification in notification/status bar. The table below summarizes the behavior of the applications with which PodMode was tested.

Additionally, please remember, that in order support track/album/artist/playlist/genre navigation fully PodEmu need to have this information provided. Unfortunately there is no way to retreive this information through the notification bar. In the best case PodEmu is only able to gather information about currently played track, total playlist size and current track position. Therefore PodEmu is trying to mimic the rest of the information for the docking station to be able to operate. Please also note, that each docking station behaves differently and therefore final behaviour will be also different. Feel free to provide feedback with your experience on XDA thread or raise an issue through GitHub issue tracker.

Application Support for basic control (play/pause, prev, next) Provides metadata information Additional information
Google Play Music yes yes fully works
Spotify yes yes Metadata does not contain ListSize and ListPosition information. Default list is generated with ListSize=11. Additionally, Spotify delays notifications after you scroll the song forward or backward, so playback position maynot be updated in your car instantly.
TIDAL yes yes ListSize and ListPosition not provided, so generic playlist with size 11 is generated. Scrolling seems to be updated immediately.
PowerAmp yes yes All notes are the same as for Spotify
Apple Music yes yes Stable with PodEmu, instant status updates
Amazon Prime Music yes yes Artworks are not downloaded. The rest works properly.
YouTube yes yes YouTube does not notify when the track is paused.

If you don't see your favourite app in the table above, don't worry, most probably it will still work with PodEmu.

ListSize and ListPosition information is very important to be able to see the total amount of songs in the playlist from the docking station and to be able to select random song from list and jump to it. Whenever this information is missing PodEmu will not know how many songs are in the the current playlist and will not support "jump to" command. In such case you will see one album, that contains 11 songs. Also remember, that even if ListSize information is provided, PodEmu don't know track names "a priori". Therefore, first time you browse them from docking station, you will see titles like "Track XYZ" for all of them. However, once the song is played, it's title is remembered at given position. This list is flushed when total count of song is changed or application is restarted.

How it works

To work properly PodEmu requires to be connected to your car using two separate channels:

  • audio channel (obvious)
  • data channel (for controll and metadata information)

Audio is transmitted through "calssic" analog lines. For metadata serial interface is used. PodEmu will not work with usb/lightning cable, because with such cables all information (including audio) is transmitted digitally and PodEmu is not able to interpret it (plus due to Android architecture it might not be possible to properly recognize the external device and talk to it).

Both channels mentioned above could be connected directly using wires, or bluetooth modules. Below you can find multiple options available to connect your Android device with iPod 30-pins interface.

Audio channel can be connected directly, by wires, or with use of BT module that supports A2DP profile, for example XS3868, RN52, BK8000L.

Data channel could be connected by wires. In this case you will need any USB-to-serial interface like FT232R, FT231X, FT311D, FT312D, PL2303, CP2102, CP2105, CP2108 or CP2110. Alternatively, you can also connect it with any BT module that supports SPP profile (except BLE devices which are too slow). For BT you can use modules like HC05, HC06, RN52.

Obviously you will also need to power all the modules up. There are multiple ways to do it. Below is an example of wiring diagram for XS3868 and HC05 modules that are powered up by LM2596, but you can use any power suply that can provide appropreate voltage and current.

Note for all diagrams below: R1/D1 elements are only required for those cars/docking stations where car or docking station expects the pin 18 to be pulled up to 3.3V by iPod. Otherwise it will not recognize iPod connection. R1 is required to limit the current and D1 is added to protect the dongle (could be ommitted to be honest). If you are not sure if you car needs it, it is safe to start without R1/D1 and if car does not recognize connection, then just add it.

Connection diagram: Wired

This is the simplest and the most reliable version of connection.

Supported serial interfaces:

  • FTDI: FT232R, FT231X, FT311D, FT312D
  • Prolific: PL2303
  • SiLabs: CP2102, CP2105, CP2108, CP2110

PodEmu was tested with FT312D, PL2303, FT232R, CP2102. Other chips should also work (as claimed by driver developer), but were never tested with PodEmu.

Connection diagram: Bluetooth with HC-05 and XS3868

Bluetooth setup was tested with HC-05 as serial interface device and XS3868 to stream audio. Connection diagram that was used is the following:

Before start using HC-05 it need to be configured properly. To do this you need to issue the following commands:

AT+NAME=PodEmuSPP - to change module name. Instead of PodEmuSPP you can use whatever you like.
AT+UART=57600,1,0 - to change baud rate. This command is mandatory for PodEmu to work correctly.

Instead of using HC-05 and XS3868 you can use any other BT modules that provide SPP and A2DP profiles. SPP is a profile for serial communication. A2DP is a BT profile used for audio connection.

Important notes:

  • do not short audio ground (pin 2) with power ground (pins 15 and 16). If you do it, significant noise will appear.
  • voltage is set to 3,55V and not to 3,3V. 3.3V is normal operating voltage for HC-05, 3.6V is maximum for HC-05. However 3.6V should be minimum voltage for XS3868. When voltage drops below 3.5V, XS3868 will produce audible warnings. To avoid it, but to stay within HC-05 voltage limits it is recommended to set voltage between 3.5V and 3.6V. There are known cases when slight exceeding 3.6V burned HC-05.
  • before using HC-05 it need to be configured. You need to change Baud Rate to 57600 (or whatever rate is required by your car/dock station) AT+UART=57600,0,0 For details about configuring HC-05 please refer to this manual
  • changing device name is not required, because you can choose the device from paired devices list from the application
  • after BT module is configured, you need to manually pair with it. Once paired, start PodEmu, go to settings and select your device from the list of paired devices. Then PodEmu will connect automatically.
  • serial interface cable has higher priority to connect, so if it is attached, BT will not connect. Detach the cable first and then restart the app.

Connection diagram: Bluetooth with RN52 (basic)

Setup with RN-52 module is shown below. The big advantage of this module is that it supports both audio and serial profiles, so you don't need to pair your phone with 2 bluetooth modules. Disadvantage is high price (~25 USD).

Note: if you use SparkFun breakout board as depictured above, for some reason they didn't made the pad for AudioGND pin, so you'll need to solder to pin 39 of the module (AGND). This is 6th pin from the topmost right side on the picture above. Luckily there is thick copper area below "SPK_L-" that you can use.

There is minor issue with such connection. Due to the fact that RN-52 is using differential output and we are using only audio positive lines, there are electrical spikes few seconds after audio goes mute. It can be heard as single "clicks" few seconds after going on mute.

Before using RN-52 module you need to program it. It is done by connection GPIO9 pin to ground. Then you can connect module to you computer to standard COM port using UART_TX and UART_RX and program it. Commands you will need:

su,04 - set baud rate 57600
sd,06 - enable only A2DP and SPP discovery profiles
sk,06 - enable only A2DP and SPP connection profiles
sn,PodEmu - set device name to RN52-PodEmu
ss,0F - set default gain level to maximum

Connection diagram: Bluetooth with RN52 (advanced)

For those who has pcb production skills I recommend to use this schematics. In comparison to previous RN-52 schematics, this implementation uses TPA6112 audio amplifier with differential input. Using this amplifier eliminates "single clicks on mute" issue described in previous section.

Note: Don't forget to setup RN-52 module as described in previous section.

My personal implementation of this dongle looks like this:

EasyEDA project files: https://easyeda.com/e-lab/podemu-module

Reporting issues and requesting enhancements

Please use "Issues" tab on GitHub to report a problem or request an enhancement. You can also report a problem directly from application. For this, just enable "Enable debug collecting" option in settings, then reproduce the issue, and then use option "Send debug to developer". This will send debug file with all logs from application. Don't worry, it will not collect your personal data. However, while sending, please don't forget to describe the problem you are encounting - otherwise your email will be ignored.

Credits

podemu's People

Contributors

xtensa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

podemu's Issues

does the PodEmulator can emulate thru USB?

My car audio system (sony cdx-gt55uiw) has a USB port and supports iPod. Works without problem for the iPhone like it is an iPod and could play from any app on the phone. But if I use my android phone it will try to read it as a flash drive and plays the media that finds in the phone. The android phone (google pixel 2) has the File transfer/Android auto enable, and doesn't seem to send any audio thru the USB to be listened thru the car speakers.

Is there any way that an app can emulate an iPod and been able to use the phone as I have used the iPhone to play Pandora/Spotify/etc..? I did try the PodEmu but it is waiting for a serial adapter, it doesnt work with USB? I thought that was similar to an iPod docking station.

BMW display issue.

All controls seem to function but it's not displaying the data right. Not sure if this is due to my adapter or a bug itself. Car is a 2008 5 series.

20190416_121843

Bluetooth autoconnect and maxing out the volume

This is probably a bit out of scope. To have all fully automated (when getting into car), I need 2 more apps: Bluetooth Auto Connect and Bluetooth connect & play. The first one auto-connects to the AptX-Receiver as soon as HC-05 is connected (because my AptX-Rcv doesn't auto-connect unfortunately), and the second one maxes out Bluetooth Volume (very important, because it never ever sticks to max otherwise) and start playing Spotify. Would be really great if this could be implemented in PodEmu, so I don't need those 2 apps.

Feature Request: Expanded Media Control

Hi,

One of the challenges with the project is App compatibility, as not all media apps will present and allow metadata notification. However, for many users, meta data display is not a requirement as the smart phone itself presents that data with a dashboard mount.

But what is still highly useful is Steering Wheel Controls...which may be as basic as Next Track/Previous Track, or expanded to Play/Pause etc...

PodEmu already has a "simple mode". When this mode is selected, it would be great if PodEmu would expose 3 new "controlled apps":

  1. Generic Media Player
    This setting would fire KeyEvents that Android would direct to the current media player
    mediabuttons. This would allow almost all Apps to be controlled, and allow the user to switch media apps without interruption. Albeit with the loss of metadata support.

  2. Android Auto
    Similar to the above, but specifically targeted at the Android Auto app. The Android Auto app then directs the event to the currently active media player. Since many of use Android Auto as the front end (whether running on the phone or sent to the head unit), this would also allow us to navigate media with steering wheel controls, regardless of whether the app is Spotify or Amazon Music, to name just two. I have tested this with Tasker Tasks and it works.

  3. Tasker
    For almost unlimited possibilities support a Tasker App that fires an Intent to Tasker with a payload representing the action. We could then build Tasker tasks to do almost anything! Maybe this feature is an "and" that works with the other App settings. If we create an additional Tasker App Control, as opposed to an alternate control (i,e, AND), then we should also support an App called No App. If that makes sense!

These 3 (related) changes would open up so many target apps - albeit in simple mode.

Hope I explained all that in a vaguely useful way.

s.

More Defined Parts List in Readme

Note: heavily edited to help me pick parts.

Hi, great work on this code base, it really stands to improve a lot of ppls lives.

After a quick look in the readme, I couldn't figure out what parts were necessary. I also couldn't figure out where to get PodDock at all (Edit: I just found this after closing some tabs acutally... APPLE-30F-BO-V1A)! The closest alternative I could find was the part with the searchable ID APPLE-30F-BO-V1A but it isn't an 'in-line' style device, it's more like a part you would use when building an actual dock :( Any ideas as to where to find this, and does adding a section to the readme including parts sound like a good idea? e.g.

Parts List (Blue Tooth Build)

  • Bluetooth Data Transceiver Supporting SPP (HC-05, RN52, etc.)
  • Bluetooth Serial Interface (FT232R, FT231X, FT311D, FT312D, PL2303, CP2102, CP2105, CP2108 or CP2110)
  • Bluetooth Audio Streaming Module (XS3868)
  • 1amp DC-DC step down converter (LM2596)
  • Apple 30pin Female breakout (APPLE-30F-BO-V1AC) or a $7 iPod Dock 30pin Female to 3.5mm adapter from ebay

Parts List (Direct Connect Build)

  • Android USB to Serial Interface (FT311D or FT312D)
  • 1amp DC-DC step down converter (LM2596)
  • Apple 30pin Female breakout (e.g. the simple $7 iPod Dock 30pin Female to 3.5mm adapter from ebay)

Dension Gateway 500

I’m curious as to if anyone has used this with a Dension Gateway 500 iPod dock. I’ve got an old Volvo XC90 that I’ve installed a new android head unit on (replacing the centre speaker that turned out wasnt there anyway) and while installing it I found this Dension unit installed behind the dash. I’ve got the android unit working with the analogue inputs on that unit and it’s actually working really well but I was thinking if I could somehow use this module with the iPod dock I’d also be able to invoke steering wheel controls and indeed be able to see the ID3 info on the car stereo when the music app isn’t on screen on the android unit (well.. Apple CarPlay.. the built in UI is horrifically bad!).

So any experience in this area?

Still Have the Dongle?

Hey sweet project! Do you still have this dongle? It is hard to source parts. If you no longer user it we have the same car and I'd be happy to purchase it from you :)

USB interface support?

My head unit connects to my 5G iPod via a USB port (which I connect to using the 30pin to USB cable). Why would I need a custom cable if the connection is ultimately USB?

Double-byte characters are garbled.

Double-byte characters are garbled.
"app/src/main/java/com/rp/podemu/OAPMessenger.java"
Somewhere above I have a problem converting a character to hexadecimal. As shown in the debug log. Is it a character encoding issue? Is it possible to fix this bug?

For example:
2024-01-09 08:08:39 (000) : PodEmu - OAPM: MSG OUT | 04 | 00 21 | E3 83 AD E3 83 9E E3 00 B3 E3 83 81 E3 82 B7 E3 82 BA E3 83 A0 20 [ロマ�
This is how it should be.
Title:ロマンチシズム
hexadecimal: e383ade3839ee383b3e38381e382b7e382bae383a0

FT311D dev board and USB C on a Galaxy S9

I'm still reading about how I should be able to get this to work, but I will detail what I have so far.

I have one of these: https://www.ebay.com/itm//332671609701 and I have plugged the phone into the USB A (female) port using a regular USB C (male) to USB A (male) cable. This does nothing because the board is not powered from the phone that way. I have plugged the board into a regular wall-based phone charger into the USB micro B (female) port and the LED lights up and my phone recognizes the device. It states that no application is installed to use the accessory and links me to ftdichip.com (so I know it's connected and reading the right chip VID:PID). PodEmu still says disconnected and PodMode says 'accessory attached' followed by 'model is not matched' which also tells me that it is connected and recognized but the phone is just choosing to do nothing with the device. I suspect that I have to change the device name to work with PodMode (by using the developer tools from ftdi and hacking together a 'null modem' usb cable from an ft232) but I expected it to work with PodEmu.

Feature Request: Disable (Skip) Image Download

Background: The image download process is often unsuccessful on Bluetooth connections, resulting in a "lock up / frozen" state. When the image does successfully download, the PodEmu features and playback work correctly.

Request: Can you please add a "Disable Image Download" option to bypass this step, and increase the chances of successful connections via Bluetooth.

Thanks in advance! :)

"Now Playing" playlist is missing

On the very first connect, when I select iPod in my iDrive, it starts with a "Now Playing" screen (which seems to be some sort of playlist, because it's a sub of "playlists"). This is the perfect screen for me, because it shows only the actual playing track. The problem is, as soon as i press Back and go into another submenu (i.e. Songs), I can't go back to Now Playing, because this playlist/menu is missing. The only way to go back to this screen is actually doing a factory reset of the USB/BT control module of the car. Can this "playlist" somehow be implemented?

Play/Pause issues (BMW)

Hi!

Don't know if you remember me, I was the first one replying to your XDA thread :-) I never went to use your app back then because I sold my car. Now I got a 2006 BMW with iDrive and I'm finally using PodEmu with Spotify through Bluetooth HC-05 + AptX-Receiver, which works pretty nice! Some problems/feature requests I have:

  1. On the very first connect, when I select iPod in my iDrive, it starts with a "Now Playing" screen (which seems to be some sort of playlist, because it's a sub of "playlists"). This is the perfect screen for me, because it shows only the actual playing track. The problem is, as soon as i press Back and go into another submenu (i.e. Songs), I can't go back to Now Playing, because this playlist/menu is missing. The only way to go back to this screen is actually doing a factory reset of the USB/BT control module of the car. Can this "playlist" somehow be implemented?

  2. When i press play/pause in my car, the music app correctly pauses. But I'm unable to make it play again with this button. If I press forward/back it starts to play again, but the track info/time is frozen until I reconnect Bluetooth or restart PodEmu app. Also when I shutdown the car, it doesn't pause and keeps playing. With a regular iPod it does pause though. Anyway to improve this?

  3. This is probably a bit out of scope. To have all fully automated (when getting into car), I need 2 more apps: Bluetooth Auto Connect and Bluetooth connect & play. The first one auto-connects to the AptX-Receiver as soon as HC-05 is connected (because my AptX-Rcv doesn't auto-connect unfortunately), and the second one maxes out Bluetooth Volume (very important, because it never ever sticks to max otherwise) and start playing Spotify. Would be really great if this could be implemented in PodEmu, so I don't need those 2 apps.

Let me know if you're interested in all of this and if I could help with testing or sending debugs or anything helps.

Thanks!

PodEmu randomly closing

Every once in a while I need to open PodEmu app to be recognized by the car. It seems to close itself after a while (maybe also due to OS memory cleaning or whatever). I already disabled battery optimization. I don't have this problem with the other 2 bluetooth apps I need, those always are running. Maybe you can implement some sort of watchdog? I also see on other apps the option "start on boot", maybe that would help. This is on Android 9.0.

User defined "Generic Track" text option

Feature Request:

I have have a feature suggestion for the app: when it first loads and connects, the car stereo will display "Generic Track" etc, until a track is played.. As this idle state text appears when no valid media is playing on startup, could we have the option to set this idle "text" to something user defined, in the PodEmu app?

For example, I would really like to be able to replace "Generic Track" with something more friendly, such as "Ford Mustang", or, "Hello Pez!", etc... Often I don't listen to any music, but rather I have the PodEmu system connected to have BT media audio from Google maps, etc...

Additionally, If there is the option to have Android system information (such as Google Maps navigation information) displayed, then this could be useful also.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.