Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: ashy7 on September 25, 2013, 06:59:08 AM

Title: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ashy7 on September 25, 2013, 06:59:08 AM
Hi,
 
I installed Rockbox on my iPod Classic 7g using emcore.
 
I have a mac so used a windows computer to install and it all went fine. I reverted back to my Mac and the iPod mounted the first time, but I just can't get it to mount on the Mac again. If I try on the windows PC it mounts every time.
 
Does anyone have any ideas why it's being funny on the Mac?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: gevaerts on September 25, 2013, 07:20:56 AM
Did you update to the latest rockbox build, or are you using the one that's packaged with the emcore installer?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ashy7 on September 25, 2013, 08:27:52 AM
Hi,

I installed the build from the 21st from this link:

 http://www.rockbox.org/dl.cgi?bin=ipod6g

Would it have been better to install a different version?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: gevaerts on September 25, 2013, 10:27:01 AM
Would it have been better to install a different version?

No, that's fine. I asked because many people don't install a recent build, and the build packaged with emcore is known to be very old and buggy.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: bluebrother on September 25, 2013, 01:00:49 PM
I just can't get it to mount on the Mac again. If I try on the windows PC it mounts every time.

Disable the USB HID feature. It's known to be problematic on OS X.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ashy7 on September 25, 2013, 07:23:48 PM
I'm probably being daft, but I can't see the USB HID in settings. I follow the instructions:

Settings>general settings>system> but USB HID is not there and the last option is keyclick.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: [Saint] on September 25, 2013, 07:47:35 PM
The short, terribly simplified version of the story (as I'm aware) is that Macs see the V/PID of the device and expect to be able to talk to it like an iPod. It essentially isn't an iPod anymore.

The Classic also doesn't support USB HID (currently).


[Saint]
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ashy7 on September 26, 2013, 04:48:20 AM
So basically, I'm screwed?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: [Saint] on September 27, 2013, 12:07:38 AM
So basically, I'm screwed?

No, not at all.

But, it depends on  how much effort you're wanting to put into this. There are a few options:

1 - Get dual-boot working on the iPod Classic
2 - Smash it with a hammer
3 - Give up
4 - Patch out the devices VID/PID and re-compile a build with a new VID/PID combination so things stop thinking it is an iPod.

Options 1 through 3 are either insanely difficult, rather destructive, or defeatist...so lets roll with option 4. :)

Basically, what is happening is that Rockbox is using the original V/PID combination:
(/rockbox/firmware/export/config/ipod6g.h (http://git.rockbox.org/?p=rockbox.git;a=blob_plain;f=firmware/export/config/ipod6g.h;hb=HEAD) line(s) 241-242)

Code: [Select]
#define USB_VENDOR_ID 0x05AC

This is the vendor ID for Apple Inc.

Code: [Select]
#define USB_PRODUCT_ID 0x1261

This product ID tells us it is an iPod Classic 6G - which we already knew.

Some software (rightfully) sees this combination of vendor and product IDs and makes certain assumptions about it, expecting to be able to talk to the device in a very specific way. A Rockboxed iPod Classic pretty much breaks all these assumptions. The firmware partition is resized, the original firmware is not present at all, Rockbox has no IAP (iPod Accessory Protocol) support on this device (yet), there's no serial connection (yet)...like I said earlier, it pretty much isn't an iPod anymore.

There several ways to deal with this:

1 - Rockbox gets its own vendor and batch of process IDs from the Openmoko (http://wiki.openmoko.org/wiki/USB_Product_IDs) project and uses this exclusively.
2 - Rockbox gets its own vendor and batch of process IDs from the Openmoko (http://wiki.openmoko.org/wiki/USB_Product_IDs) project and allows the user to select between this and the original V/PID.
3 - Rockbox allows the user to provide their own arbitrary V/PID combination.
4 - Rockbox does nothing and users are required to make the required changes themselves when/if they encounter such issues.
5 - The Sun explodes making none of this relevant as man battles to survive as it is forced underground into a Matrix-style subterranean land.


In my mind, option 2 is the "right" way to handle this (...but, option 5 would be pretty cool too, except for the killer robots and all), but these things take time, and someone with a willingness to make it happen.

What we are looking at here however, is what will help you right now...and that is option number 4.

To do this, you will need to set up a Rockbox development environment to build Rockbox yourself.
The easiest way to do this is with a Live CD/DVD/USB (https://help.ubuntu.com/community/LiveCD#Preparing_your_LiveCD) or a virtual machine (https://www.virtualbox.org/wiki/Downloads).

Rockbox provides a pre-built VirtualBox Ubuntu virtual machine image (http://www.rockbox.org/wiki/DevelopmentGuide#Virtual_Machine_40Strongly_Recommended_41) you may use for this. This image comes with git (http://git-scm.com/) and the ARM toolchain pre-installed.

After setting up either a virtual machine or a LiveCD (If you do not use the supplied VirtualBox image or use a LiveCD, you will first need to configure the environment using the "getting started" section of our Linux Simple Guide to Compiling (http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling#Getting_Started)) you will then need to checkout the Rockbox source code (http://www.rockbox.org/wiki/UsingGit#Downloading_40cloning_44_checking_out_41_the_source).

However way you went about it, you should now have either a LiveCD or VirtualBox virtual machine with the required dependencies, the ARM toolchain, and the Rockbox source code and are now ready to make the changes to the source and recompile. From your git checkout of the Rockbox source repository, navigate to the small snippet of code I pointed to earlier in /rockbox/firmware/export/config/ipod6g.h (lines 241 and 242).

Now, we know we want to change the V/PID, but...what do we change it to?

Well. That's actually a tough question. Do we invent an arbitrary value? Do we use a known value from an existing device (http://www.rockbox.org/wiki/DeviceDetection#USB_IDs)? ...both may potentially have undesirable consequences. What I had done myself in the past (to avoid similar detection problems with an iPod and a car audio head unit) is use the V/PID of a generic USB mass storage device.

The process of finding USB V/PIDs is describes briefly here (http://www.rockbox.org/wiki/DeviceDetection#Finding_USB_IDs). On linux (for instance, in your new virtual machine or LiveCD), it would look something like this:

Code: [Select]
saint@saint-desktop:~$ lsusb
Bus 001 Device 001: ID 123a:456b Imaginary Devices Inc.

In this example, the USB_VENDOR_ID is 123a, and the USB_Product_ID is 456b. These are the values you would use to replace the original values in ipod6g.h.
Now that the V/PID is changed in the device config in the source, we can compile our build (http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling#Compiling)!

Assuming all went well, in a minute or so (depending greatly on the speed of your machine) you should end up with a newly compiled Rockbox binary which is a dirty, dirty liar and tells the host it is nothing more than <whatever_device_you_burgled_the_V/PID_combination_from>. Mount the device and extract this build to the root of the device (you can use your virtual machine for this - since your Mac not playing nice is the reason we're here in the first place), safely eject, and restart the device.

All going to plan, your Mac, car head units, Amarok, and a whole host of other things that rely on detecting an iPod in such a fashion should now see the device as generic removable storage and all should be well with the world.


If you get stuck at any point, don't hesitate to ask questions. Its how we learn things.

If you prefer, you may be able to get hold of myself (or others willing to help you) over at our IRC channel (#rockbox) on Freenode, there is an IRC web-client available here (http://www.rockbox.org/irc/cgiirc/). I go by the nick [Saint] there also, good luck, take care.


[Saint]
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ashy7 on September 27, 2013, 04:39:23 AM
Thanks very much for this - I'll give it a go tonight after work and let you know how it goes! I appreciate it.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: Jiloo on April 10, 2014, 03:17:05 AM
Just registered to the forum to say thank you [Saint].
Although I'm noob in programming thanks to your guidance and all the info from the site I've managed to install emCore and Rockbox on my 6th gen classic iPod using fiends windows laptop. Now it's working fine with my mac's.

Have you ever considered changing a name to [God]? It would be more adequate.

THANK YOU.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: [Saint] on April 10, 2014, 09:16:04 PM
I am very glad that I was able to assist you.

It means a lot to know that this helped even a single person.
Welcome to our community.


[Saint]
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: copper on April 20, 2014, 07:32:42 AM
I'm now hosting a daily build of (vanilla) Rockbox for the iPod Classic with the USB Vendor and Product IDs changed to 0x123A and 0x456B respectively, which aren't currently assigned.

http://caudec.net/rockbox/latest/rockbox-ipod6g-usbid_0x123A_0x456B.zip (http://caudec.net/rockbox/latest/rockbox-ipod6g-usbid_0x123A_0x456B.zip)

Here's the corresponding patch:
http://caudec.net/rockbox/latest/rockbox-ipod6g-usbid_0x123A_0x456B.diff (http://caudec.net/rockbox/latest/rockbox-ipod6g-usbid_0x123A_0x456B.diff)
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: MrDice on June 01, 2014, 02:16:48 AM
Hello [Saint],

thank you for your detailed explanation. It makes you want to join an open-source-community if the members are so helpful.

Unfortunately I run into the same issue - my Apple iPod 6G is not longer mounted since I installed the latest build (5237b36). I'm wondering why this is the case. With the last build I installed earlier this year I had never problems with mounting it. It might have been a build for the iPod Video because I didn't know about the build for the iPod 6G (not listed on the overview page).

At least I don't run into buzz-crashes anymore with the latest built. I guess I have to follow your instructions to compile Rockbox with a different V/PID.

Thank you again,
MrDice
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: copper on August 28, 2014, 04:18:48 PM
FYI, I'm hosting daily builds again. Both URLs should work again.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: shasheene on November 04, 2014, 10:56:41 PM
Thanks copper, your build now lets my 120GB device to mount on OS X Yosemite
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: citizenkeith on February 12, 2015, 08:23:29 AM
Thank you Copper. I just switched to a Macbook and it's great that I can manage my iPod Classic now.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: Marc.L on May 05, 2015, 02:04:01 PM
Sorry for pushing this old thread, i have an iPod classic 6g and i have had the same issue that my mac won´t mount the iPod anymore. So i followed the instructions and build my own build with the vendor of an other USB drive. This worked like charm. In systemreport the iPod is shown with the vendor and hardware ids i have chosen. But when i eject the iPod and replug it the MAC again will do nothing, there isn´t even a USB device in Systemrepot. After i restart the MAC it works again for exactly one time. Is there anything else i could do?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: tri4k on July 12, 2015, 08:08:03 AM
Hey guys. I'm also having trouble with an iPod classic mounting to my Mac. Using Windows I installed emCORE then the latest version of rockbox with the utility, then upon finding this thread I downloaded the fixed .rockbox file uploaded above, and extracted this to the iPod. However, the iPod takes ages to show up and then will randomly just disconnect again. It makes it impossible to actually copy any files onto it. I've tried running first aid on the drive using disk utility but the iPod simply disconnects before it has a chance to run through.
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: theptr on November 29, 2016, 02:24:47 PM
Hi Saint,

I just made an account to say thanks for the guide

So basically, I'm screwed?

No, not at all.

But, it depends on  how much effort you're wanting to put into this. There are a few options:

1 - Get dual-boot working on the iPod Classic
2 - Smash it with a hammer
3 - Give up
4 - Patch out the devices VID/PID and re-compile a build with a new VID/PID combination so things stop thinking it is an iPod.

Options 1 through 3 are either insanely difficult, rather destructive, or defeatist...so lets roll with option 4. :)

Basically, what is happening is that Rockbox is using the original V/PID combination:
(/rockbox/firmware/export/config/ipod6g.h (http://git.rockbox.org/?p=rockbox.git;a=blob_plain;f=firmware/export/config/ipod6g.h;hb=HEAD) line(s) 241-242)

Code: [Select]
#define USB_VENDOR_ID 0x05AC

This is the vendor ID for Apple Inc.

Code: [Select]
#define USB_PRODUCT_ID 0x1261

This product ID tells us it is an iPod Classic 6G - which we already knew.

Some software (rightfully) sees this combination of vendor and product IDs and makes certain assumptions about it, expecting to be able to talk to the device in a very specific way. A Rockboxed iPod Classic pretty much breaks all these assumptions. The firmware partition is resized, the original firmware is not present at all, Rockbox has no IAP (iPod Accessory Protocol) support on this device (yet), there's no serial connection (yet)...like I said earlier, it pretty much isn't an iPod anymore.

There several ways to deal with this:

1 - Rockbox gets its own vendor and batch of process IDs from the Openmoko (http://wiki.openmoko.org/wiki/USB_Product_IDs) project and uses this exclusively.
2 - Rockbox gets its own vendor and batch of process IDs from the Openmoko (http://wiki.openmoko.org/wiki/USB_Product_IDs) project and allows the user to select between this and the original V/PID.
3 - Rockbox allows the user to provide their own arbitrary V/PID combination.
4 - Rockbox does nothing and users are required to make the required changes themselves when/if they encounter such issues.
5 - The Sun explodes making none of this relevant as man battles to survive as it is forced underground into a Matrix-style subterranean land.


In my mind, option 2 is the "right" way to handle this (...but, option 5 would be pretty cool too, except for the killer robots and all), but these things take time, and someone with a willingness to make it happen.

What we are looking at here however, is what will help you right now...and that is option number 4.

To do this, you will need to set up a Rockbox development environment to build Rockbox yourself.
The easiest way to do this is with a Live CD/DVD/USB (https://help.ubuntu.com/community/LiveCD#Preparing_your_LiveCD) or a virtual machine (https://www.virtualbox.org/wiki/Downloads).

Rockbox provides a pre-built VirtualBox Ubuntu virtual machine image (http://www.rockbox.org/wiki/DevelopmentGuide#Virtual_Machine_40Strongly_Recommended_41) you may use for this. This image comes with git (http://git-scm.com/) and the ARM toolchain pre-installed.

After setting up either a virtual machine or a LiveCD (If you do not use the supplied VirtualBox image or use a LiveCD, you will first need to configure the environment using the "getting started" section of our Linux Simple Guide to Compiling (http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling#Getting_Started)) you will then need to checkout the Rockbox source code (http://www.rockbox.org/wiki/UsingGit#Downloading_40cloning_44_checking_out_41_the_source).

However way you went about it, you should now have either a LiveCD or VirtualBox virtual machine with the required dependencies, the ARM toolchain, and the Rockbox source code and are now ready to make the changes to the source and recompile. From your git checkout of the Rockbox source repository, navigate to the small snippet of code I pointed to earlier in /rockbox/firmware/export/config/ipod6g.h (lines 241 and 242).

Now, we know we want to change the V/PID, but...what do we change it to?

Well. That's actually a tough question. Do we invent an arbitrary value? Do we use a known value from an existing device (http://www.rockbox.org/wiki/DeviceDetection#USB_IDs)? ...both may potentially have undesirable consequences. What I had done myself in the past (to avoid similar detection problems with an iPod and a car audio head unit) is use the V/PID of a generic USB mass storage device.

The process of finding USB V/PIDs is describes briefly here (http://www.rockbox.org/wiki/DeviceDetection#Finding_USB_IDs). On linux (for instance, in your new virtual machine or LiveCD), it would look something like this:

Code: [Select]
saint@saint-desktop:~$ lsusb
Bus 001 Device 001: ID 123a:456b Imaginary Devices Inc.

In this example, the USB_VENDOR_ID is 123a, and the USB_Product_ID is 456b. These are the values you would use to replace the original values in ipod6g.h.
Now that the V/PID is changed in the device config in the source, we can compile our build (http://www.rockbox.org/wiki/LinuxSimpleGuideToCompiling#Compiling)!

Assuming all went well, in a minute or so (depending greatly on the speed of your machine) you should end up with a newly compiled Rockbox binary which is a dirty, dirty liar and tells the host it is nothing more than <whatever_device_you_burgled_the_V/PID_combination_from>. Mount the device and extract this build to the root of the device (you can use your virtual machine for this - since your Mac not playing nice is the reason we're here in the first place), safely eject, and restart the device.

All going to plan, your Mac, car head units, Amarok, and a whole host of other things that rely on detecting an iPod in such a fashion should now see the device as generic removable storage and all should be well with the world.


If you get stuck at any point, don't hesitate to ask questions. Its how we learn things.

If you prefer, you may be able to get hold of myself (or others willing to help you) over at our IRC channel (#rockbox) on Freenode, there is an IRC web-client available here (http://www.rockbox.org/irc/cgiirc/). I go by the nick [Saint] there also, good luck, take care.


[Saint]
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: ccpizz on March 05, 2017, 08:36:05 AM
I made a fork with the modified USB_VENDOR_ID on github: https://github.com/elFua/rockbox

Download zip: https://github.com/elFua/rockbox/releases/download/ipod6g_5265b09/rockbox-full-ipod6g_5265b09.zip (built on 5-mar-2017)

here is the relevant diff: https://github.com/elFua/rockbox/commit/7c3c1a2586018f12696c445b8c3e77a724383232
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: __builtin on May 04, 2017, 09:15:23 PM
We actually got a block of USB IDs from Openmoko a while back, and I pushed a patch to gerrit to move all the targets to them:

http://gerrit.rockbox.org/r/#/c/1603/

For convenience, here is a build of that patch for the ipod6g:

https://fwei.tk/rockbox-ipod6g-usbid.zip
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: sonicmouse on May 24, 2018, 10:08:11 AM
We actually got a block of USB IDs from Openmoko a while back, and I pushed a patch to gerrit to move all the targets to them:

http://gerrit.rockbox.org/r/#/c/1603/

For convenience, here is a build of that patch for the ipod6g:

https://fwei.tk/rockbox-ipod6g-usbid.zip

Sorry to bump an old thread, but I just encountered a similar issue with my Ford Sync not recognizing my 6g iPod with rockbox. I'm guessing that last post has the build I need, but the link is dead :(

Is anyone able to host this file again, or is there another link floating around? I wasn't sure if the post before that also has the relevant file I'd need.

-----Edit: Link was fixed by the host. Big thanks!
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: tyser on August 10, 2020, 06:01:17 PM
I am replying to an old thread, because this is the thread that has the most relevant information, the thing that comes up on google, the thread that clearly people scour looking for help as it's near 30k views, etc., so no I do not wish to start a new thread

i have an ipod video 60gb version, have modded it with the tarkan adapter, used rockbox for years before that and since. trying to get the ipod to work with the 2017 Subaru Forester. it is compatible with the ipod 5g, works fine in OF. i don't want to convert thousands of flac files so i can use the ipod in the car, and want to be able to use the head unit/steering wheel controls for obvious safety reasons so want to figure out how to get it to connect with rockbox as it won't recognize is at all.

i just went through several hours of figuring out how to edit the the vendor/product ids in the source code and recompile. i replaced the values referring to this link
https://gerrit.rockbox.org/r/#/c/1603/3/firmware/export/config/ipodvideo.h
recompiled in the provided ubuntu/virtualbox links from the tutorial, freshly formatted the ipod in windows, put the rockbox folder and a couple albums on there and tried it out.

when booting into rockbox, the HU used to say something like "failed to authorize/connect" which it does not do anymore, it doesn't do anything, actually. it still recognized the ipod when booting into OF, which i don't understand since i supposedly went through all of the trouble of trying to prevent that so that it would only recognize it as a generic usb device, which it does not do!

any tips, suggestions, advice? am i the only person on the planet still trying to do this kind of thing?
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: saratoga on August 10, 2020, 10:57:18 PM
when booting into rockbox, the HU used to say something like "failed to authorize/connect" which it does not do anymore, it doesn't do anything, actually. it still recognized the ipod when booting into OF, which i don't understand since i supposedly went through all of the trouble of trying to prevent that so that it would only recognize it as a generic usb device, which it does not do!

If you change the VID it should recognize the device as a generic USB thumb drive or portable hard drive.  Assuming your car stereo can play music from external storage devices, I'd expect it to at least play MP3 files and maybe WMA/AAC.  FLAC support on a car stereo isn't very common so I doubt those are going to work.  You might need to look at the manual to see how your stereo handles USB thumb drives. 
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: tyser on August 13, 2020, 04:58:56 PM
thanks for your reply. i did check and the correct values display in device manager when booting into rockbox so i did do the install correctly, guess it's on me to figure out beyond that  8)
Title: Re: Problems with Rockboxed iPod classic (6g slim 160gb) with Mac
Post by: dorites on August 11, 2023, 12:39:33 AM
Hi, sorry, is there a build of this patch that works with the ipod5g? I tried to put this build onto my 5th gen to no avail and I don't believe I have the means to get involved in patching rockbox.