Chris -
I owe you something special. Your hint 'the pointers should have different
values', made me realize exactly what was wrong. I had a linked list and was
grabbing the the wrong one.
I spent a good amount of time on this, you saved the day. Can I donate to the
organization?
Thanks so much, Happy Holidays.
Very Sincerely,
Jason
On Dec 23, 2013, at 5:44 PM, Chris Dickens <christopher.a.dick...@gmail.com>
wrote:
> mit_transfer(). The pointers should have different values. If it's the same,
> your application is trying to use the original handle.
>
> Regards,
> Chris
>
> To be thorough, you didn't specify that opened the newly discovered device. A
> segfault at usbi_mutex_lock() means it was using freed memory, which means
> you likely used a stale libusb_handle.
>
> Are you using hotplug notifications to find your device or using
> libusb_get_device_list()? In either case, your sequence of events should look
> like this:
>
> 1. Locate libusb device
> 2. Open libusb device
> 3. Claim interface
> 4. Submit transfer
> 5. Close libusb device
> 6. Locate new libusb device
> 7. Open new libusb device
> 8. Claim interface
> 9. Use the device as needed
>
> Step 6 and 7 are vitally important, to ensure you are trying to reference the
> newly enumerated device. If this is what you are doing already, then for
> debugging purposes you may wish to skip step 5 and print out the address of
> the libusb_handle before calling libusb_sub
>
>
>
> On Monday, December 23, 2013, Jason Kotzin wrote:
> That has no effect. If I remove that line the problem still persists.
>
> Very Sincerely,
> Jason
>
> > On Dec 23, 2013, at 12:06 PM, Matthias Bolte
> > <matthias.bo...@googlemail.com> wrote:
> >
> > 2013/12/23 Jason Kotzin <jasonkot...@gmail.com>:
> >> I have a USB device which has two separate devices in it, a bootloader,
> >> and the actual firmware.
> >>
> >> When I upgrade the firmware, I need to:
> >>
> >> send a message to the USB device which will jump to bootloader firmware
> >> release the interface
> >> close the usb device
> >> call libusb_exit()
> >
> > Why do you call libusb_exit() here?
> >
> > Are you calling libusb functions after libusb_exit()? If yes, then
> > errors are expected, because you told libusb that you don't need it
> > anymore by calling libusb_exit().
> >
> > --
> > Matthias Bolte
> > http://photron.blogspot.com
> >
> > ------------------------------------------------------------------------------
> > Rapidly troubleshoot problems before they affect your business. Most IT
> > organizations don't have a clear picture of how application performance
> > affects their revenue. With AppDynamics, you get 100% visibility into your
> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> > Pro!
> > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> > _______________________________________________
> > libusbx-devel mailing list
> > libusbx-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel