Re: [Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Jason Kotzin
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 mu

Re: [Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Chris Dickens
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 >

[Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Chris Dickens
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,

Re: [Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Jason Kotzin
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 > wrote: > > 2013/12/23 Jason Kotzin : >> I have a USB device which has two separate devices in it, a bootloader, and >> the actual firmware. >> >> When

Re: [Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Matthias Bolte
2013/12/23 Jason Kotzin : > 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 > ca

[Libusbx-devel] Can't close and re-open an interface/device

2013-12-23 Thread Jason Kotzin
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() Then I wait for the boot