|
From: Par L. <par...@ls...> - 2007-06-06 15:51:04
|
Hi When we encountered errorcode -22 we found finally we had an alignment problem with the structures. All structure shall be packed without byte fillouts! This is accomplished by the use of include file in usb.h. I have not checked the real reason but replacing the include file with #pragma pack directive directly solved the problem. The include files worked on one of three computers? We will compare the include files later and add information in this matter. We are using CBuilder 6. See previous Libusb-win32-devel Digest, Vol 12, Issue 5: Thanks for your quick reply This is what I did to make It work In the file usb.h I changed the line where #include <pshpack1.h> with #pragma pack(push, 1) and at the line where #include <poppack.h> with #pragma pack(pop, 1) I get some warnings but I will leave them so far best of luck Pär and Måns lib...@li... wrote: > Send Libusb-win32-devel mailing list submissions to > lib...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > or, via email, send a message with subject or body 'help' to > lib...@li... > > You can reach the person managing the list at > lib...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Libusb-win32-devel digest..." > > > Today's Topics: > > 1. Re: Help, please (Stephan Meyer) > 2. Re: Help, please (Stephan Meyer) > 3. Re: Help, please (Dave Higton) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 6 Jun 2007 16:43:33 +0200 > From: Stephan Meyer <Ste...@ia...> > Subject: Re: [Libusb-win32-devel] Help, please > To: lib...@li... > Message-ID: > <OF2...@re...> > Content-Type: text/plain; charset="US-ASCII" > > Check the 'ep' parameter. This parameter must be the > full endpoint address including the direction bit (bit7). > > Stephan > > > > >> I just checked the return value of the usb_interrupt_read () call - it's >> always -22. >> >> Dave >> >> >>> -----Original Message----- >>> From: lib...@li... >>> [mailto:lib...@li...] On >>> Behalf Of Dave Higton >>> Sent: 2007 June 06 15:20 >>> To: lib...@li... >>> Subject: Re: [Libusb-win32-devel] Help, please >>> >>> Wow, what a rapid reply! Thanks. I tried your fix, and it has got me >>> one step further. >>> >>> (I note that usb_set_configuration (udev, 0) gives the same >>> error -22 as >>> not calling it. The only configuration I have is numbered 0; is this >>> OK?) >>> >>> Setting configuration to 1 makes the call return 0, so it looks like >>> it's working, but it fails at the next step. In the main loop, I do: >>> >>> printf ("Starting...\n"); >>> while (1) >>> { >>> if (usb_interrupt_read (contact_closure_usb_dev, >>> contact_closure_usb_input_endpoint, >>> cBuf, >>> 4, >>> 0) > 0) >>> { >>> printf ("Got some\n"); >>> } >>> } >>> >>> but the printf statement is never executed, although I am doing things >>> that should cause the interface to send messages - which are 4 bytes >>> each. >>> >>> Any more ideas? >>> >>> Dave >>> >>> >>>> -----Original Message----- >>>> From: lib...@li... >>>> [mailto:lib...@li...] On >>>> Behalf Of Stephan Meyer >>>> Sent: 2007 June 06 14:05 >>>> To: lib...@li... >>>> Subject: Re: [Libusb-win32-devel] Help, please >>>> >>>> Try to replace: >>>> >>>> uci = usb_claim_interface (udev, 0); >>>> >>>> with >>>> >>>> usb_set_configuation(udev, 1); >>>> uci = usb_claim_interface (udev, 0); >>>> >>>> It should work then. >>>> >>>> >>>> Stephan >>>> >>>> >>>> >>>> >>>> >>>>> Help, please. I've started writing a programme to use >>>>> >>>> libusb-win32, but >>>> >>>>> I'm getting an error right at the start. >>>>> >>>>> First, some background. I've used libusb under Linux >>>>> >>>> (Fedora Core 5) >>>> >>>>> successfully, to write driver functions for the first USB >>>>> >>>> device that I >>>> >>>>> wrote firmware for. That device works entirely happily >>>>> >>>> under FC5 and >>>> >>>>> under RISC O (yes, the Acorn/Pace/Castle one). I have now written >>>>> firmware for a second device. Perhaps unsurprisingly, >>>>> >>> this device's >>> >>>>> firmware is very heavily based on the previous one. This >>>>> >>>> device also >>>> >>>>> works entirely happily under RISC OS. I thought I'd try >>>>> >>>> this Windows >>>> >>>>> thing, but I'm having no success. >>>>> >>>>> The entire programme is here: >>>>> >>>>> // Can I get this system to do what I want? >>>>> #include <usb.h> >>>>> #include <stdio.h> >>>>> >>>>> #define VENDOR_ID_NICE 0x16A8 >>>>> #define PRODUCT_ID_CONTACT_CLOSURE 0x0004 >>>>> >>>>> int init (void) >>>>> { >>>>> //int usb_busses; >>>>> struct usb_bus* bus; >>>>> struct usb_device* dev; >>>>> usb_dev_handle *udev; >>>>> int retval = -1; >>>>> int uci; >>>>> int done = 0; >>>>> >>>>> printf ("Hello\n"); >>>>> >>>>> usb_init (); >>>>> usb_find_busses (); >>>>> usb_find_devices (); >>>>> for (bus = usb_get_busses (); bus; bus = bus->next) >>>>> { >>>>> for (dev = bus->devices; dev && (done == 0); dev = >>>>> dev->next) >>>>> { >>>>> udev = usb_open (dev); >>>>> printf ("udev = %p\n", udev); >>>>> if ((dev->descriptor.idVendor == VENDOR_ID_NICE) >>>>> && (dev->descriptor.idProduct == >>>>> PRODUCT_ID_CONTACT_CLOSURE)) >>>>> { >>>>> printf ("Found it!\n"); >>>>> uci = usb_claim_interface (udev, 0); >>>>> printf ("Return value from >>>>> usb_claim_interface: %d\n", uci); >>>>> retval = uci; >>>>> done = 1; >>>>> } >>>>> else >>>>> { >>>>> printf ("Not ours, VID = %04X, PID = >>>>> %04X\n", dev->descriptor.idVendor, dev->descriptor.idProduct); >>>>> usb_close (udev); >>>>> printf ("Closed: %p\n", udev); >>>>> } >>>>> } >>>>> } >>>>> return retval; >>>>> } >>>>> >>>>> int main (void) >>>>> { >>>>> int init_result; >>>>> >>>>> init_result = init (); >>>>> if (init_result == 0) >>>>> { >>>>> printf ("Starting...\n"); >>>>> } >>>>> else >>>>> { >>>>> printf ("Failed\n"); >>>>> } >>>>> } >>>>> >>>>> When I run it, I get a couple of "Not ours, VID = " etc. >>>>> >>>> messages for >>>> >>>>> other USB items I have, followed by "Found it!" But then >>>>> >>>> "Return value >>>> >>>>> from usb_claim_interface: -22" which I don't understand. >>>>> >>> I think it >>> >>>>> indicates an illegal parameter. udev must be OK, I assume. >>>>> >>>> My device >>>> >>>>> only has interface 0. It's a very simple device, with a >>>>> >>>> vendor-specific >>>> >>>>> protocol, specified at interface level. >>>>> >>>>> Can anyone see what I'm doing wrong, please? >>>>> >>>>> libusb-win32 downloaded from the main libusb-win32 site >>>>> >>>> this week. No >>>> >>>>> previous copy on this computer. Windows XP. >>>>> >>>>> Dave >>>>> >>>>> >>>>> >>>>> >>>> ************************************************************** >>>> ************************************************************** >>>> ************************************************************** >>>> ******************************************************* >>>> >>>>> NICE CTI Systems UK Limited ("NICE") is registered in >>>>> >>> England under >>> >>>>> company number, 3403044. The registered office of NICE is at >>>>> Tollbar Way, Hedge End, Southampton, Hampshire SO30 2ZP. >>>>> >>>>> Confidentiality: This communication and any attachments >>>>> >>> are intended >>> >>>>> for the above-named persons only and may be confidential and/or >>>>> legally privileged. Any opinions expressed in this >>>>> >>> communication are >>> >>>>> not necessarily those of NICE. If this communication has >>>>> >>> come to you >>> >>>>> in error you must take no action based on it, nor must >>>>> >>> you copy or >>> >>>>> show it to anyone; please delete/destroy and inform the >>>>> >>> sender by e- >>> >>>>> mail immediately. >>>>> >>>>> Monitoring: NICE may monitor incoming and outgoing e-mails. >>>>> >>>>> Viruses: Although we have taken steps toward ensuring >>>>> >>> that this e- >>> >>>>> mail and attachments are free from any virus, we advise that in >>>>> keeping with good computing practice the recipient should ensure >>>>> they are actually virus free. >>>>> >>>>> >>>>> >>>> ************************************************************** >>>> ************************************************************** >>>> ************************************************************** >>>> ********************************************************** >>>> >>>>> >>>>> >>>>> >>>>> >>>> -------------------------------------------------------------- >>>> ----------- >>>> >>>>> This SF.net email is sponsored by DB2 Express >>>>> Download DB2 Express C - the FREE version of DB2 express and take >>>>> control of your XML. No limits. Just data. Click to get it now. >>>>> http://sourceforge.net/powerbar/db2/ >>>>> _______________________________________________ >>>>> Libusb-win32-devel mailing list >>>>> Lib...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >>>>> >>>> -------------------------------------------------------------- >>>> ----------- >>>> This SF.net email is sponsored by DB2 Express >>>> Download DB2 Express C - the FREE version of DB2 express and take >>>> control of your XML. No limits. Just data. Click to get it now. >>>> http://sourceforge.net/powerbar/db2/ >>>> _______________________________________________ >>>> Libusb-win32-devel mailing list >>>> Lib...@li... >>>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >>>> >>>> >>> -------------------------------------------------------------- >>> ----------- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Libusb-win32-devel mailing list >>> Lib...@li... >>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >>> >>> >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Libusb-win32-devel mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >> > > > > > ------------------------------ > > Message: 2 > Date: Wed, 6 Jun 2007 16:45:12 +0200 > From: Stephan Meyer <Ste...@ia...> > Subject: Re: [Libusb-win32-devel] Help, please > To: lib...@li... > Message-ID: > <OFE...@re...> > Content-Type: text/plain; charset="US-ASCII" > > >> Wow, what a rapid reply! Thanks. I tried your fix, and it has got me >> one step further. >> >> (I note that usb_set_configuration (udev, 0) gives the same error -22 as >> not calling it. The only configuration I have is numbered 0; is this >> OK?) >> > > Yes, that's ok. The parameter is the configuaration value (from the > descriptor), NOT the configuaration index. > > >> Setting configuration to 1 makes the call return 0, so it looks like >> it's working, but it fails at the next step. In the main loop, I do: >> >> printf ("Starting...\n"); >> while (1) >> { >> if (usb_interrupt_read (contact_closure_usb_dev, >> contact_closure_usb_input_endpoint, >> cBuf, >> 4, >> 0) > 0) >> { >> printf ("Got some\n"); >> } >> } >> >> but the printf statement is never executed, although I am doing things >> that should cause the interface to send messages - which are 4 bytes >> each. >> >> Any more ideas? >> >> Dave >> >> >>> -----Original Message----- >>> From: lib...@li... >>> [mailto:lib...@li...] On >>> Behalf Of Stephan Meyer >>> Sent: 2007 June 06 14:05 >>> To: lib...@li... >>> Subject: Re: [Libusb-win32-devel] Help, please >>> >>> Try to replace: >>> >>> uci = usb_claim_interface (udev, 0); >>> >>> with >>> >>> usb_set_configuation(udev, 1); >>> uci = usb_claim_interface (udev, 0); >>> >>> It should work then. >>> >>> >>> Stephan >>> >>> >>> >>> >>> >>>> Help, please. I've started writing a programme to use >>>> >>> libusb-win32, but >>> >>>> I'm getting an error right at the start. >>>> >>>> First, some background. I've used libusb under Linux >>>> >>> (Fedora Core 5) >>> >>>> successfully, to write driver functions for the first USB >>>> >>> device that I >>> >>>> wrote firmware for. That device works entirely happily >>>> >>> under FC5 and >>> >>>> under RISC O (yes, the Acorn/Pace/Castle one). I have now written >>>> firmware for a second device. Perhaps unsurprisingly, this device's >>>> firmware is very heavily based on the previous one. This >>>> >>> device also >>> >>>> works entirely happily under RISC OS. I thought I'd try >>>> >>> this Windows >>> >>>> thing, but I'm having no success. >>>> >>>> The entire programme is here: >>>> >>>> // Can I get this system to do what I want? >>>> #include <usb.h> >>>> #include <stdio.h> >>>> >>>> #define VENDOR_ID_NICE 0x16A8 >>>> #define PRODUCT_ID_CONTACT_CLOSURE 0x0004 >>>> >>>> int init (void) >>>> { >>>> //int usb_busses; >>>> struct usb_bus* bus; >>>> struct usb_device* dev; >>>> usb_dev_handle *udev; >>>> int retval = -1; >>>> int uci; >>>> int done = 0; >>>> >>>> printf ("Hello\n"); >>>> >>>> usb_init (); >>>> usb_find_busses (); >>>> usb_find_devices (); >>>> for (bus = usb_get_busses (); bus; bus = bus->next) >>>> { >>>> for (dev = bus->devices; dev && (done == 0); dev = >>>> dev->next) >>>> { >>>> udev = usb_open (dev); >>>> printf ("udev = %p\n", udev); >>>> if ((dev->descriptor.idVendor == VENDOR_ID_NICE) >>>> && (dev->descriptor.idProduct == >>>> PRODUCT_ID_CONTACT_CLOSURE)) >>>> { >>>> printf ("Found it!\n"); >>>> uci = usb_claim_interface (udev, 0); >>>> printf ("Return value from >>>> usb_claim_interface: %d\n", uci); >>>> retval = uci; >>>> done = 1; >>>> } >>>> else >>>> { >>>> printf ("Not ours, VID = %04X, PID = >>>> %04X\n", dev->descriptor.idVendor, dev->descriptor.idProduct); >>>> usb_close (udev); >>>> printf ("Closed: %p\n", udev); >>>> } >>>> } >>>> } >>>> return retval; >>>> } >>>> >>>> int main (void) >>>> { >>>> int init_result; >>>> >>>> init_result = init (); >>>> if (init_result == 0) >>>> { >>>> printf ("Starting...\n"); >>>> } >>>> else >>>> { >>>> printf ("Failed\n"); >>>> } >>>> } >>>> >>>> When I run it, I get a couple of "Not ours, VID = " etc. >>>> >>> messages for >>> >>>> other USB items I have, followed by "Found it!" But then >>>> >>> "Return value >>> >>>> from usb_claim_interface: -22" which I don't understand. I think it >>>> indicates an illegal parameter. udev must be OK, I assume. >>>> >>> My device >>> >>>> only has interface 0. It's a very simple device, with a >>>> >>> vendor-specific >>> >>>> protocol, specified at interface level. >>>> >>>> Can anyone see what I'm doing wrong, please? >>>> >>>> libusb-win32 downloaded from the main libusb-win32 site >>>> >>> this week. No >>> >>>> previous copy on this computer. Windows XP. >>>> >>>> Dave >>>> >>>> >>>> >>>> >>> ************************************************************** >>> ************************************************************** >>> ************************************************************** >>> ******************************************************* >>> >>>> NICE CTI Systems UK Limited ("NICE") is registered in England under >>>> company number, 3403044. The registered office of NICE is at >>>> Tollbar Way, Hedge End, Southampton, Hampshire SO30 2ZP. >>>> >>>> Confidentiality: This communication and any attachments are intended >>>> for the above-named persons only and may be confidential and/or >>>> legally privileged. Any opinions expressed in this communication are >>>> not necessarily those of NICE. If this communication has come to you >>>> in error you must take no action based on it, nor must you copy or >>>> show it to anyone; please delete/destroy and inform the sender by e- >>>> mail immediately. >>>> >>>> Monitoring: NICE may monitor incoming and outgoing e-mails. >>>> >>>> Viruses: Although we have taken steps toward ensuring that this e- >>>> mail and attachments are free from any virus, we advise that in >>>> keeping with good computing practice the recipient should ensure >>>> they are actually virus free. >>>> >>>> >>>> >>> ************************************************************** >>> ************************************************************** >>> ************************************************************** >>> ********************************************************** >>> >>>> >>>> >>>> >>>> >>> -------------------------------------------------------------- >>> ----------- >>> >>>> This SF.net email is sponsored by DB2 Express >>>> Download DB2 Express C - the FREE version of DB2 express and take >>>> control of your XML. No limits. Just data. Click to get it now. >>>> http://sourceforge.net/powerbar/db2/ >>>> _______________________________________________ >>>> Libusb-win32-devel mailing list >>>> Lib...@li... >>>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >>>> >>> -------------------------------------------------------------- >>> ----------- >>> This SF.net email is sponsored by DB2 Express >>> Download DB2 Express C - the FREE version of DB2 express and take >>> control of your XML. No limits. Just data. Click to get it now. >>> http://sourceforge.net/powerbar/db2/ >>> _______________________________________________ >>> Libusb-win32-devel mailing list >>> Lib...@li... >>> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >>> >>> >> > ------------------------------------------------------------------------- > >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Libusb-win32-devel mailing list >> Lib...@li... >> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel >> > > > > > ------------------------------ > > Message: 3 > Date: Wed, 6 Jun 2007 15:47:37 +0100 > From: "Dave Higton" <DAV...@ni...> > Subject: Re: [Libusb-win32-devel] Help, please > To: <lib...@li...> > Message-ID: > <B71...@so...> > Content-Type: text/plain; charset="US-ASCII" > > OK, now it returns -116. What next? (What does -116 mean?) > > Thanks, > > Dave > > >> -----Original Message----- >> From: lib...@li... >> [mailto:lib...@li...] On >> Behalf Of Stephan Meyer >> Sent: 2007 June 06 15:44 >> To: lib...@li... >> Subject: Re: [Libusb-win32-devel] Help, please >> >> Check the 'ep' parameter. This parameter must be the >> full endpoint address including the direction bit (bit7). >> >> Stephan >> >> >> >> >>> I just checked the return value of the usb_interrupt_read >>> >> () call - it's >> >>> always -22. >>> >>> Dave >>> >>> >>>> -----Original Message----- >>>> From: lib...@li... >>>> [mailto:lib...@li...] On >>>> Behalf Of Dave Higton >>>> Sent: 2007 June 06 15:20 >>>> To: lib...@li... >>>> Subject: Re: [Libusb-win32-devel] Help, please >>>> >>>> Wow, what a rapid reply! Thanks. I tried your fix, and >>>> >> it has got me >> >>>> one step further. >>>> >>>> (I note that usb_set_configuration (udev, 0) gives the same >>>> error -22 as >>>> not calling it. The only configuration I have is >>>> >> numbered 0; is this >> >>>> OK?) >>>> >>>> Setting configuration to 1 makes the call return 0, so it >>>> >> looks like >> >>>> it's working, but it fails at the next step. In the main >>>> >> loop, I do: >> >>>> printf ("Starting...\n"); >>>> while (1) >>>> { >>>> if (usb_interrupt_read (contact_closure_usb_dev, >>>> contact_closure_usb_input_endpoint, >>>> cBuf, >>>> 4, >>>> 0) > 0) >>>> { >>>> printf ("Got some\n"); >>>> } >>>> } >>>> >>>> but the printf statement is never executed, although I am >>>> >> doing things >> >>>> that should cause the interface to send messages - which >>>> >> are 4 bytes >> >>>> each. >>>> >>>> Any more ideas? >>>> >>>> Dave >>>> >>>> >>>>> -----Original Message----- >>>>> From: lib...@li... >>>>> [mailto:lib...@li...] On >>>>> Behalf Of Stephan Meyer >>>>> Sent: 2007 June 06 14:05 >>>>> To: lib...@li... >>>>> Subject: Re: [Libusb-win32-devel] Help, please >>>>> >>>>> Try to replace: >>>>> >>>>> uci = usb_claim_interface (udev, 0); >>>>> >>>>> with >>>>> >>>>> usb_set_configuation(udev, 1); >>>>> uci = usb_claim_interface (udev, 0); >>>>> >>>>> It should work then. >>>>> >>>>> >>>>> Stephan >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> Help, please. I've started writing a programme to use >>>>>> >>>>> libusb-win32, but >>>>> >>>>>> I'm getting an error right at the start. >>>>>> >>>>>> First, some background. I've used libusb under Linux >>>>>> >>>>> (Fedora Core 5) >>>>> >>>>>> successfully, to write driver functions for the first USB >>>>>> >>>>> device that I >>>>> >>>>>> wrote firmware for. That device works entirely happily >>>>>> >>>>> under FC5 and >>>>> >>>>>> under RISC O (yes, the Acorn/Pace/Castle one). I >>>>>> >> have now written >> >>>>>> firmware for a second device. Perhaps unsurprisingly, >>>>>> >>>> this device's >>>> >>>>>> firmware is very heavily based on the previous one. This >>>>>> >>>>> device also >>>>> >>>>>> works entirely happily under RISC OS. I thought I'd try >>>>>> >>>>> this Windows >>>>> >>>>>> thing, but I'm having no success. >>>>>> >>>>>> The entire programme is here: >>>>>> >>>>>> // Can I get this system to do what I want? >>>>>> #include <usb.h> >>>>>> #include <stdio.h> >>>>>> >>>>>> #define VENDOR_ID_NICE 0x16A8 >>>>>> #define PRODUCT_ID_CONTACT_CLOSURE 0x0004 >>>>>> >>>>>> int init (void) >>>>>> { >>>>>> //int usb_busses; >>>>>> struct usb_bus* bus; >>>>>> struct usb_device* dev; >>>>>> usb_dev_handle *udev; >>>>>> int retval = -1; >>>>>> int uci; >>>>>> int done = 0; >>>>>> >>>>>> printf ("Hello\n"); >>>>>> >>>>>> usb_init (); >>>>>> usb_find_busses (); >>>>>> usb_find_devices (); >>>>>> for (bus = usb_get_busses (); bus; bus = bus->next) >>>>>> { >>>>>> for (dev = bus->devices; dev && (done == 0); dev = >>>>>> dev->next) >>>>>> { >>>>>> udev = usb_open (dev); >>>>>> printf ("udev = %p\n", udev); >>>>>> if ((dev->descriptor.idVendor == VENDOR_ID_NICE) >>>>>> && (dev->descriptor.idProduct == >>>>>> PRODUCT_ID_CONTACT_CLOSURE)) >>>>>> { >>>>>> printf ("Found it!\n"); >>>>>> uci = usb_claim_interface (udev, 0); >>>>>> printf ("Return value from >>>>>> usb_claim_interface: %d\n", uci); >>>>>> retval = uci; >>>>>> done = 1; >>>>>> } >>>>>> else >>>>>> { >>>>>> printf ("Not ours, VID = %04X, PID = >>>>>> %04X\n", dev->descriptor.idVendor, dev->descriptor.idProduct); >>>>>> usb_close (udev); >>>>>> printf ("Closed: %p\n", udev); >>>>>> } >>>>>> } >>>>>> } >>>>>> return retval; >>>>>> } >>>>>> >>>>>> int main (void) >>>>>> { >>>>>> int init_result; >>>>>> >>>>>> init_result = init (); >>>>>> if (init_result == 0) >>>>>> { >>>>>> printf ("Starting...\n"); >>>>>> } >>>>>> else >>>>>> { >>>>>> printf ("Failed\n"); >>>>>> } >>>>>> } >>>>>> >>>>>> When I run it, I get a couple of "Not ours, VID = " etc. >>>>>> >>>>> messages for >>>>> >>>>>> other USB items I have, followed by "Found it!" But then >>>>>> >>>>> "Return value >>>>> >>>>>> from usb_claim_interface: -22" which I don't understand. >>>>>> >>>> I think it >>>> >>>>>> indicates an illegal parameter. udev must be OK, I assume. >>>>>> >>>>> My device >>>>> >>>>>> only has interface 0. It's a very simple device, with a >>>>>> >>>>> vendor-specific >>>>> >>>>>> protocol, specified at interface level. >>>>>> >>>>>> Can anyone see what I'm doing wrong, please? >>>>>> >>>>>> libusb-win32 downloaded from the main libusb-win32 site >>>>>> >>>>> this week. No >>>>> >>>>>> previous copy on this computer. Windows XP. >>>>>> >>>>>> Dave >>>>>> > > > ************************************************************************************************************************************************************************************************************************************************* > > NICE CTI Systems UK Limited ("NICE") is registered in England under company number, 3403044. The registered office of NICE is at Tollbar Way, Hedge End, Southampton, Hampshire SO30 2ZP. > > Confidentiality: This communication and any attachments are intended for the above-named persons only and may be confidential and/or legally privileged. Any opinions expressed in this communication are not necessarily those of NICE. If this communication has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender by e-mail immediately. > > Monitoring: NICE may monitor incoming and outgoing e-mails. > > Viruses: Although we have taken steps toward ensuring that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. > > **************************************************************************************************************************************************************************************************************************************************** > > > > > > > ------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > ------------------------------ > > _______________________________________________ > Libusb-win32-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel > > > End of Libusb-win32-devel Digest, Vol 13, Issue 4 > ************************************************* > > |