Ipod classic - rockbox - its happening.
Dec 9, 2012 at 9:39 AM Post #1,891 of 3,645
After a few hours of reading code I may have found the fix for the problem. My iPod will get recognized every time I connect it now, always in USB 2.0 mode.
What I did was simply calling the function to spindown the disc immediately when entering USB mode.
 
Since I'm not that familiar with the rockbox-code I used the most obvious functions for that, so there might be a better solution than mine as I don't know of any bad side-effects (Haven't noticed any so far!)
 
But what now? Maybe send it over to aroldan? Upload it to the rockbox git? I'd rather have it reviewed and tested first :)
 
Edit: Still getting some failed connects from time to time. Maybe it's just the weather after all.
 
Dec 9, 2012 at 9:47 PM Post #1,892 of 3,645
Quote:
Since I'm not that familiar with the rockbox-code I used the most obvious functions for that, so there might be a better solution than mine as I don't know of any bad side-effects (Haven't noticed any so far!)
 
But what now? Maybe send it over to aroldan? Upload it to the rockbox git? I'd rather have it reviewed and tested first :)
 
Edit: Still getting some failed connects from time to time. Maybe it's just the weather after all.

 
Theres no reason the disk should need to be spun down and then spun up again, so this is probably working around some deeper bug (which is probably why its not entirely reliable for you).  My guess is that there is some kind of timing issue where one packet or step sometimes happens out of order when negotiating USB connections.  Perhaps having to wait for the disk to spin up again makes it less likely that things happen in the wrong order.  
 
I think if other people can reproduce this, it might be worth filing a bug report on the rockbox flyspray tracker so that its documented.  I'll try and raise the same issue with TheSeven but from what I understand hes extremely busy with real life right now and probably won't be too excited about a few (dozen?) hours digging in the USB code.  
 
Dec 10, 2012 at 9:28 AM Post #1,893 of 3,645
To successfully connect I do the following:
 1. disable any virus scanner (it will trash the connection)
 2. use the fallback image
 3. make sure the battery of the IPOD is fully charged! (yes, it's a new battery)
 
To me it was amazing to experience the third point, connecting with a not fully charged battery always failed, after fully charging it connected succesfully.
 
Hope this helps
 
Dec 10, 2012 at 11:50 AM Post #1,894 of 3,645
Quote:
 
Theres no reason the disk should need to be spun down and then spun up again, so this is probably working around some deeper bug (which is probably why its not entirely reliable for you).  My guess is that there is some kind of timing issue where one packet or step sometimes happens out of order when negotiating USB connections.  Perhaps having to wait for the disk to spin up again makes it less likely that things happen in the wrong order.  
 
I think if other people can reproduce this, it might be worth filing a bug report on the rockbox flyspray tracker so that its documented.  I'll try and raise the same issue with TheSeven but from what I understand hes extremely busy with real life right now and probably won't be too excited about a few (dozen?) hours digging in the USB code.  

I was really looking forward to this being fixed with just spinning the disk down, but yesterday when I was trying to fix doom I noticed it didn't help at all. No perfect connection like I had many times with this fix before.
 
At least I got doom running by falling back to the timing approximation they use for the simulators. Now, the failing of doom and your thought that it might be a timing issue is probably connected. I haven't looked deeper into the usertimer code of rockbox for now, but I know that it just failed for doom.
 
Since doom was using only the basic usertimer functions I guess it is failing at other places, too, maybe even the in the USB-driver.
 
Sadly I can't look deeper into this now because I have to learn for my exams, but here is what I found out:
 
in i_system.c there is this line (112), initializing a timer:
 
Quote:
Code:
 rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, doomtime IF_COP(, CPU));

 
Where "doomtime" is a function which simply increments an integer. Since this integer stays at 0 I assume that something must be screwed up in the timing of the classic since these are working on other platforms.
 
Maybe this helps with fixing the issues with USB or something else.
 
Edit: Did I mention I was getting disconnected from the internet every time I plugged the iPod in yesterday? Would not work again until I replug my WLAN-USB-Stick.
 
Dec 10, 2012 at 6:58 PM Post #1,895 of 3,645
Quote:
I was really looking forward to this being fixed with just spinning the disk down, but yesterday when I was trying to fix doom I noticed it didn't help at all. No perfect connection like I had many times with this fix before.
 

 
Ah ok, then nevermind.
 
 

At least I got doom running by falling back to the timing approximation they use for the simulators. Now, the failing of doom and your thought that it might be a timing issue is probably connected. I haven't looked deeper into the usertimer code of rockbox for now, but I know that it just failed for doom.

 

If disabling the user timer fixes doom it just means that the user timer isn't working.  This is pretty common in new ports.  The user timer is basically only used in plugins, so its easy to forget about.  I guess the first step would be to see if the timer is even implemented on the Classic.  Then check that its actually set to the right frequency and not just spitting out some random time.
 
 

Edit: Did I mention I was getting disconnected from the internet every time I plugged the iPod in yesterday? Would not work again until I replug my WLAN-USB-Stick.

 

Thats probably a driver bug in your USB controller.  They probably don't handle the case where another devices on the bus crashes.  
 
Dec 10, 2012 at 10:55 PM Post #1,896 of 3,645
I was trying to Rockbox my ipod classic latest one and having one problem..
On pressing menu+select for about the 15 sec, it will ask to install driver and followed that and then its just remains still, that is, nothing happens.. if i run bootstrap_ipodclassic_itunes.exe it gives an error
And when i tried the process again it does not pop up the driver installation again.
 
Was trying it on WIN 7 and XP..
any suggestions how to go about it..
 
Thanks..
 
Dec 11, 2012 at 4:52 AM Post #1,897 of 3,645
Quote:
I was trying to Rockbox my ipod classic latest one and having one problem..
On pressing menu+select for about the 15 sec, it will ask to install driver and followed that and then its just remains still, that is, nothing happens.. if i run bootstrap_ipodclassic_itunes.exe it gives an error
And when i tried the process again it does not pop up the driver installation again.
 
Was trying it on WIN 7 and XP..
any suggestions how to go about it..
 
Thanks..

 
 
Have you read and followed the instructions on the first post? If you follow those instructions closely, you shouldn't have any problem...
 
Dec 11, 2012 at 1:05 PM Post #1,898 of 3,645
Quote:
 
 
Have you read and followed the instructions on the first post? If you follow those instructions closely, you shouldn't have any problem...

Yes i did ... 
 
The following setp is were i am stuck.. 
The iPod will show an apple logo after about 5 seconds, keep holding the buttons until it seems to turn off completely The display of your iPod should now stay black, and a new USB device called "Apple Recovery (DFU) USB Driver" should connect to your PC.
 
There is no new USB device seen.. 
 
Dec 11, 2012 at 1:37 PM Post #1,899 of 3,645
Quote:
Yes i did ... 
 
The following setp is were i am stuck.. 
The iPod will show an apple logo after about 5 seconds, keep holding the buttons until it seems to turn off completely The display of your iPod should now stay black, and a new USB device called "Apple Recovery (DFU) USB Driver" should connect to your PC.
 
There is no new USB device seen.. 

 
 
Do you have iTunes installed? It's better to stay away from that "thing"... I remember I had a similar problem on my first attempt to install Rockbox, but to be honest it was so long ago that I don't remember exactly how I solved it. I think I started the install process all over again, but following the emCORE install guide to the letter, and all was good in the end! I'm sorry I can't be more helpfull... 
redface.gif

 
Dec 11, 2012 at 1:41 PM Post #1,900 of 3,645
You may didn't disable all those iTunes-processes. I think one of them can only be seen by clicking the button which shows all processes of all users right underneath the process list of the taskmanager (Not the task-list!).
 
 
Dec 11, 2012 at 1:45 PM Post #1,901 of 3,645
Quote:
You may didn't disable all those iTunes-processes. I think one of them can only be seen by clicking the button which shows all processes of all users right underneath the process list of the taskmanager (Not the task-list!).

 
 
Isn't it better (and safer) to just uninstall the damned thing?!? Or do like me, not even installing it at all! Ever!!! 
biggrin.gif

 
Dec 11, 2012 at 3:09 PM Post #1,902 of 3,645
Quote:
 
 
Isn't it better (and safer) to just uninstall the damned thing?!? Or do like me, not even installing it at all! Ever!!! 
biggrin.gif

That's what I am saying to people. Itunes didn't touch my PC since I got that iPod 3 or 4 years ago. Used Winamp to copy music right away. :wink:
 
PS: Uninstalling wont erase everything of iTunes. Some processes stay and even run in the background! Not even to speak of the folders in %appdata% and whatnot. iTunes may uninstall itself, but not the other junk it came with.
 
Dec 11, 2012 at 6:27 PM Post #1,903 of 3,645
Just a quick observation.  Yesterday while out and about my JDS C421 amp battery ran out so i decided to run my rockboxed 7g off headphone out.  I was shocked at how good it sounded!  I have always used it rockboxed or not exclusivly through line out using a variety of different amps. I always remember how much i didnt agree with the sound from HO in the past and never tried it after Rockbox install.  Its got me thinking about selling the amps and going exclusive HO from now on.  I really like the freedom of just carrying a single ipod witout the lod cable and amp attached.  So much simpilar to just drop in a pocket and go.  Thanks Rockbox!  
 
Dec 11, 2012 at 10:50 PM Post #1,904 of 3,645
ITunes was never installed..
None of apple or iPod related processes were running...
Also noticed in win xp that when switching off iPod the USB device appears for a sec and disappears ... No luck with win 7 yet..

From Mobile Device
 
Dec 12, 2012 at 4:40 AM Post #1,905 of 3,645
Quote:
ITunes was never installed..
None of apple or iPod related processes were running...
Also noticed in win xp that when switching off iPod the USB device appears for a sec and disappears ... No luck with win 7 yet..
From Mobile Device

 
 
Do you have your Anti-Virus software switched off when you're trying it? Just a thought...
 

Users who are viewing this thread

Back
Top