News:

Precision Simulator update 10.175 (29 May 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

USB controls disconnected during Aerowinx START

Started by double-alpha, Sun, 26 Jan 2020 22:08

PilotUnaware - BAW17H

I too am having this same issue.

I have a Corsair HARPOON mouse and to start PSX I have to unplug it and use the keyboard to run PSX.

I also get the same error message when using RDP to remote onto a PC that has no USB device connected to it (no mouse, no keyboard, just the network cable and power cable) Could this be a JAVA issue or even worse a W10 issue?

Craig

                                                                                                           

[Aerowinx Precision Simulator - Exceptions]

java.lang.NullPointerException
   at net.java.games.input.RawMouse$Button.<init>(RawMouse.java:197)
   at net.java.games.input.RawMouseInfo.createControllerFromDevice(RawMouseInfo.java:83)
   at net.java.games.input.RawInputEnvironmentPlugin.createControllersFromDevices(RawInputEnvironmentPlugin.java:160)
   at net.java.games.input.RawInputEnvironmentPlugin.enumControllers(RawInputEnvironmentPlugin.java:176)
   at net.java.games.input.RawInputEnvironmentPlugin.<init>(RawInputEnvironmentPlugin.java:123)
   at net.java.games.input.DirectAndRawInputEnvironmentPlugin.<init>(DirectAndRawInputEnvironmentPlugin.java:46)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:157)
   at Usb.init(Usb.java:2273)
   at Core.startAll(Core.java:775)
   at Aerowinx.main(Aerowinx.java:65)
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.String.substring(Unknown Source)
   at FmcNg.readGlobProfilePts(FmcNg.java:1889)
   at FmcNg.situLoadInit(FmcNg.java:374)
   at FmcGlobal.situLoadInit(FmcGlobal.java:618)
   at CduHub.situLoadInit(CduHub.java:601)
   at Core.unpauseLoader(Core.java:345)
   at SituationFiler.load(SituationFiler.java:597)
   at Core.startAll(Core.java:1079)
   at Aerowinx.main(Aerowinx.java:65)
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

United744

Quote from: jcomm on Mon, 27 Jan 2020 16:21
Although not PSX-related, last week / weekend Win 10 update did trigger some USB problems at our datacenter.

Some peripherals stopped working or exhibited strange behaviour.

Make sure your desktop isn't on hold for the update, or actually did the update.

Also find how to prevent specific drivers from being updated whenever Win 10 updates automatically. There are many articles available on it accross the Internet - I'll try to find one that was of great use to me when Win 10 updates kept messing around with my Nvidia drivers...

I spent a couple of weeks figuring out how to prevent ALL Win 10 updates. I'm still on June 2018. :)

Hardy Heinlin

Quote from: Craig Haskell on Tue,  3 Mar 2020 23:03
I also get the same error message ...

Lieutenant,

from your remote Aerowinx folder please load the file Aerowinx/Preferences/Default.pref with a text editor and search for this variable:

UsbUnknownIncl

If it is set to 1, replace the 1 with 0:

UsbUnknownIncl=0

Save the file. Restart your remote PSX.

Does that help?


Regards,

|-|ardy

PilotUnaware - BAW17H

QuoteLieutenant,

Close, lol, its just a Sergeant

Thanks Hardy for your message.

I did already try this but unfortunately, did not work for myself.

I ended up purchasing a logitech rolloerball mouse and it works fine on my main machine but not for my remote session, only thing I can think of is that I use teamviewer rather than RDP.

Cheers

Craig
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

PilotUnaware - BAW17H

#24
To add to this tried TV, but still the same result not sure how others use PSX on a multi machine setup

I have also tried starting it on a second machine with no other devices other than the mouse (no keyboard) and it still says USB Controls Disconnected. This time direct and not throught TV or RDP

I have copied the files straight across from machine 1 so I know that they would be the same but still nothing :( Very confussed at this point

Both machines are running the same version of W10 and JAVA, both have the same updates
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

Hardy Heinlin

Why do you use Teamviewer or RDP to see the monitor of a networked PSX instance? Normally, you just connect the PSX network and that's it. A running PSX instance generates the flight deck graphics on the respective desktop anyway. Why do you want to see this desktop on another computer if that computer can run PSX? I understand that a remote desktop is useful on a computer that cannot run PSX. But your Windows computer can run PSX.

Once you have a PSX network, you need your USB controls on just one PSX computer. Activate your USB controls on the server, for example, and deactivate your USB stuff on the PSX clients.


Regards,

|-|ardy

PilotUnaware - BAW17H

Thanks for your reply Hardy.

The reason to use rdp or teamviewer is so that it would eliminate the need for 2 keyboards and mice with the need for a kvm switch.

But the question remains as to why with no USBs connected on my second and third machines (non whatsoever) why it still comes up with the same error message?

No usbs show in the logs and no errors in the error log either.

Cheers

Craig
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

Hardy Heinlin

Hi Craig,

why the error message occurs -- I don't understand that either, regrettably.

Regarding your keyboard and mouse synchronization: When your PSX instances are networked via the PSX network, all simulation related actions are synchronized anyway; e.g. when you click an autopilot switch with the mouse, or if you change a weather variable with the keyboard, the action will automatically sent to all other PSX instances through the PSX network. You should not cause the same mouse and keyboard actions to occur in the other PSX instances. If you do that, the same action will occur once more in the entire network, and this is not only superfluous; it will return any toggle function to its previous status.

Example, flight director (FD) switch:

Computer A keyboard hits F key.
FD in PSX A is now off.
PSX A sends FD-off action to the PSX network.
FD in PSX B is now off.
Remote desktop sends A-keypress to computer B.
FD in PSX B is now on.
PSX B sends FD-on action to the PSX network.
FD in PSX A is now on.

Summary: The FD was off for just a millisecond. Now the FD is on as before, thanks to the desktop remote system which duplicates the PSX network.

Or is your remote desktop system only active in a single computer, either A or B, never A and B at the same time?


Regards,

|-|ardy

Jeroen Hoppenbrouwers

Quote from: Craig Haskell on Thu,  5 Mar 2020 12:13
The reason to use rdp or teamviewer is so that it would eliminate the need for 2 keyboards and mice with the need for a kvm switch.

Craig, I dont get it.

You have two computers.

And you display both on the same computer display (with TeamViewer or equivalent).

Why two computers?

If you want to share one keyboard/mouse combo over multiple computers, try Synergy. Works for me for over a decade. Full disclosure: I bought it several times already.
https://symless.com/synergy


Hoppie

PilotUnaware - BAW17H

#29
Hardy thanks again for your reply and thanks Hoppie.

Sorry I think I may have miscommunicated what I meant. 

I only use RDP/TV to start PSX it isnt used to control it in any way. This way there is only need for 1 keyboard and mouse

I have attached a network diagram via the link below that may help?

https://imgur.com/ECb2cTQ

I may have read things wrong (as I am new to building) but as far as I can tell I have to run an instance of PSX on the visual machine (Please let me know if this is incorrect ) as "main" with one instance on PSX 1 "client" for the PFD and EICAS and one on PSX 2 as "client" to run the switches etc on the OH panel.

But again the only reason for using RDP/TV is to start a PSX instance. and although there is no USB devices plugged into either of the 2 PSX machines at the moment it still comes up with USB controls disconnected.

Thanks again for your help
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

Jeroen Hoppenbrouwers

Quote from: Craig Haskell on Thu,  5 Mar 2020 23:28
I may have read things wrong (as I am new to building) but as far as I can tell I have to run an instance of PSX on the visual machine (Please let me know if this is incorrect ) as "main" with one instance on PSX 1 "client" for the PFD and EICAS and one on PSX 2 as "client" to run the switches etc on the OH panel.

If with "visual machine" you mean a computer running a scenery generator, then no, you do NOT need to run ANY form of PSX there. All scenery generators have a companion program, such as the PSX ExternalSim connector, that does the network work.

You can select one of the two PSX-es as "Server". It does not really matter which one. The other PSX machine then becomes "Client". Point the client at the server. Point the scenery generator at the server, usually you need both Main and Boost Servers for the scenery generator (I think).

/-/

Hardy Heinlin

Quote from: Craig Haskell on Thu,  5 Mar 2020 12:13
But the question remains as to why with no USBs connected on my second and third machines (non whatsoever) why it still comes up with the same error message?

I think I misunderstood your question. Are you assuming that the message "USB controls disconnected" refers to all USB devices, including mouse and keyboard? It doesn't. It just refers to flight controls, i.e. sticks, pedals, buttons etc., not to basic devices like mouse or keyboard. The message refers to the stuff under Instructor > Preferences > USB. When the "USB on" checkbox on that page is deselected, mouse and keyboard are still connected (if they are plugged in).

So the message "USB controls disconnected" is quite normal when no joystick etc. is plugged in. This is not an error message. It's a normal status information.

I thought you are still referring to the error log in your file errors.txt. That was the Corsair gaming mouse problem.


Regards,

|-|ardy

PilotUnaware - BAW17H

Thanks Guys,

This has cleared up a lot for me keep up the good work!

Craig
PilotUnaware - BAW17H
https://www.twitch.tv/pilotunaware

double-alpha

Hy guys,


I'm answering my thread a little late because I haven't had time to sort it out yet...

However, I have just made a format of my hard drive then a complete and clean reinstall of windows10, drivers, JAVA, and PSX.

I made a test with another computer (my wife's PC): My Thrusmaster Joystick works properly with PSX, but unfortunately still no joy on my computer!
It works with all my other sims on my computer and I don't see any trouble, except with PSX.

This is not a big deal as I usually fly with A/P engaged all the time, but PSX is such a marvel to fly manually that I am a bit frustrated!

FYI I use PSX 1.118 version
Java 8 update 261 (64 bit)
Windows 10 (version 18363.959)

Everything is up to date with a clean reinstall.

If anyone has experienced and solved the same issue, please let me know.

Thank you and best regards


double-alpha

ERROR PSX report, if it helps:

[Aerowinx Precision Simulator - Exceptions]

java.lang.NullPointerException
   at net.java.games.input.RawMouse$Button.<init>(RawMouse.java:197)
   at net.java.games.input.RawMouseInfo.createControllerFromDevice(RawMouseInfo.java:83)
   at net.java.games.input.RawInputEnvironmentPlugin.createControllersFromDevices(RawInputEnvironmentPlugin.java:160)
   at net.java.games.input.RawInputEnvironmentPlugin.enumControllers(RawInputEnvironmentPlugin.java:176)
   at net.java.games.input.RawInputEnvironmentPlugin.<init>(RawInputEnvironmentPlugin.java:123)
   at net.java.games.input.DirectAndRawInputEnvironmentPlugin.<init>(DirectAndRawInputEnvironmentPlugin.java:46)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
   at java.lang.reflect.Constructor.newInstance(Unknown Source)
   at java.lang.Class.newInstance(Unknown Source)
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:157)
   at Usb.init(Usb.java:2273)
   at Core.startAll(Core.java:777)
   at Aerowinx.main(Aerowinx.java:65)

double-alpha

EUREKA!

I searched some old threads and LawerPilot eventually found the answer for my USB issue!
What a relief!

I give you the solution that worked for me (I guess I am not the only guy with this trouble):

http://aerowinx.com/board/index.php?topic=4709.msg49977#msg49977

"I am able to get it working by starting PSX with the mouse unplugged. PSX detects my controls and then I am able to plug my mouse back in and everything works like a charm.

I'm sure there must be some way in Windows 10 to assign priority to HID's, but I guess it's not worth the effort to research since unplugging and replugging is a snap."


The downside is that each time I start PSX I have to unplug the mouse and then reconnect it.

Hardy, if ever you can do something for the USB recognition, it would be great.

Thanks!



Jeroen Hoppenbrouwers

You could try to buy a $6 mouse and see whether that works. It may really be just the kind of mouse.


Hoppie

double-alpha

My wife has a basic mouse that seems to not disturb my Thrusmaster HOTAS WARTHOG.

I will give it a try.

By the way, my current mouse is a CORSAIR gaming mouse

Hardy Heinlin

Quote from: Double-alpha on Wed, 22 Jul 2020 20:56
Hardy, if ever you can do something for the USB recognition, it would be great.

It would be great, but I have no access to the Java USB interface code. That's third party software.

The CORSAIR gaming mouse is the problem; it's a known problem. It doesn't declare itself as a mouse device; that's why the PSX flight control menu is unable to detect it as a mouse, hence it's unable to exclude it.

What's displayed in your Aerowinx/Developers/USB-Detect.txt when you started PSX while the CORSAIR gaming mouse was plugged in?


Regards,

|-|ardy

double-alpha

Hi Hardy,

I have just tried a basic logitec mouse and my USB are indeed recognized so HOTAS thrusmaster works perfectly (I do not need to unplug the Logitec mouse before starting PSX).

And you are right, my CORSAIR gaming mouse is the problem!

It seems that I will not be the only one to have this kind of problem (CORSAIR is not uncommon), so maybe it would be useful to pin a thread to list simple problems like mine (in accessories topic for example)?

FYI When I started PSX with the CORSAIR mouse, I get (in Aerowinx/Developers/USB-Detect.txt):

    USB detection test:

    (nothing is displayed...)


When I started PSX with the LOGITEC mouse, I get (in Aerowinx/Developers/USB-Detect.txt):

USB detection test:

Joystick - HOTAS Warthog | Stick | 0 | Unknown | 0; Bouton 0; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 1; Bouton 1; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 2; Bouton 2; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 3; Bouton 3; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 4; Bouton 4; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 5; Bouton 5; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 6; Bouton 6; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 7; Bouton 7; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 8; Bouton 8; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 9; Bouton 9; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 10; Bouton 10; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 11; Bouton 11; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 12; Bouton 12; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 13; Bouton 13; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 14; Bouton 14; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 15; Bouton 15; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 16; Bouton 16; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 17; Bouton 17; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | 18; Bouton 18; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | pov; Commande de pouce; 
Joystick - HOTAS Warthog | Stick | 0 | Unknown | y; Axe Y;  (analog)
Joystick - HOTAS Warthog | Stick | 0 | Unknown | x; Axe X;  (analog)


Best regards