Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

[PATCH] Make usb bus enumeration work reliably

#28

Attached patch fixes the way how the usb busses/devices are enumerated by libusb. It changes it to use the dirname/filename string members instead of the numeric location/devnum members.

It appears the numerical members change among consecutive calls and are not reliable. When testing it even reported all bus->location members to be 0 for ALL devices and busses which of course leads to problems when using iphone_get_specific_device().

Looking at other projects sources reveals that the only reliable way is to parse the dirname/filename strings and use them to determine a bus/device combination.

All this ofc. unless I have overlooked some other "sync-kind" of call for libusb, but judging from the other sources this is the way it is supposed to be done.

Reported by Martin S. · April 14th, 2009 @ 12:34 PM

State: resolved
Milestone: 1.0 Release
Assigned to: nobody

Activity

  1. Paul Sladen
    Paul Sladen
    • Milestone set to 1.0 Release

    April 15th, 2009 @ 10:43 AM

  2. Matt Colyer
    Matt Colyer
    • State changed from new to resolved

    (from [ded57a40188e0c07fac91719dd6bfd8ca44c423e]) Make usb bus enumeration work reliably for iphone_get_specific_device

    [#28 [PATCH] Make usb bus enumeration work reliably state:resolved]

    Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...

    April 19th, 2009 @ 10:07 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.