Installing libusbjava

Hi everyone, I’m currently trying to use libusbjava as shown on this website, but I get an error, and can’t manage to get it to work, since I’m not so experienced with raw Java…
The thing is this example was made in 2009, and the library seems to have changed since that…
when clicking “play”, I get this error : “A library used by this sketch is not installed properly.” and “A library relies on native code that’s not available. Or only works properly when the sketch is run as a 32-bit application.”

Here’s my code for now :

import ch.ntb.inf.libusb.*;
import ch.ntb.inf.libusb.exceptions.*;
import ch.ntb.inf.libusb.test.*;

Context ctx;
Device dev;

void setup()
{
  noLoop();
}


void draw()
{

  println("Search Device:");
  try
  {
    ctx = new Context();
  }
  catch (LibusbException e) 
  {
    println("Error occured: ctx");
    e.printStackTrace();
  }
  try 
  {
    Device dev = Device.search(ctx, 0x0000, 0x0000);                         
  }
 catch (LibusbException e) 
 {
 
   println("Error occured: search");
   e.printStackTrace();
 }
  
}

Hope someone will be able to help me !
Thanks forward !

Did you try contacting the maintener of the repo?

Any reason you want to use this old project? The link is from 2208.

I like to think that after 10 years there are better alternatives. Maybe not in Processing but in Java, which you can use in Processing.

To consider: if you install a usb to serial driver, you could access your usb using the serial lib… I think. Not sure if this could work in your challenge.

Kf

Thanks for the reply !
Actually, I want to send and receive raw usb data to/from an usb device, not being using serial over usb.
Since I saw this had been done in the past on the 2008 link, I thought using libusbjava was the simplest way to do it, not having found anything else of the same type…
If you have any other idea like an other library I could use to send an receive raw usb data, I’ll take it :slight_smile:

Up !

Anyone has an idea ?

Thanks forward !

Not sure why you want to process raw usb data… if you dont find much luck out there with Google, then I doubt you will get any leads here. What OS are you using or doing this project on? I can suggest exploring a linux forum and check for writing usb drivers from scratch. I guess you can find stuff in python and more likely in C but not sure about java.

Just keep looking and hopefully you find a better lead.

I can suggest that if you express your intentions in your project, you could potentially get alternatives…

Also explore Arduino and rasp-pi forums…

Kf