[ANN] Libusb binding + HID support for Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Libusb binding + HID support for Pharo

Julien
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Guillermo Polito
Nice!!! Thanks for sharing :)

On Thu, Oct 12, 2017 at 1:29 PM, Julien <[hidden email]> wrote:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:



--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Thierry Goubier
In reply to this post by Julien
Very cool. Would that be doable to adapt for a 64bits version?

Thierry

2017-10-12 13:29 GMT+02:00 Julien <[hidden email]>:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Julien
In reply to this post by Guillermo Polito
You’re welcome! :-)

Le 12 oct. 2017 à 14:36, Guillermo Polito <[hidden email]> a écrit :

Nice!!! Thanks for sharing :)

On Thu, Oct 12, 2017 at 1:29 PM, Julien <[hidden email]> wrote:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:



--
   
Guille Polito
Research Engineer


Centre de Recherche en Informatique, Signal et Automatique de Lille
CRIStAL - UMR 9189
French National Center for Scientific Research - http://www.cnrs.fr

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Julien
In reply to this post by Thierry Goubier
Normally, it should be possible.

Libusb can be compiled for 64bits architectures. I don’t know if it changes something in the UFFI binding side?

Julien
Le 12 oct. 2017 à 14:41, Thierry Goubier <[hidden email]> a écrit :

Very cool. Would that be doable to adapt for a 64bits version?

Thierry

2017-10-12 13:29 GMT+02:00 Julien <[hidden email]>:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Guillermo Polito


On Thu, Oct 12, 2017 at 2:49 PM, Julien <[hidden email]> wrote:
Normally, it should be possible.

Libusb can be compiled for 64bits architectures. I don’t know if it changes something in the UFFI binding side?

It should not, besides the library's location.

And, if you find a case where the binding does not work on 64 bits it is either:
 - a UFFI bug in the type mappings (e.g., a wrong mapping between a type name and the correct 32/64 bit size and marshalling)
 - or a bug in the bindings using the wrong types (e.g., using long instead of void*)
 

Julien

Le 12 oct. 2017 à 14:41, Thierry Goubier <[hidden email]> a écrit :

Very cool. Would that be doable to adapt for a 64bits version?

Thierry

2017-10-12 13:29 GMT+02:00 Julien <[hidden email]>:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Thierry Goubier


2017-10-12 15:05 GMT+02:00 Guillermo Polito <[hidden email]>:


On Thu, Oct 12, 2017 at 2:49 PM, Julien <[hidden email]> wrote:
Normally, it should be possible.

Libusb can be compiled for 64bits architectures. I don’t know if it changes something in the UFFI binding side?

It should not, besides the library's location.


That was the first hurdle. Easily solved.
 
And, if you find a case where the binding does not work on 64 bits it is either:
 - a UFFI bug in the type mappings (e.g., a wrong mapping between a type name and the correct 32/64 bit size and marshalling)
 - or a bug in the bindings using the wrong types (e.g., using long instead of void*)

And the first FFI call fails (the lib init).

Thierry
 
 

Julien

Le 12 oct. 2017 à 14:41, Thierry Goubier <[hidden email]> a écrit :

Very cool. Would that be doable to adapt for a 64bits version?

Thierry

2017-10-12 13:29 GMT+02:00 Julien <[hidden email]>:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:





--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: <a href="tel:+33%206%2052%2070%2066%2013" value="+33652706613" target="_blank">+33 06 52 70 66 13


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Denis Kudriashov
In reply to this post by Julien


2017-10-12 13:29 GMT+02:00 Julien <[hidden email]>:
Hello,

A bit late, there is a Libusb [1] binding (using UFFI) and support for the Human Interface Device [2] (that uses the binding but is written in pure Smalltalk) for Pharo.

Everything is on the github repository [3]. « Install »  and « Quick start »  sections give you all you need to start using the project.

One could also have a look at the wiki [4].

It works on Linux but hasn’t been tested on Mac OS nor Windows (it should work since libusb library works on these platforms).

Do not forget to install the 32 bits versions of libusb on your computer.

The purpose of this library is to provide the ability to use USB devices directly from Pharo.

Cool project.
 

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

And did you use it for these kind of devices? Or anything else?

 

Cheers,

Julien

PS: I realised this project during an internship in TaMère SCRL company [5]. Thanks to them!

Links:

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Julien

 

For example, one could get data from a PS3 controller, a mouse, a keyboard, an Arduino device, etc…

And did you use it for these kind of devices? Or anything else?


There is an example with an HID mouse on the wiki https://github.com/tamerescrl/libusb-pharo/wiki/Get-and-parse-HID-reports

I managed to get data from a PS3 controller but I can not find my code anymore, I think I lost it.

It was not that hard to do, I may re-do it one day and write a small tutorial.

The only problem with PS3 controller is that the HID descriptor is hidden (you have to get it from the internet, it is not stored in the device).

Julien
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Libusb binding + HID support for Pharo

Stephane Ducasse-3
Hi Julien I will read the small tutorial for sure.
I have many PS3 paddle at home waiting for it.

Stef

On Thu, Oct 12, 2017 at 3:34 PM, Julien <[hidden email]> wrote:

>
>
>>
>>
>> For example, one could get data from a PS3 controller, a mouse, a
>> keyboard, an Arduino device, etc…
>
>
> And did you use it for these kind of devices? Or anything else?
>
>
> There is an example with an HID mouse on the wiki
> https://github.com/tamerescrl/libusb-pharo/wiki/Get-and-parse-HID-reports
>
> I managed to get data from a PS3 controller but I can not find my code
> anymore, I think I lost it.
>
> It was not that hard to do, I may re-do it one day and write a small
> tutorial.
>
> The only problem with PS3 controller is that the HID descriptor is hidden
> (you have to get it from the internet, it is not stored in the device).
>
> Julien