• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Configuration
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.4
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by llhell - 2010-03-14
Last edited by speachy - 2020-11-13

FS#11101 - user selectable USB cable bevaviour

Added new menu item under Settings.General.System, to select whether USB cable connection enters charging mode by default, or data transfer mode.

By default, the option is set to “No”. Meaning, in order to have RB enter charging mode, a specific button should be pressed by the user.

If the option is set to “Yes”, USB connection causes RB to enter charging mode, unless the specified button is pressed, causing RB to switch into data xfer mode.

Closed by  speachy
2020-11-13 21:50
Reason for closing:  Out of Date
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Code that implements this (and more) landed in 60f581e

Forgot to mention - this patch takes effect only when USB is connected while RB is on. If connecting while device is off, OF still boots as usual.

the usb.c and usb.h changes need to be fixed. we have a rule that the firmware level doesnt call any apps level stuff (including global_settings). look at how the backlight settings work for a good way to do it.

done. hopefully this is how you meant it should be fixed :)

fg commented on 2010-03-20 15:45

I don't mind the functionality, but I strongly object to some of the terminology and naming used.

"usb charging mode" does not at all imply what the setting does, and "usb_charging_by_default" seems to imply that if it's set to false, the device will not charge.

These settings and variable names seem to imply that rockbox will not charge while connected in MSC mode, which is plainly not the case. Also, some players (such as the Ondio) can run on USB power but can not charge from USB, so for these the entire "charge" wording is even more wrong.

The patch also misses the necessary changes to the manual.

sure, what terminology would you prefer?

How do I change the manual..? there was no reference to doing so in RB's development guide :(

fg commented on 2010-03-21 13:18

I'd use e.g. usb_default_to_power_only (or similar) instead of usb_charging_by_default (power instead of charging, and "power only" doesn't imply that the alternative doesn't do power).

For the setting string, it's a bit more difficult to fit in a yes/no thing. I'd really prefer something like "USB default connection mode: Power only/Full connection" (or "MSC", or something like that). I don't know if that's easy to do in the settings code.

For the manual, I guess might be useful. If you can't manage it, feel free to join us on irc to ask for help, or at least provide the text the manual should have here

alright, to avoid any misunderstandings with different platforms I think I'll use something along the lines of 'use alternative USB power mode' or 'reverse USB power operation' - since this is the only way to truly describe what that option does - switches the way rockbox behaves when connecting exteral power and pressing the 'select' button.

I'll get that fixed, update the manual and repost the patch.

Ok, made the requested code/interface changes, tested, and updated the manual accordingly.

Storage on USB attach: (When button is bressed / When no button is pressed)

Make it about the presentation of storage, rather than about power/charging.

Well I think this is becoming somewhat redundant… I honestly don't mind how this option is called, I just think it has to be user controlled.

If you guys wish, we could have a vote among all rockbox devs to decide the best phrasing, but I think that right now the interface describes exactly what the option does (regardless of actual functionality).
This menu option causes rockbox to switch the two possible modes of handling USB connections, that's it. and that's why it's called the way it is.

Moreover, since the complete description is found in the manual, I don't see the point in contemplating other possible ways to phrase this in the GUI… the current phrasing is close enough, and anyone interested should read the manual to fully understand it.


Available keyboard shortcuts


Task Details

Task Editing