Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: roybati on February 23, 2015, 08:14:16 AM

Title: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: roybati on February 23, 2015, 08:14:16 AM
Hi there! :)

I am trying to install Rockbox to an Ipod Classic 160 Gb and  trying very hard to come up with a solution to a series of challenges I am facing with my current hardware configuration:  :-[

1) I need to install Rockbox. Looks like I cannot install it the normal way but through EMcore : http://www.freemyipod.org/wiki/EmCORE_Installation/iPodClassic/UMSboot.
Although, If I understood it correctly, this guy from an Spanish forum says he could do it without: http://reproductormp3.net/index.php?topic=19409.0
Nevertheless, it looks like Windows doesn't recognize it very well. And it looks like docks do not work either. Well, maybe "lod" ones. As I am not very technical , I don't fully understand what this means. Line out docks? These would work fully? ???

Looks like a check but without dual boot support. This could be very bad as one way someone suggested to make the universal dock working was to firstly book the original firmware and then, once it recognized evrything, just reboot and It would work.

2) I need to be able to navigate through my old Ipod with folders as well as playlists. Ok, check.

3) Maybe I could use another dock+ remote? The idea is to be able to use it with a minimalistic remote. I just need to be a able to switch songs and volume up/down. Just that. Maybe play and stop, but not really required.

I am kinda lost, I have read tons of material so I am not just a lazy guy trying to get help, I really looked through all the docs but I could use some help from more experienced people.

Thanks in advance.
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: saratoga on February 23, 2015, 10:46:12 AM
Only line out and charging from docks  works at the moment, not remote controls or other dock features.

You must use emcore.
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: roybati on February 23, 2015, 03:24:26 PM
What about the Docks / Speakers at the http://www.rockbox.org/wiki/IpodAccessories page?

Would any of those work?
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: saratoga on February 23, 2015, 03:30:13 PM
If they only require a line out, they'll work.  Otherwise, no. 
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: roybati on February 24, 2015, 02:40:05 AM
Sorry, I am not that technical.

Is there any specific solution, even with another remote, even if it's a "wi-fi" remote (does such a thing exist?) that could possibly allow me to wirelesly control the ipod?


thanks!
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: roybati on February 24, 2015, 04:36:15 AM
I mean, is there a way to remotely control the ipod classic with rockbox on, even with another system, maybe wi-fi or IR or a gadget... whatever?


thanks!
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: saratoga on February 24, 2015, 09:56:40 AM
I mean, is there a way to remotely control the ipod classic with rockbox on, even with another system, maybe wi-fi or IR or a gadget... whatever?

At the moment no, you can only control it through the ipod's buttons.  The interface on the dock has been partially reverse engineered but is not yet implemented so it will not do anything but play music and charge through the dock connector, and only for simple devices that do not require any kind of authentication, encryption or digital interaction with the player. 
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: Odinos on May 13, 2015, 09:18:57 PM
So this topic was regarding a dock remote, but what about a remote on the headphones cable? is there a way to make that work?
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on January 13, 2019, 08:01:15 AM
Hi all,

I have been using rockbox on the ipod6g for 1.5 years or so now and have built 4 of these things (2 have been stolen -.-).

I use my one on my commute every day and love rockbox.

I'm compiling my own bootloader (made edits so that it is impossible to boot the OF) and making a few custom changes here and there (99999 files in playlist instead of 10000).

I recently bought an Apple universal dock and got a remote and I would like to make it work.

The volume commands work - and the skip and play/pause buttons cause the ipods screen to wake but rockbox does not do anything else.

@saratoga you mentioned that this has been partially reverse engineered? Can you please point me towards whatever existing work is available?

I have no issues with compiling a debug build and working on this myself I just need a slight nudge in the right direction. I have been monitoring the GPIO pins as I use the remote but it's hard to tell exactly what is happening!
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on January 15, 2019, 03:10:59 AM
I have found: https://nuxx.net/wiki/Apple_Accessory_Protocol

and rockbox/firmware/target/arm/s5l8702/ipod6g/serial-6g.c which appears to be the preliminary serial support for making this work.

I'm having a bit of trouble generating a logf, but I will keep trying to generate some output that might help me make this thing work!
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: KaiStone on January 17, 2019, 06:50:14 AM
Glad to hear that u still trying to get this works.

I love Rockbox but it has been a long time ago, I have to go back to stock just to get the benefit from dock and remote controls.
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on January 30, 2019, 08:16:30 PM
I've spent a few of my evenings on this thing, but don't feel like I'm any closer yet!

I've played with apps/iap/iap-core.c and tried to force version 2 of the iap via (didn't think HAVE_LINE_REC would be set for ipod6g ):

    {1, 2},     /* General lingo, 0x00 */
#ifdef HAVE_LINE_REC
    {1, 1},     /* Microphone lingo, 0x01 */
#else
    {1, 2},     /* Microphone lingo, 0x01, disabled */
#endif

But I don't think its working properly.

My debug build is fine because I can see codec complaints logged.

I saw suggestions from saratoga http://forums.rockbox.org/index.php/topic,25970.msg174496.html#msg174496
for logging the iap commands, and I guess I need to start adding logf("foo %s") etc. to try and find out whats going on.

Again, if someone familiar with this could point me in the right direction I'll be happy to try and do some testing.

Maybe Alan Korr & Nick Robinson are the people to contact as they are listed in iap-core.c ?

Obviously, I know only small amounts about C - and am learning as I try an understand the codebase.

Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on May 13, 2019, 07:59:16 PM
I realise now how the define logic works that was confusing me before. Stupid mistake and not at all the right path.

I can see that my iPod is getting as far as iap_setup inside of apps/iap/iap-core.c by adding some logf:
Code: [Select]
void iap_setup(const int ratenum)
{
    logf("inside of iap_setup");
    iap_bitrate_set(ratenum);
    ...

this is called by apps/main.c
Code: [Select]
#ifdef IPOD_ACCESSORY_PROTOCOL
    iap_setup(global_settings.serial_bitrate);
#endif

One thing I noticed is that pressing buttons on the remote _used_ to make the LCD turn on, but on my debug builds this is no longer happening.
Probably unrelated to changes but thought I would mention it. I'll try and revert and see if this happens still any old builds I might have still.

I'm reading up on https://nuxx.net/wiki/Apple_Accessory_Protocol and I can see that apps/iap/iap-lingo2.c is implementing all of the diferent mode 2 commands.

I'm just not sure how/if iap-lingo2.c is actually ever firing off - really feels like someone has fully implemented this and there is just a bool waiting somewhere to enable it all lol.

I'll try and add some more logf calls to things as I understand them.

Dumping this here for myself as much as anyone else as I'll probably forget where I last got to and need to remind myself.

Edit: 4ed5727 is waking the LCD on Left, Right and Play/Pause on the remote. Is there a call to lcd_awake mixed in with iap code somewhere?
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: Chronon on May 18, 2019, 04:03:16 PM
@bobba_mosfet Have you tried asking questions on the IRC channel?  That used to be a more reliable method of getting responses from developers, but I haven't been active around here for a while so I'm not sure of the current situation.
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on May 21, 2019, 03:51:12 PM
Thanks Chronon for the suggestion.

Must have been 10 years since I last used IRC in any frequency.

I always felt slightly uneasy about leaking my ip to the whole channel though, at least with a website only the siteops would see it!

I've been meaning to get a bouncer setup so I can have a dive back into the world of IRC, I'll be sure to idle in #rockbox when I get znc working properly.
Title: Re: Ipod classic 7th Gen (160Gb) + Apple Universal dock (including an Apple Remote)
Post by: bobba_mosfet on May 21, 2019, 05:20:59 PM
OK, I have no idea what changed (I don't see any new changes on gerrit apart from possibly this: http://gerrit.rockbox.org/r/#/c/2083/) or if this was always working and I've been losing my mind - but I decided to take another look and this is working for me now 100% !

I'm using build 38cceb9 and I can play, pause and skip forwards and backwards with the remote.

This freaking awesome!!

Many thanks to everyone who has put time in to developing rockbox, I _really_ appreciate it!