Page 1 of 2

libusb

Posted: Wed Jun 16, 2004 12:38 pm
by dmoc
Anyone had success at using this lib from PB? Here's a link...

http://libusb.sourceforge.net/

Posted: Wed Jun 16, 2004 12:52 pm
by El_Choni
There's no Windows version listed (I say this because you post in the Windows section).

Posted: Wed Jun 16, 2004 3:25 pm
by dmoc
Oops :P Here's the win port...

http://libusb-win32.sourceforge.net/

..

Posted: Wed Jun 16, 2004 4:16 pm
by NoahPhense
dmoc wrote:Oops :P Here's the win port...

http://libusb-win32.sourceforge.net/
Interesting, this will come in handy when I build my connector to the
brain of my car. Does it mention anything about 2.0?

If not, the serial port has been mastered.

- np

Posted: Wed Jun 16, 2004 5:26 pm
by Raven
For Windows 32 it might be simpler just to use DirectX HID Controls

Posted: Wed Jun 16, 2004 6:22 pm
by dmoc
Raven, thanks for the suggestion but eventually I want my code to work on Linux and also at the lowest level possible (ultimate target is a micro-controller). For bg: I'm experimenting with a usb camera and have sniffed the protocol but now need to figure out specific commands, hence libusb (if I can call it from PB). Several precompiled libs are supplied, none of which are suitable as-is for converting to a PB lib. I also picked up a dll but my first attempt calling from PB bombs out on usb_get_simple_string().

Posted: Wed Jun 16, 2004 10:02 pm
by Raven
Accessing the USB shouldn't be a problem using inline asm, the target structure is well documented and it's just like accessing the Serial COM Sockets to a degree.

Coding will more come down to structuring of the binary data.
Question is what is this intended for really?

Posted: Wed Jun 16, 2004 10:15 pm
by dmoc
Question is what is this intended for really?
You think there's a hidden agenda? :D No, as I state above, I have a usb camera that I would like to access via a micro-controller (eventually). The camera costs £9 so I bought a couple to fiddle with. Got camera, took camera apart, trying to access via PB without going through Windows drivers. .. that's the whole story. I'll probably give up on PB and use C/ASM instead.

Posted: Wed Jun 16, 2004 10:30 pm
by Raven
If it has any DOS drivers try going through them in ASM, checking what the calls are for it. Linux to a degree would also be relatively easy to see what calls are being made.

Alternatively, place an ASM listener to monitor the USB port as your doing the camera's daily chores so to speak.
I'll see if i can't dig up some basic USB asm calls post up some functions. :) OS Devver.net should be helpful here ^_^

Posted: Thu Jun 17, 2004 1:03 am
by dmoc
sniffusb provides all the info (http://benoit.papillault.free.fr/usbsnoop/). No DOS drivers and I don't even think it has a full featured windows driver. It has an SQ905 inf file but shows up as "TCG 501" in devices. I'll try libusb/PB again tomorrow (eh, later today) but anything you can contribute is appreciated.

Posted: Thu Jun 17, 2004 6:13 pm
by GPI
@Raven

Your sig is in the most cases longer than your message! And it is animated (with a flash). Look to other users here in the forum: Almost everbody has a very short sig.

Posted: Thu Jun 17, 2004 10:36 pm
by LarsG
Yes, I must agree.. it's becoming very annoying... :?

Posted: Thu Jun 17, 2004 11:08 pm
by Kale
Yes, I must agree.. it's becoming very annoying...
Yeah, funnily enough i was just showing it to everybody at work to show them how annoying it was too! :roll:

Posted: Thu Jun 17, 2004 11:19 pm
by tinman
Kale wrote:Yeah, funnily enough i was just showing it to everybody at work
You can get away with that at your work? Nice one!
Kale wrote: to show them how annoying it was too! :roll:
Oh, sorry, my mistake >)

Posted: Thu Jun 17, 2004 11:21 pm
by Kale
lol, i think that would annoy them too! :twisted: