On Thu, Jul 21, 2011 at 6:54 AM, Xiaofan Chen <xiaof...@gmail.com> wrote: >> olimex.c: Trying to open interface 0 on \\.\libusb0-0001--0x15ba-0x0002 >> olimex.c: can't claim interface: No error >> olimex.c: failed to open Olimex device >> hardy:~/src/mspdebug-0.16> >> >> That means: the JTAG is now (at least) seen my mspdebug, but >> functionality lacks somehow... >> >> Any hints? >> > > https://mail.google.com/mail/?hl=en&shva=1#inbox/1308bf1d77e7a58a
Oops, wrong link. http://mspdebug.git.sourceforge.net/git/gitweb.cgi?p=mspdebug/mspdebug;a=blob;f=olimex.c;h=722ca6706253e6048224c669518e2a5ffdcd6e74;hb=HEAD > For libusb-win32, especially for the filter more, you need > to set configuration before claiming the interface. This is > optional for Linux but no harm for Linux as well. > > 105 if (usb_claim_interface(tr->handle, tr->int_number) < 0) { > 106 pr_error(__FILE__": can't claim interface"); > 107 usb_close(tr->handle); > 108 return -1; > 109 } > > You can add a few lines before the above section. > > if (usb_set_configuration(tr->handle, 1) < 0) { > pr_error(__FILE__": can't set configuration 1"); > usb_close(tr->handle); > return -1; > } > > Rebuild mspdebug and the above error should go away. > > Documentation of libusb-win32 API: > http://sourceforge.net/apps/trac/libusb-win32/wiki/libusbwin32_documentation > Similar thing for rf2500.c. http://mspdebug.git.sourceforge.net/git/gitweb.cgi?p=mspdebug/mspdebug;a=blob;f=rf2500.c;h=21bd2f1dbafcbec15ba11df954cd86ea314a278a;hb=HEAD 70 #if defined(__linux__) 71 if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0) 72 pr_error("rf2500: warning: can't " 73 "detach kernel driver"); 74 #endif 75 Add the following. if (usb_set_configuration(tr->handle, 1) < 0) { pr_error("rf2500: can't set configuration 1"); usb_close(tr->handle); return -1; } 76 if (usb_claim_interface(tr->handle, tr->int_number) < 0) { 77 pr_error("rf2500: can't claim interface"); 78 usb_close(tr->handle); 79 return -1; 80 } 81 82 return 0; 83 } -- Xiaofan ------------------------------------------------------------------------------ 5 Ways to Improve & Secure Unified Communications Unified Communications promises greater efficiencies for business. UC can improve internal communications as well as offer faster, more efficient ways to interact with customers and streamline customer service. Learn more! http://www.accelacomm.com/jaw/sfnl/114/51426253/ _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users