libusb

Windows specific forum
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

libusb

Post by dmoc »

Anyone had success at using this lib from PB? Here's a link...

http://libusb.sourceforge.net/
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

There's no Windows version listed (I say this because you post in the Windows section).
El_Choni
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

Oops :P Here's the win port...

http://libusb-win32.sourceforge.net/
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post 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
Raven
User
User
Posts: 45
Joined: Tue Jul 15, 2003 4:03 pm
Location: England

Post by Raven »

For Windows 32 it might be simpler just to use DirectX HID Controls
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post 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().
Raven
User
User
Posts: 45
Joined: Tue Jul 15, 2003 4:03 pm
Location: England

Post 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?
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post 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.
Raven
User
User
Posts: 45
Joined: Tue Jul 15, 2003 4:03 pm
Location: England

Post 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 ^_^
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post 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.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post 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.
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

Yes, I must agree.. it's becoming very annoying... :?

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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:
--Kale

Image
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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 >)
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

lol, i think that would annoy them too! :twisted:
--Kale

Image
Post Reply