gnupic: Traffic lights as extreme feedback device controlled by a PIC via USB


Previous by date: 11 Aug 2012 18:30:34 -0000 PIC USB firmware project on github (was: Traffic lights as extreme feedback device ...), Holger Oehm
Next by date: 11 Aug 2012 18:30:34 -0000 some question about the directive GLOBAL in the source code., feqin fan
Previous in thread: 11 Aug 2012 18:30:34 -0000 Re: Traffic lights as extreme feedback device controlled by a PIC via USB, Peter Stuge
Next in thread: 11 Aug 2012 18:30:34 -0000 Re: Traffic lights as extreme feedback device controlled by a PIC via USB, Holger Oehm

Subject: Re: Traffic lights as extreme feedback device controlled by a PIC via USB
From: Holger Oehm ####@####.####
Date: 11 Aug 2012 18:30:34 -0000
Message-Id: <5026A48D.4050406@holger-oehm.de>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11.08.2012 02:51, Peter Stuge wrote:
> Holger Oehm wrote:
>> Now I can start to re-write the java part for windows. Thanks for the tip!
> 
> The libusb-1.0 bindings are https://github.com/trygvis/javax-usb-libusb1
> but I guess you may have already found them. :)

I just had a deeper look into that project, and decided against using
it. Anyway, I do not need most of the stuff that it offers, so the
current approach using JNA to access libusb-1.0 and picking only the
subset needed to send control messages to the device is good enough for now.

> I'm happy to cross build libwdi. What exactly do you need? Have a
> look at the wdi-simple.c example from libwdi - is that already
> enough?

I think so. (More like to many options :-)). To automate the driver
installation on Windows I can think of the following two options:

1. execute a new process from java, like a statically linked
wdi-simple.exe (?).

2. use JNA again to call functions from a shared library (libwdi.dll in
this case). This means to execute the same steps as wdi-simple.c does,
but in Java.

My preference would be 2., as that would give me more control in Java
over what is happening. So what I needed for this is a libwdi-32.dll and
a libwdi-64.dll that can be loaded from Java (32 bit or 64 bit
executable). This libwdi-xx.dll needs only to be able to complete the
installation of the WinUSB driver on Windows Vista and Windows 7.

I would add those libwdi binaries in the git repository and package them
within the jar file that is created during the build.

Then at run time, first load libusb.dll and try to access the device. If
that fails load libwdi.dll and use it to install the WinUSB driver. If
that is successful, re-try to access the device.

Does that sound to you as if it makes sense?

Best regards,
Holger.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAlAmpIoACgkQHdk+97UOUamfzACfZ9ex/fT8PWXXJdd8tjWl7nFv
hXIAoJ5wjC/y52ANNPn/dE3MTfzVs0mA
=jzR3
-----END PGP SIGNATURE-----

Previous by date: 11 Aug 2012 18:30:34 -0000 PIC USB firmware project on github (was: Traffic lights as extreme feedback device ...), Holger Oehm
Next by date: 11 Aug 2012 18:30:34 -0000 some question about the directive GLOBAL in the source code., feqin fan
Previous in thread: 11 Aug 2012 18:30:34 -0000 Re: Traffic lights as extreme feedback device controlled by a PIC via USB, Peter Stuge
Next in thread: 11 Aug 2012 18:30:34 -0000 Re: Traffic lights as extreme feedback device controlled by a PIC via USB, Holger Oehm


Powered by ezmlm-browse 0.20.