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:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Presenting iPod as a standard USB mass storage device for in-car use?
« previous next »
  • Print
Pages: 1 [2] 3 4

Author Topic: Presenting iPod as a standard USB mass storage device for in-car use?  (Read 25587 times)

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #15 on: April 02, 2010, 05:16:46 PM »
Quote from: NiHaoMike on April 02, 2010, 05:15:31 PM
Is there anything wrong with using a generic mass storage ID?

There is no such thing.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #16 on: April 02, 2010, 05:24:11 PM »
The IDs belong to other companies. There's no such thing as a "generic mass storage ID." They identify the vendor and product of the device.

We contacted the USB-IF and were told that even though we implement our own USB code, we do not need to purchase our own USB IDs because we're using the original ones of the device.

If we were to start identifying as devices other than that which the player actually is (in terms of vendor ID and product ID) we would likely then need to purchase our own ID as the alternative one. This is expensive.
Logged

Offline bifter

  • Member
  • *
  • Posts: 10
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #17 on: April 02, 2010, 05:38:18 PM »
What about using the ID of an alternative manufacturer then? Is this illegal?

Is my example of browser agent switchers different? Firefox for example has an extension that fools Web sites into thinking that your browser is IE or Opera, etc.

If it were permissable I think this would be a useful feature. Not just for circumventing the VAG head unit parsing (if indeed this is what is happening) but I should imagine there might be other uses for it.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #18 on: April 02, 2010, 05:53:41 PM »
Quote from: bifter on April 02, 2010, 05:38:18 PM
What about using the ID of an alternative manufacturer then? Is this illegal?

Is my example of browser agent switchers different? Firefox for example has an extension that fools Web sites into thinking that your browser is IE or Opera, etc.

If it were permissable I think this would be a useful feature. Not just for circumventing the VAG head unit parsing (if indeed this is what is happening) but I should imagine there might be other uses for it.

It's not illegal. If we would do this, the USB-IF might not be happy about it, but since we didn't sign any document they can't do much about it. From a technical point of view I really don't like it though. If a host refuses to believe that a device is Mass Storage because of its VID/PID, that host is broken.

Your browser user agent analogy does make some sense. These things can trick broken webservers into serving you content anyway, but they will also trick well-working webservers into giving you content that doesn't work because it was tweaked for the browser you now pretend to be (possibly to work around bugs in it).

Suppose you want to format and reinstall rockbox, so you plug it in, format the disk, and then run Rockbox Utility. How is that supposed to find out which player you have if you've changed the USB IDs?
Logged

Offline bifter

  • Member
  • *
  • Posts: 10
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #19 on: April 02, 2010, 06:20:49 PM »
Quote
If a host refuses to believe that a device is Mass Storage because of its VID/PID, that host is broken.

In this case it seems the manufacturer may have broken it deliberately. It would be pretty typical of Apple's approach to things and I guess VAG get some kind of kickback from the sale of iPod connectors?

Quote
Suppose you want to format and reinstall rockbox

Are you saying the tags are coded into the firmware? I guess I don't understand the technicalities but, if this is the case, does the utility not look at the Apple firmware to ascertain the model anyway? I'm guessing that these ID tags are still there as when I boot into Apple OS the head unit still rejects it.

In any case would there not be another tag that could be set and picked up by the Rockbox utility such that it would recognise that the IDs have been changed and prompt the user to manually select the player? Just a thought.
Logged

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #20 on: April 02, 2010, 06:24:19 PM »
It still seems a bad idea to antagonize the USB-IF (there's no guarantee we'll never need something from them in the future) to accommodate broken behavior in other software.

Have you tried contacting the manufacturer and asking if it's intended behavior that their device won't play MP3 files on an MSC device if it accidentally identifies it as an iPod?
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #21 on: April 02, 2010, 06:30:51 PM »
Quote from: bifter on April 02, 2010, 06:20:49 PM
Are you saying the tags are coded into the firmware? I guess I don't understand the technicalities but, if this is the case, does the utility not look at the Apple firmware to ascertain the model anyway? I'm guessing that these ID tags are still there as when I boot into Apple OS the head unit still rejects it.
How does it know it's an ipod? You've just changed the IDs to say it's not.
You can't just assume that you can reboot to the OF to get to a working disk mode. Ipods might have that, but rockbox supports a lot more.

I don't want to give the impression that we don't want to support this head unit, we do... It's just that we don't want to jump to an option we really don't like without seriously thinking about it and considering the alternatives.

I suppose you can't borrow me your car for a few weeks to investigate? ;)
Logged

Offline bifter

  • Member
  • *
  • Posts: 10
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #22 on: April 02, 2010, 06:56:00 PM »
LOL it's just a flat 1.6, not a Cupra or anything fancy!

Totally understand where you're coming from. I think you're being quite patient with me really, explaining the technical issues and such.

Right now I've got something that works, which is great. I'm not sure what Soap did to make it work but it would be good to be able to replicate it if I want to upgrade Rockbox - e.g. if the USB charging issue gets sorted out. Also I know that there would be other people - e.g. on the Seat forums - who would be interested in this. That probably goes for a lot of VW and Skoda owners too and maybe other makes.
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #23 on: April 02, 2010, 06:56:11 PM »
Thank you very much for testing this.  I've suspected such idiotic anti-consumer behavior on the part of certain manufactures before, and it is nice when there is proof.

I think the USB vendor and product IDs should be settable in the "debug" menu - it would make *cough* debugging USB behavior all the easier, and Rockbox can sleep soundly at night knowing that only developers would ever change those settings.

EDIT:
What did I do?  I changed the vendor ID to 0x029a and the product ID to 0x002a.  (gevaerts has already mentioned where the changes need made) - you would need to compile your own Rockbox build from the source code (something Rockbox makes quite easy - check out the wiki).
« Last Edit: April 02, 2010, 06:58:43 PM by soap »
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

Offline torne

  • Developer
  • Member
  • *
  • Posts: 994
  • arf arf
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #24 on: April 03, 2010, 06:45:19 AM »
I'm *reasonably* sure that your suspicion of anti-consumer behaviour is wrong. It's detecting that it's an iPod, and trying to use the advanced accessory protocol (the one that works over USB/SCSI) to retrieve information about the files on the device. A normal un-rockboxed ipod would be unusable if it *didn't* do this, because the files have been renamed to useless unbrowsable names by iTunes and you wouldn't be able to find anything. We don't implement this protocol because we don't have any docs for it, so the connection fails. I guess the head unit *could* fall back to just letting you browse the filesystem, but since this would never have come up during testing it's a reasonable mistake to have made without any malice being required.

The 'right' fix in the long term is for someone to painstakingly reverse engineer the protocol used and implement it in Rockbox.
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline NiHaoMike

  • Member
  • *
  • Posts: 31
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #25 on: April 03, 2010, 11:23:56 AM »
Quote from: torne on April 03, 2010, 06:45:19 AM
I'm *reasonably* sure that your suspicion of anti-consumer behaviour is wrong. It's detecting that it's an iPod, and trying to use the advanced accessory protocol (the one that works over USB/SCSI) to retrieve information about the files on the device. A normal un-rockboxed ipod would be unusable if it *didn't* do this, because the files have been renamed to useless unbrowsable names by iTunes and you wouldn't be able to find anything. We don't implement this protocol because we don't have any docs for it, so the connection fails. I guess the head unit *could* fall back to just letting you browse the filesystem, but since this would never have come up during testing it's a reasonable mistake to have made without any malice being required.

The 'right' fix in the long term is for someone to painstakingly reverse engineer the protocol used and implement it in Rockbox.
Couldn't it read the database just like the iPod itself does?

Personally, I think Apple should not have "reinvented the wheel". A filesystem is a very good way to organize data. The files could be stored as "artist/album/track" on the disk and playlists implemented as a list of files.
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: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #26 on: April 03, 2010, 03:22:33 PM »
Quote from: NiHaoMike on April 03, 2010, 11:23:56 AM
.
Couldn't it read the database just like the iPod itself does?
No, because Apple change the database format whenever they feel like it. The protocol allows them to do this. The database format is not public or stable; the protocol is available to anyone who pays apple.

Quote
Personally, I think Apple should not have "reinvented the wheel". A filesystem is a very good way to organize data. The files could be stored as "artist/album/track" on the disk and playlists implemented as a list of files.
Well they didn't do it that way, so this is useless wishing :)
Logged
some kind of ARM guy. ipodvideo/gigabeat-s/h120/clipv2. to save time let's assume i know everything.

Offline NiHaoMike

  • Member
  • *
  • Posts: 31
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #27 on: April 04, 2010, 11:07:30 AM »
http://www.obdev.at/products/vusb/index.html
Quote
Comes with freely usable USB identifiers (Vendor-ID and Product-ID pairs).
...
You can choose the License: Open Source or commercial.
Maybe those IDs or some other free IDs can be used?
Quote
I'm *reasonably* sure that your suspicion of anti-consumer behaviour is wrong. It's detecting that it's an iPod, and trying to use the advanced accessory protocol (the one that works over USB/SCSI) to retrieve information about the files on the device. A normal un-rockboxed ipod would be unusable if it *didn't* do this, because the files have been renamed to useless unbrowsable names by iTunes and you wouldn't be able to find anything. We don't implement this protocol because we don't have any docs for it, so the connection fails. I guess the head unit *could* fall back to just letting you browse the filesystem, but since this would never have come up during testing it's a reasonable mistake to have made without any malice being required.
But don't the release versions use disk mode, which is hard coded in the stock firmware and not Rockbox code?
Logged
"Want Allie Moore on your iPod? There's an app for that. It's called Rockbox."

Offline Llorean

  • Member
  • *
  • Posts: 12931
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #28 on: April 04, 2010, 02:53:56 PM »
How would us using their ID pairs be any different than us stealing them from another unrelated project? Just because they're open source and we can use their code freely doesn't mean we still wouldn't be misusing the vID/pID pair they use if we included it in our code, nor does it address any of gevaerts' other concerns about using pairs that aren't right for the device.

As well, I don't understand your statement about the OF disk mode. What it does is entirely unrelated to this discussion, since this discussion is about what what Rockbox could or should implement to solve the problem. Rockbox release versions won't always depend on the OF USB mode as that's just a temporary situation, and he's already moved beyond using the OF USB mode in his own personal use.
Logged

Offline gevaerts

  • Administrator
  • Member
  • *
  • Posts: 1053
Re: Presenting iPod as a standard USB mass storage device for in-car use?
« Reply #29 on: April 04, 2010, 03:14:59 PM »
Quote from: Llorean on April 04, 2010, 02:53:56 PM
How would us using their ID pairs be any different than us stealing them from another unrelated project? Just because they're open source and we can use their code freely doesn't mean we still wouldn't be misusing the vID/pID pair they use if we included it in our code, nor does it address any of gevaerts' other concerns about using pairs that aren't right for the device.

If I understand things correctly, they have a deal with some people who own a VID to get a range of PIDs, which they allocate to users of the project on-demand, so from a technical point of view this is fine.

I'm pretty sure that the actual owner of the VID is in breach of the contract they signed with the USB-IF however. The vusb people claim that they aren't doing anything wrong, not having signed anything with the USB-IF, and I think they're right.

My personal opinion is that while getting a deal like that might be fully legal, I still don't like it...
Logged

  • Print
Pages: 1 [2] 3 4
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Presenting iPod as a standard USB mass storage device for in-car use?
 

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

Page created in 0.104 seconds with 14 queries.