Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Is there such a thing as an Pi iPod emulator?

Tue Oct 18, 2016 6:48 pm

I have tried to search, but only found a bunch of projects that has placed the Pi into iPod cases. Which isn't at all what I'm looking for. I'm wondering if there is a way to make a Pi look like an iPod to a car. I have a Volvo 2013, and even with such a new car the maximum amount of tracks I can use on any USB storage media is 10 000. And I have around 120 000 tracks that I want to have in my car. Why? Well, both because I need an extra backup of my library somewhere, and I might as well use it for something, and because I have been doing carputers for ages (since the very early 2000's). So I'm not used to limits on tracks. I thought about the iFlash project, but there is a limit there on the number of tracks at around 50 000. And having three of those just isn't practical. So if there is some way to plug a Pi into the USB plug of my car and make the car think it's talking to an iPod that would be the perfect solution. Is there such a thing?

broe23
Posts: 902
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Is there such a thing as an Pi iPod emulator?

Tue Oct 18, 2016 9:57 pm

It has nothing to do with the hardware. It has to do with the fact that the USB jack in your vehicle is only for reading audio files off of a storage device. If you want to use the pi as a server for music handling, you would need to add a touch screen and then figure out how to pipe the output through either Bluetooth or USB.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

tweak42
Posts: 536
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 3:15 am

Very unlikely. The issue is your car system is a usb host and you connect usb devices to it to talk. All Pi's are also usb hosts, and you cannot connect host to host.

There is one exception. The Pi Zero has the capability to flip it's host controller around to act as a device (gadget mode). There are a variety of modules for devices it can emulate. https://gist.github.com/gbaman/50b6cca61dd1c3f88f41
Thus if someone wrote a module that speaks Apple's likely proprietary code to emulate an iPod, it could in theory be done.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 6:34 am

Thanks for answering, both of you!

Broe23, that can't be right. Because when conncting an iPod to the USB in the car it browses the library as fast as the iPod can browse it's own library, while another USB connection is a lot slower to browse with many files. So there has to be some kind of protocol there that interfaces the car system to the iPod system, it's not a simple mass storage protocol, like when using an USB disk or flash memory. And if I have to do it in the way you're suggesting (which I have thought about too) I will do it with a lightweight PC I'd rather use J.River Media Center and their J.Remote to run it on a small pc instead of a Pi. That gives a lot more advanced possibilities.

Tweak42, that sounds exactly like what I would like. Unfortunatly I couldn't code myself out of a brown paper bag (expression stolen from "Black Adder") or to save my life in anything but Python and LUA. So since nobody has made such a module, and I really want this up and running soon, I guess the lightweight PC is what I have to do. I will get a Compute Stick today and start testing. I should be able to connect it to the car system with Bluetooth, so I can see the track info in the car system and browse the library with my phone. Only halfway to what I really wanted, but I may have to settle, for once in my life...

tweak42
Posts: 536
Joined: Tue Mar 22, 2016 3:16 am
Location: Los Angeles, California

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 7:39 am

Mastiff wrote:Thanks for answering, both of you!

Broe23, that can't be right. Because when conncting an iPod to the USB in the car it browses the library as fast as the iPod can browse it's own library, while another USB connection is a lot slower to browse with many files. So there has to be some kind of protocol there that interfaces the car system to the iPod system, it's not a simple mass storage protocol, like when using an USB disk or flash memory. And if I have to do it in the way you're suggesting (which I have thought about too) I will do it with a lightweight PC I'd rather use J.River Media Center and their J.Remote to run it on a small pc instead of a Pi. That gives a lot more advanced possibilities.

Tweak42, that sounds exactly like what I would like. Unfortunatly I couldn't code myself out of a brown paper bag (expression stolen from "Black Adder") or to save my life in anything but Python and LUA. So since nobody has made such a module, and I really want this up and running soon, I guess the lightweight PC is what I have to do. I will get a Compute Stick today and start testing. I should be able to connect it to the car system with Bluetooth, so I can see the track info in the car system and browse the library with my phone. Only halfway to what I really wanted, but I may have to settle, for once in my life...
Unfortunately, I think the car manufacture infotainment system trend is to to support streaming services (hello revenue stream). Thus if you want to store your own music library, you're stuck with building your own system or hoping an after market company produces something decent at a reasonable price point.

fruitoftheloom
Posts: 24509
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 7:47 am

Mastiff wrote:I have tried to search, but only found a bunch of projects that has placed the Pi into iPod cases. Which isn't at all what I'm looking for. I'm wondering if there is a way to make a Pi look like an iPod to a car. I have a Volvo 2013, and even with such a new car the maximum amount of tracks I can use on any USB storage media is 10 000. And I have around 120 000 tracks that I want to have in my car. Why? Well, both because I need an extra backup of my library somewhere, and I might as well use it for something, and because I have been doing carputers for ages (since the very early 2000's). So I'm not used to limits on tracks. I thought about the iFlash project, but there is a limit there on the number of tracks at around 50 000. And having three of those just isn't practical. So if there is some way to plug a Pi into the USB plug of my car and make the car think it's talking to an iPod that would be the perfect solution. Is there such a thing?
The iPOD is an On The Go Device, therefore can either be in host or device mode.

https://en.wikipedia.org/wiki/USB_On-The-Go
Last edited by fruitoftheloom on Wed Oct 19, 2016 7:53 am, edited 2 times in total.
Thinking outside the box is better than burying your head in the sand...


Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 7:50 am

Tweak42, the problem for me isn't the price, it's that most of my music isn't on any streaming services. Underground black and doom metal has for some strange reason not been considered profitable on Spotify or whatever! :lol:

Fruitoftheloom, I do understand that. I just hoped there was a way around it. But I'm on to next idea now, the full carputer.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 7:51 am

rpiMike, simultaneous posting. :mrgreen: I have seen that one a long time ago (it's been dead for several years...), but unfortunately it doesn't help me at all because I can't code the missing parts.

User avatar
rpiMike
Posts: 1534
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 8:03 am

I can code, and this sounds interesting, if I can find some time i'll have a go at this.

I leave an old iPod nano connected to my range rover but its limited to 16GB

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 8:07 am

How nice! Then I will hold off the carputer a bit. Do you have any idea how long time we're talking about before you may get to it? I will buy a Pi 2B today, I will be close to a shop that has them anyway.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 8:10 am

Oh, not to mention that I have a lot of experience alpha and beta testing all kinds of stuff, I do a lot of home automation. If I can't find a problem, I let my wife have it to play with for a few hours, and if there is something that can go wrong it WILL go wrong when she's working.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 8:37 am

Btw would it be best to go Pi3 or 2? I think I'll get the 3 just for the WiFi. I know that it affects BT streaming of music, but that's not a proble since this project is about USB. :mrgreen:

User avatar
rpiMike
Posts: 1534
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 8:41 am

I downloaded the C# SerialTest.zip example and it does still build and run.

I'll need to work out how to make a usb to ipod connector socket cable unless I can buy one. I'll try and get it working on a PC first then transfer to the Pi.

Don't know on timescales, I have a bad habit of starting projects and not finishing them :(

You may be able to get away with a Pi Zero - it'll draw less power from your car, but I guess you'll only be using it when the engine is running.

User avatar
davidcoton
Posts: 5503
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 9:04 am

rpiMike wrote:You may be able to get away with a Pi Zero - it'll draw less power from your car, but I guess you'll only be using it when the engine is running.
If the transfer needs gadget (I haven't checked, but it seems likely as the alternative is host to host, which doesn't work), then you can't use Pis in the B series (B B+ 2B 3B) because of the USB hub on board. You will have to use a Zero, A, A+, or 3A (when it arrives).
Location: 345th cell on the right of the 210th row of L2 cache

fruitoftheloom
Posts: 24509
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 9:06 am

Mastiff wrote:Btw would it be best to go Pi3 or 2? I think I'll get the 3 just for the WiFi. I know that it affects BT streaming of music, but that's not a proble since this project is about USB. :mrgreen:
May I ask why you want to emulate an iPOD ??

Surely the Car Infotainment System System will seek a USB Mass Storage Device formatted FAT32 ?? if so then a RPI Zero can be a USB Mass Storage Device !!
Thinking outside the box is better than burying your head in the sand...

User avatar
rpiMike
Posts: 1534
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 9:24 am

We want to control music selection using car stereo (via ipod connection). The Pi will then play music selection and output via audio lineout through same ipod cable. The Pi will not be in USB mode.

Mastiff's volvo is limited to 10,000 tracks on USB storage.

User avatar
rpiMike
Posts: 1534
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 11:54 am

Just ordered a cable that I hope will give me the required connections :

http://www.ebay.co.uk/itm/Micro-USB-to- ... Sw9mFWGXbe

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 2:17 pm

DavidCoton, I have bought the 3B, but I can get another one later. I can probably find something fun to use this one for anyway. :mrgreen:

Fruitoftheloom, as rpiMike says Volvo Sensus (I have a 2013 XC60) is limited to 10K tracks on a mass storage, and anyway it get's very slow at anything above a few thousand tracks. I want my well over 100 k MP3 tracks to be available in the car, and this seems
to be the best way to do it, because I will be able to browse the library with the steering wheel controls, just like on a regular iPod

rpiMike, great, thanks! I hope this is one project you will finish! Just let me know if DavidCoton is right, and I'll order another Pi. Also, if you need material like the cable for the project, let me know in PM and I will PayPal you the expenses. Not only do I feel that I contribute, but it may also make you feel obligated to finish up the project! :lol: :mrgreen:

Edt: Which of the mentioned Pis should I get for this? I have found the A+, but if the 3A arrives some time soon, that may be better. Or I can get an A+ now and then upgrade to the 3A when that comes.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 3:51 pm

Possible pitfall...suddenly occured to me how I should get the 2 tb disk with music connected to this thing when the USB is busy! Is the long pin plug that looks like an IDE plug really that, so I can use it with an IDE to S-ATA adapter?

User avatar
rpiMike
Posts: 1534
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 4:46 pm

The Pi3 has 4 USB ports so one for iPod connector to usb cable, one for hard disc. Is it a 3.5 inch hard disc - not sure I'd want to use that in a moving car - a 2.5 inch may be ok as designed for laptops.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 5:47 pm

Yeah, I will be using a 2.5" external drive. But I was thinking about what DavidCoton said, that we'd have to use the A, A+ or Zero version. But I'm a bit confused: Why do you need to use the iPod interface cable? There is a regular USB plug in my Volvo, so shouldn't it be a regular male to male USB cable?

broe23
Posts: 902
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 6:24 pm

tweak42 wrote:Unfortunately, I think the car manufacture infotainment system trend is to to support streaming services (hello revenue stream). Thus if you want to store your own music library, you're stuck with building your own system or hoping an after market company produces something decent at a reasonable price point.
No one is trying to collect a revenue stream by you connecting a bluetooth or USB capable device to allow music to be controlled by the radio. It is because the fact that the Pi is also a server. As stated before, you can use the Pi Zero to hand off the music to the radio, but then you are decoding it twice and will affect the music.

If you want to recreate the wheel, you need to understand that if you want just music to be streamed to the radio, you can use a USB storage device as long as there is enough power at the USB port to control it. If you want to use a Pi 3 as a music server, you will need to add a touch screen to allow you to connect via Bluetooth to send the music to the radio, so that the radio sees the tags and plays the music.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Mastiff
Posts: 65
Joined: Tue Oct 18, 2016 6:41 pm

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 6:29 pm

I'm not talking about using the Pi as a media server. I'm talking about using it exactly the way an iPod is used. Is an iPod working as a server when it's connected to the USB plug of a car entertainment system? I thought no, I thought it was serving the bits and bytes, and the entertainment system was doing all the decoding. I may be wrong, but that's what I thought.

broe23
Posts: 902
Joined: Thu Jan 28, 2016 9:35 pm
Location: Central IL
Contact: Website

Re: Is there such a thing as an Pi iPod emulator?

Wed Oct 19, 2016 6:32 pm

Mastiff wrote:I'm not talking about using the Pi as a media server. I'm talking about using it exactly the way an iPod is used. Is an iPod working as a server when it's connected to the USB plug of a car entertainment system? I thought no, I thought it was serving the bits and bytes, and the entertainment system was doing all the decoding. I may be wrong, but that's what I thought.
Yes you are talking about the fact that the iPod is a media server when it is connected via Bluetooth or USB. The same goes with the Pi. The head unit in the car will not be able to connect to the Pi, unless you have a touch screen on it to allow you to punch in the code given to pair it with the vehicle head unit.

You are overthinking this way too much. You have to look at it as that you want a Carputer to be able to let the vehicle grab the music by telling the Pi which song or album you are asking for on the touchscreen.
Ren: Now listen, Cadet. I've got a job for you. See this button? Ren: Don't touch it! It's the History Eraser button, you fool! Stimpy: So what'll happen? Ren: That's just it. We don't know. Maybe something bad, maybe something good.

Return to “General discussion”