Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device not initialized #44

Closed
ItsVeeBot opened this issue Jul 24, 2016 · 3 comments
Closed

Device not initialized #44

ItsVeeBot opened this issue Jul 24, 2016 · 3 comments
Labels

Comments

@ItsVeeBot
Copy link

I am attempting to open a device (A Buzz! controller) to be written to. Unfortunately, the writes don't seem to be working, Upon printing the last error message, it tells me "Device not Initialized". The String representation of the device is like this:

HidDevice [path=\\?\hid#vid_054c&pid_0002#6&1795862b&2&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}, vendorId=0x54c, productId=0x2, serialNumber=null, releaseNumber=0x1101, manufacturer=Logitech, product=Logitech Buzz(tm) Controller V1, usagePage=0x1, usage=0x4, interfaceNumber=-1]

Any help would be appreciated.

@andyrozman
Copy link

Did you call open on device after you 'found' it. I had problem like that.
I got device from manager and than just tried to use it without opening it
(opening was not be needed on version 0.3.1 of library).
Andy

On Sun, Jul 24, 2016, 04:54 VmKid notifications@github.com wrote:

I am attempting to open a device (A Buzz! controller) to be written to.
Unfortunately, the writes don't seem to be working, Upon printing the last
error message, it tells me "Device not Initialized". The String
representation of the device is like this:

HidDevice
[path=?\hid#vid_054c&pid_0002#6&1795862b&2&0000#{4d1e55b2-f16f-11cf-88cb-001111000030},
vendorId=0x54c, productId=0x2, serialNumber=null, releaseNumber=0x1101,
manufacturer=Logitech, product=Logitech Buzz(tm) Controller V1,
usagePage=0x1, usage=0x4, interfaceNumber=-1]

Any help would be appreciated.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#44, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFPs5ShK443Fv8wAQDVgLaTeykkhhq0zks5qYuIOgaJpZM4JTfz5
.

@ItsVeeBot
Copy link
Author

Yes, I did. The code that I'm using in this case is below:

if(controllerDevice != null){
            if(!controllerDevice.isOpen()) controllerDevice.open();
            System.out.println(controllerDevice.getLastErrorMessage());
            controllerDevice.write(message, MESSAGE_LENGTH, (byte)0);  
}
else System.out.println("Couldn't change lighting!");

@gary-rowe
Copy link
Owner

Closing as this is likely covered in #81.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants