Re: [Libusbx-devel] Help needed with deployment issues on Windows
On Sat, Oct 27, 2012 at 11:41 AM, therau2000 wrote: > libusbx is required because my Java Program is used on Linux and Mac OS X as > well. My prototype program does work without any modification under 64-bit > Linux. I have not tried it under Mac OS X yet due to lack of time. Under Mac OS X you will have problem as well but a codeless kext may help in order to use libusbx. In that case, the device will not function as a USB mass storage device. So you have a problem there as well. https://github.com/texane/stlink/tree/master/stlinkv1_macosx_driver Under Windows, again libusbx will not be good for you since you need to switch driver. Even though it is possible to use libwdi to achieve the goal the user experience will not be good since the driver switching may take a long time (due to Windows restore or things like that). https://github.com/pbatard/libwdi/wiki > There are likely other developers having the same problem. There are a large > number of USB devices that show up as removable drives; it looks like the > majority of them are cameras without custom drivers. > Unfortunately libusbx is not the solution for your problem. If you have the control of the device firmware, you should make the device a USB composite device, with an interface to be the USB Mass Storage device and the other interface a custom class. If you do not need to do much on the custom interface, you can even only use control endpoint for the custom interface. -- Xiaofan -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Bug in get_string_descriptor?
On Fri, Oct 26, 2012 at 8:05 PM, Stefano Di Martino wrote: > Here the debug log what I actived before I call > libusb_get_string_descriptor_ascii() > > [timestamp] [threadID] facility level [function call] > > [ 0.953095] [0b1c] libusbx: debug [composite_submit_control_transfer] > using interface > 3 > [ 0.953095] [0b1c] libusbx: debug [libusb_claim_interface] interface 3 > [ 0.953095] [0b1c] libusbx: debug [hid_claim_interface] claimed interface > 3 > [ 0.953095] [0b1c] libusbx: debug [libusb_get_config_descriptor] index 0 > [ 0.953095] [0b1c] libusbx: debug [parse_endpoint] skipping descriptor 25 > [ 0.953095] [0b1c] libusbx: debug [parse_endpoint] skipping descriptor 25 > [ 0.953095] [0b1c] libusbx: debug [parse_endpoint] skipping descriptor 25 > [ 0.953095] [0b1c] libusbx: debug [windows_assign_endpoints] (re)assigned > endpoint 83 > to interface 3 > [ 0.953095] [0b1c] libusbx: debug [auto_claim] auto-claimed interface 3 > for control re > quest > [ 0.953095] [0b1c] libusbx: debug [hid_submit_control_transfer] will use > interface 3 > > ERROR in retrieving string descriptor: LIBUSB_ERROR_NO_MEM You may want to post a small prorgam to demonstrate the problem and post the full debug log. The above does not say much. But it seems to me your device is a USB composite device with one of the interface to be HID. You can try xusb example against your device and post the debug log first. -- Xiaofan -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Help needed with deployment issues on Windows
On Sun, 2012-10-28 at 08:58 +0800, Xiaofan Chen wrote: > On Sat, Oct 27, 2012 at 11:41 AM, therau2000 wrote: > > libusbx is required because my Java Program is used on Linux and Mac OS X as > > well. My prototype program does work without any modification under 64-bit > > Linux. I have not tried it under Mac OS X yet due to lack of time. > > Under Mac OS X you will have problem as well but a codeless kext may > help in order to use libusbx. In that case, the device will not function as > a USB mass storage device. So you have a problem there as well. > https://github.com/texane/stlink/tree/master/stlinkv1_macosx_driver > I got my C prototype program working perfectly under Mac OS X by disabling the default IOUSBMassStorageClass.kext driver, but it is not a solution because there is no longer any access to the device's removable drive. Questions: 1-Does installing this codeless kext disable the default IOUSBMassStorageClass.kext driver (USB removable drive support) ? 2-Is it not possible to detach and then re-attach the default driver like in Linux? > Under Windows, again libusbx will not be good for you since you need to > switch driver. Even though it is possible to use libwdi to achieve the goal > the user experience will not be good since the driver switching may take > a long time (due to Windows restore or things like that). > https://github.com/pbatard/libwdi/wiki > Windows libwdi would not be a solution. The only acceptable solution that I can see (for now...) would be to temporarily "suspend" USBSTOR (maybe something like make it believe computer is going into suspend mode) and access the Device with libusbx for 1-2 seconds max, then "resume" USBSTOR. An acceptable alternative would be to detach then re-attach USBSTOR, something like in Unix. > > There are likely other developers having the same problem. There are a large > > number of USB devices that show up as removable drives; it looks like the > > majority of them are cameras without custom drivers. > > > > Unfortunately libusbx is not the solution for your problem. If you have the > control of the device firmware, you should make the device a USB composite > device, with an interface to be the USB Mass Storage device and the other > interface a custom class. If you do not need to do much on the custom > interface, > you can even only use control endpoint for the custom interface. > No, I do not have any control over the Device Firmware. > -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Help needed with deployment issues on Windows
On Sun, Oct 28, 2012 at 11:29 AM, therau2000 wrote: > Under Mac OS X you will have problem as well but a codeless kext may > help in order to use libusbx. In that case, the device will not function as > a USB mass storage device. So you have a problem there as well. > https://github.com/texane/stlink/tree/master/stlinkv1_macosx_driver > > I got my C prototype program working perfectly under Mac OS X by disabling > the default IOUSBMassStorageClass.kext driver, but it is not a solution > because there is no longer any access to the device's removable drive. > > Questions: > 1-Does installing this codeless kext disable the default > IOUSBMassStorageClass.kext driver (USB removable drive support) ? Yes it will disable the default driver. > 2-Is it not possible to detach and then re-attach the default driver like in > Linux? Not under Mac OS X for the USB Mass Storage driver. > Under Windows, again libusbx will not be good for you since you need to > switch driver. Even though it is possible to use libwdi to achieve the goal > the user experience will not be good since the driver switching may take > a long time (due to Windows restore or things like that). > https://github.com/pbatard/libwdi/wiki > > Windows libwdi would not be a solution. The only acceptable solution that I > can see (for now...) would be to temporarily "suspend" USBSTOR (maybe > something like make it believe computer is going into suspend mode) and > access the Device with libusbx for 1-2 seconds max, then "resume" USBSTOR. > An acceptable alternative would be to detach then re-attach USBSTOR, > something like in Unix. libwdi can do what you want (replace the default driver and then put back the existing driver later) but again the user experience is not great since the duration of "detaching" and "re-attaching" is unpredictable. -- Xiaofan -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel
Re: [Libusbx-devel] Help needed with deployment issues on Windows
On Sun, Oct 28, 2012 at 8:58 AM, Xiaofan Chen wrote: > > Unfortunately libusbx is not the solution for your problem. If you have the > control of the device firmware, you should make the device a USB composite > device, with an interface to be the USB Mass Storage device and the other > interface a custom class. If you do not need to do much on the custom > interface, > you can even only use control endpoint for the custom interface. You might take a look at this one if your device use raw SCSI Pass Through Interface. It seems to work under Linux and Windows. But I think it will not work under Mac OS X due to the fact that Mac OS X does not seem to support that SCSI Pass Through Interface. http://sg.danny.cz/sg/sg3_utils.html -- Xiaofan -- WINDOWS 8 is here. Millions of people. Your app in 30 days. Visit The Windows 8 Center at Sourceforge for all your go to resources. http://windows8center.sourceforge.net/ join-generation-app-and-make-money-coding-fast/ ___ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel