Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Investigating the iPod USB charging bug
« previous next »
  • Print
Pages: 1 [2]

Author Topic: Investigating the iPod USB charging bug  (Read 7195 times)

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Investigating the iPod USB charging bug
« Reply #15 on: March 28, 2010, 11:49:01 PM »
It's better not to make assumptions if it can be avoided. If the rework code will solve the issue, what's the problem?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Investigating the iPod USB charging bug
« Reply #16 on: March 29, 2010, 12:03:25 AM »
Given that USB is a transmission line with a spec'ed impedance of 90 ohms, i don't think its terminated with 15k ohm resistors.  If it was you would have massive back reflection into the sender which would make communication impossible.  I think the best you could do would be to transmit a bit and see and if its reflected back.  If it is, you don't have anything connected to the data lines. 

However I'm pretty skeptical typical devices can do this.  It would be very odd to put a receiver internal to the transmit pins.  It would be expensive, waste power, and be mostly useless. 
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: Investigating the iPod USB charging bug
« Reply #17 on: March 29, 2010, 09:48:55 AM »
Quote from: NiHaoMike on March 28, 2010, 11:23:34 PM
What else would connect 5v power but leave the data lines floating? That device obviously isn't going to communicate, so the only logical reason for it to supply 5v is for power
See
Quote from: torne on March 22, 2010, 12:43:30 PM
or when attached to a non-AC-powered accessory which may not be able to provide that much power.
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline NiHaoMike

  • Member
  • *
  • Posts: 31
Re: Investigating the iPod USB charging bug
« Reply #18 on: March 29, 2010, 10:03:46 AM »
Quote from: saratoga on March 29, 2010, 12:03:25 AM
Given that USB is a transmission line with a spec'ed impedance of 90 ohms, i don't think its terminated with 15k ohm resistors.  If it was you would have massive back reflection into the sender which would make communication impossible.  I think the best you could do would be to transmit a bit and see and if its reflected back.  If it is, you don't have anything connected to the data lines. 

However I'm pretty skeptical typical devices can do this.  It would be very odd to put a receiver internal to the transmit pins.  It would be expensive, waste power, and be mostly useless. 
USB is terminated with 15k from each line to ground, and there is additional AC termination inside the controller.
Logged
"Want Allie Moore on your iPod? There's an app for that. It's called Rockbox."

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Investigating the iPod USB charging bug
« Reply #19 on: March 29, 2010, 12:47:31 PM »
Anyway, this isn't going anywhere. You offered to help, I told you what you can do to help (wait for rework to be done then test it). You have suggested various things, we have explained why they don't work or why we don't want to do them.

What it comes down to is this: I have chosen to do nothing to the code in svn for now, because I don't think it's a good idea to add an option which simply ignores all considerations of safety and spec compliance and leaves it in the users' hands. The other developers with whom I have discussed this at some length on IRC seem happy with this: we have been disabling Rockbox USB in release builds for iPods for several releases now, so leaving it disabled a little longer and fixing this properly isn't a big deal.

I don't think I have really explained (here, at least) exactly what I am doing and what I intend to commit, and maybe that's why you are continuing this rather fruitless thread, so here is my plan, which comes in two steps:

1) Rework USB charging so that the USB stack can instruct the hardware-specific code as to how much power is acceptable to draw at the present time, and add a third choice to the current USB charging setting so that it's a choice between "off", "on", and "force".

Off will ensure Rockbox draws at most 100mA (perhaps less if possible, though consideration of booting a device with a dead battery is needed). It will also instruct the USB stack to only request 100mA in the first place, which will allow connecting Rockbox players to bus-powered hubs (this is not currently possible, as we always request 500mA even when we don't use it).

On will allow Rockbox to draw 500mA when connected to an active host which has given us permission to do so. AC chargers, or anything else connected to the USB port, will still only be allowed to draw 100mA at this point. This will be the default setting, and will allow normal users to charge from a PC in the same way as with the OF.

Force will behave exactly the same as On when connected to an active host: 100mA until given permission to draw 500mA. However, if no host connection is detected within several seconds of detecting the physical presence of the USB connector, 500mA charging will be enabled anyway, for the benefit of AC chargers. It is on the users' head if they set this setting to Force and then connect it to something they shouldn't, but we will still do everything we can to prevent this causing a problem (which is why it will not override an uncooperative but active host).

2) Implement USB charger detection for ipodvideo and possibly other PP ipod models (though charger detection in the OF appears to work very inconsistently, other models may be hard). There are at least two ways to positively identify a charger, and from disassembling the OF I am reasonably sure the ipodvideo implements both: one is to connect an ADC to the USB D+ and D- pins and measure the voltages there; Apple chargers tie them to particular values which can be spotted. The other is to check if D+ and D- are shorted together, which is the USB 2.0 charging standard, and later Apple chargers also do this (the iPhone and iPod Touch appear to require this method). If any known method of positively identifying a charger succeeds, then full power charging will be enabled without requiring the Force setting. Some charger/device combinations may in fact be able to charge at higher than 500mA, and in the case of positive identification this will be allowed.

After 1) other developers with knowledge of other targets may be able to implement this USB charging functionality on different players, and may also be able to implement other kinds of charger detection on various players (e.g. mini/micro USB connectors have a fifth pin which can be tied to particular levels to signal presence of a charger).

I have done maybe half the work for 1) already, and I just haven't had time to finish it and test it on the players I have yet. When 1) is ready I will post a comment on FS#8802 so that interested people can test it; I'll even make you a test build if you can't build yourself :)

Does that make it clearer?
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline fallenturtle

  • Member
  • *
  • Posts: 5
Re: Investigating the iPod USB charging bug
« Reply #20 on: October 25, 2010, 07:47:34 PM »
I noticed I'm having a problem with my ipod 5g 60 gig when connected to a USB wall charger. If I leave the backlight off and don't play music then the charge does go up, but if the backlight is on the charge goes down which makes me think it's this issue with the amount of power being pulled via USB.

FS#8802 is closed and I think its saying that the fix is now part of the official build, or am I understanding this wrong?

Do I need to download a patch? I'm running the 3.6 build that Rockbox Utility unstalled last week. I don't know the build number is, but I was under the assumption that the Utility installs the latest which I think is r28361.

I don't have an option for USB charging, just Accessory Power Supply which is set to "yes".

Sorry for my naivety. Should I have started a fresh thread?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Investigating the iPod USB charging bug
« Reply #21 on: October 25, 2010, 07:55:20 PM »
Quote from: fallenturtle on October 25, 2010, 07:47:34 PM
I noticed I'm having a problem with my ipod 5g 60 gig when connected to a USB wall charger. If I leave the backlight off and don't play music then the charge does go up, but if the backlight is on the charge goes down which makes me think it's this issue with the amount of power being pulled via USB.

FS#8802 is closed and I think its saying that the fix is now part of the official build, or am I understanding this wrong?

Do I need to download a patch? I'm running the 3.6 build that Rockbox Utility unstalled last week. I don't know the build number is, but I was under the assumption that the Utility installs the latest which I think is r28361.

3.6 is much older then that, and no it doesn't include FS#8802.  You'll have to update if you want to charge your player. 

For reference, this is helpful:

http://www.rockbox.org/wiki/MajorChanges
Logged

  • Print
Pages: 1 [2]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Investigating the iPod USB charging bug
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.099 seconds with 14 queries.