Unable to use USB mice

usb

#1

I am unable to properly use a standard USB mouse. Both mice I have tested work on a Windows 7 laptop, but give two different errors.

The first mouse, when connected, shows this:

USB Device Attached
PID: AE1h
VID: 2188h
Address (#1) assigned.
cfg desc: num interfaces 1
interface: interface 0, num 0, numep 1, class 3 , sub class 1
endpoint: interface 0, ep num 0, addr  81
Manufacturer : N/A
Product :  USB OPTICAL MOUSE
Serial Number : N/A
Enumeration done.
This device has only 1 configuration.
Default configuration set.
Switching to Interface (#0)
Class    : 3h
SubClass : 1h
Protocol : 2h
Mouse device found!
HID class started.

However, when I try out a test script I get some odd outputs:

  1. The left click is permanently pressed and the right and middle buttons are never.
  2. The Y value moves down if I move it up or left and up if I move it down or right.
  3. The X value appears to move up if I move up and right at the same time, while holding down one of the three buttons.

When the other mouse is connected, the axoloti just displays USB Device Attached and then doesn't print anything else. Also, the light under the mouse (which is optical) doesn't turn on.

The axoloti is connected directly to the laptop and has nothing else connected, other than the mouse. I also don't know whether this is a problem with the axoloti patcher, the mice or the axoloti core.

Please can someone explain how to fix the problem in the hardware, or fix the code in the software!


#2

If you haven't already, try installing the "winusbcompat.zip" file found in github.
Always works for me.
You will need to scroll down to find it.. you will see it under the "Axoloti - 1.0.6" group of files.
Maybe this link will help you get there a bit quicker.. https://github.com/axoloti/axoloti/releases
:wink:


#3

I have two problems:

  1. I'm not sure how to install it, as if I right click the Setup Information file, and click install, it tells me The INF file you selected does not support this method of installation.
  2. I don't see how it will change anything on the axoloti and its own USB ports (that was what I was asking about).

#4

Switch on your Axo, it should appear in your windows "devices and printer" right click and select properties, under hardware there are 3 devices, i think its something like "bulk interface" it will look like it hasn't been setup correctly, select it, press properties, a new box will open up, click "change settings" select the page "driver", select "update driver", new box with 2 options, automaticaly search or browse my computer, select browse my compter and point it to where you have the drive you downloaded which is where you extracted the "winusbcompat.zip" file, and it should install the driver.


#5

@Ax0_0 absolutely correct

@Gavin this is a firmware issue.

ok, because your not getting "HID class started." this indicates the device is not being recognised as a standard HID device.

this is likely to be one of :

  • power, if devices requests too much power it wont be accepted.
  • its not class compliant, i.e. to use it you need to use devices drivers when you use on mac/pc
  • its got an internal hub e.g. a keyboard with an integrated mouse, might present itself as two devices (keyboard and mouse) via a hub - axoloti does not support hubs
  • some odd issue with the communication with that mouse

Ive not see this with mice before, but honestly, thats probably more down to number of users attaching mice... but we have had all of these issues reported with MIDI devices.

I'm a bit surprised you don't get the device information printed, as im pretty sure we print that prior to determining if its a handled device or not. that, plus, you say the light not coming on, makes me wonder if its a power issue... but seems odd for a mouse :wink:

perhaps you can review the above, and think if any may apply.

if its a firmware issue, then the USB handling has been completely rewritten for the next release of axoloti (sorry, no date for that). This might help , and its also supports hubs , which would also help power issues (as you could use a powered hub, to supply more juice)

sorry, no immediate help...

hmm, not sure... id need to test this, not tried with any mouse i have...
I think others have had the mouse code working, but id like to try myself before commenting.
as I said above, im not sure how much use this has got...

did you look at the help patch, i must admit its more complex than id have expected... i.e. the data appears to be 'packed'


#6

They are both individual mice, so there should be no internal hub problem.

Check with powered hub connecting axoloti to windows:
1st mouse did same as before.
For 2nd mouse it did light up and I got this output:

USB Device Attached
PID: 2510h
VID: 93Ah
Address (#1) assigned.
cfg desc: num interfaces 1
interface: interface 0, num 0, numep 1, class 3 , sub class 1
endpoint: interface 0, ep num 0, addr  81
Manufacturer : PixArt
Product : USB Optical Mouse

But then I got:

Ping: WaitSync Timeout, disconnecting now
Disconnect request
USB device found

And on trying to reconnect:

Control transfer failed: -7
connected
java.lang.Exception: cpuserial has wrong length
java.lang.Exception: cpuserial has wrong length
	at axoloti.HWSignature.Verify(HWSignature.java:111)
	at axoloti.USBBulkConnection.connect(USBBulkConnection.java:315)
	at axoloti.MainFrame.jCheckBoxConnectActionPerformed(MainFrame.java:727)
	at axoloti.MainFrame.access$500(MainFrame.java:89)
	at axoloti.MainFrame$8.actionPerformed(MainFrame.java:521)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Control transfer failed: -1
Ping: WaitSync Timeout, disconnecting now
Disconnect request
Control transfer failed: -7
Ping: WaitSync Timeout, disconnecting now
Control transfer failed: -7
Control transfer failed: -7
Control transfer failed: -7
Control transfer failed: -7

After unplugging the mouse and reconnecting the axoloti, I got this:

USB device found
connected
java.lang.Exception: cpuserial has wrong length
java.lang.Exception: cpuserial has wrong length
	at axoloti.HWSignature.Verify(HWSignature.java:111)
	at axoloti.USBBulkConnection.connect(USBBulkConnection.java:315)
	at axoloti.MainFrame.jCheckBoxConnectActionPerformed(MainFrame.java:727)
	at axoloti.MainFrame.access$500(MainFrame.java:89)
	at axoloti.MainFrame$8.actionPerformed(MainFrame.java:521)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Ping: WaitSync Timeout, disconnecting now
Disconnect request
Ping: WaitSync Timeout, disconnecting now

And again if I try again.

The axoloti works after unplug.


#7

the cpuserial will just mean the firmware has crashed/is in an unexpected state after the disconnect, i don't think it yields any real clues/information.

sounds like something odd in the comms is going on with your second mouse, first time ive seen it for mice.
I have to say I'm not 100% surprised, this was the last possibility i gave ... and it is something we saw on usb midi, and we needed a number of firmware iterations to get it where it is now, perhaps its similar with HID.

you could raise it as a bug in the Axoloti http://github/axoloti/axoloti but given the new firmware is completely different, im not sure its going to get a priority (but of course i may be wrong)

Ive only got an Apple USB mouse, but I'll give that a go, and see if it works as expected...


#8

@Ax0_0

ok, so I tried with my Apple USB mouse and all appeared to be working correctly

however, as i half remembered, the values x/y on the mouse object cannot just be used as is.
you need to process them a bit to get useable values - if you look at the help file attached to usb/mouse, this shows you how to process X either as absolute position or as velocity ... you can then easily hook this up to Y to separate test that axis.

hopefully if you do this one of your mice will work... and hopefully the other will be fixed with the new firmware.

(sorry, I only have one mouse to test with , apart from this i use wireless or laptop trackpads etc)


#9

Unfortunately, I understand the x and y wrap and I have tested the working mouse with the help patch, but it doesn't work properly, as I have said before.