[SOLVED] Issue: Spontaneous random directional input over Bluetooth.



  • Hi Nefarius!

    First of all thanks a lot for all the work you put into this!

    I feel bad that I need to report this issue, although you stated in your FAQ that random input is a hardware issue.
    However, I tested two genuine Dual Shock 3 controllers which usually work without issues and did so days ago with SCP toolkit.
    Additionally I tested the controllers on the same hardware, i.e. same Bluetooth dongle, booting into Linux. There I cannot observe this issue.

    When the controller is connected via Bluetooth and I play a game, spontaneous directional input events occur in intervals of 10-60 seconds.
    Of course, that makes it unusable via Bluetooth. Wired via USB does not exhibit this issue.
    I looked around the forum a bit and also on Github, but I could not find anything related to this issue that is recent.

    Is this issue already known to you? Is there something I can do about this, some kind of workaround you know of?
    In case you are looking into this, let me know if I can provide any additional information.

    Software versions (Setup file labels):
    Windows 10 1909
    ViGEmBus v1.16.115
    FireShock v3.0.0.0
    BthPS3 v1.2.4
    Shibari v1.5.171

    Log:

    2020-04-20 18:59:31.925 +02:00 [Information] Launching Shibari, version: "1.5.171.0"
    2020-04-20 18:59:34.006 +02:00 [Information] Loaded sink plugin "ViGEm Xbox 360 Sink"
    2020-04-20 18:59:34.148 +02:00 [Information] Loaded bus emulator "BthPS3 Bus Emulator"
    2020-04-20 18:59:34.150 +02:00 [Information] Starting bus emulator "BthPS3 Bus Emulator"
    2020-04-20 18:59:34.422 +02:00 [Information] BthPS3 Bus Emulator started
    2020-04-20 18:59:34.422 +02:00 [Information] Bus emulator "BthPS3 Bus Emulator" started successfully
    2020-04-20 18:59:34.422 +02:00 [Information] Loaded bus emulator "FireShock Bus Emulator"
    2020-04-20 18:59:34.422 +02:00 [Information] Starting bus emulator "FireShock Bus Emulator"
    2020-04-20 18:59:34.424 +02:00 [Information] FireShock Bus Emulator started
    2020-04-20 18:59:34.424 +02:00 [Information] Bus emulator "FireShock Bus Emulator" started successfully
    2020-04-20 23:21:32.789 +02:00 [Information] Found SIXAXIS device "\\?\BTHPS3BUS#{53F88889-1AAF-4353-A047-556B69EC6DA6}#9&95D6D76&0&002433E1D919#{7B0EAE3D-4414-4024-BCBD-1C21523768CE}" ("BTHPS3BUS\{53F88889-1AAF-4353-A047-556B69EC6DA6}\9&95D6D76&0&002433E1D919")
    2020-04-20 23:21:32.902 +02:00 [Information] Device "DualShock3 (00:24:33:E1:D9:19)" got attached via Bluetooth
    2020-04-20 23:21:32.905 +02:00 [Information] Connecting ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller"
    2020-04-20 23:21:32.914 +02:00 [Information] ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller" connected successfully
    2020-04-20 23:27:42.034 +02:00 [Information] Device "DualShock3 (00:24:33:E1:D9:19)" disconnected
    2020-04-20 23:27:42.036 +02:00 [Information] Device "DualShock3 (00:24:33:E1:D9:19)" got removed via Bluetooth
    


  • Very good summary!

    Odd, this typically only happens when rogue packets float along, I thought I ported everything necessary to combat it, I'll think of something. Might need you for tests.

    Cheers



  • Hey, thanks for the response!

    Sure, let me know if there is something I can do or test and also if you need any additional information.

    Regards!



  • Hi Angrond and Nefarius! Confirm the problem. Please let me know if there is something I can do or test also.
    DualShock 3 (original)
    Shibari, version: 1.5.171.0
    Windows 10 2004

    log:

    2020-05-21 19:15:02.839 +03:00 [Information] Launching Shibari, version: "1.5.171.0"
    2020-05-21 19:15:03.545 +03:00 [Information] Loaded sink plugin "ViGEm Xbox 360 Sink"
    2020-05-21 19:15:03.613 +03:00 [Information] Loaded bus emulator "BthPS3 Bus Emulator"
    2020-05-21 19:15:03.615 +03:00 [Information] Starting bus emulator "BthPS3 Bus Emulator"
    2020-05-21 19:15:03.750 +03:00 [Information] BthPS3 Bus Emulator started
    2020-05-21 19:15:03.751 +03:00 [Information] Bus emulator "BthPS3 Bus Emulator" started successfully
    2020-05-21 19:15:03.752 +03:00 [Information] Loaded bus emulator "FireShock Bus Emulator"
    2020-05-21 19:15:03.753 +03:00 [Information] Starting bus emulator "FireShock Bus Emulator"
    2020-05-21 19:15:03.755 +03:00 [Information] FireShock Bus Emulator started
    2020-05-21 19:15:03.756 +03:00 [Information] Bus emulator "FireShock Bus Emulator" started successfully
    2020-05-21 19:15:09.662 +03:00 [Information] Found SIXAXIS device "\\?\BTHPS3BUS#{53F88889-1AAF-4353-A047-556B69EC6DA6}#9&43BE849&0&E0AE5E82861B#{7B0EAE3D-4414-4024-BCBD-1C21523768CE}" ("BTHPS3BUS\{53F88889-1AAF-4353-A047-556B69EC6DA6}\9&43BE849&0&E0AE5E82861B")
    2020-05-21 19:15:09.735 +03:00 [Information] Device "DualShock3 (E0:AE:5E:82:86:1B)" got attached via Bluetooth
    2020-05-21 19:15:09.740 +03:00 [Information] Connecting ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller"
    2020-05-21 19:15:09.751 +03:00 [Information] ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller" connected successfully
    2020-05-21 19:15:11.806 +03:00 [Information] Stopping bus emulator "AirBender Bus Emulator"
    2020-05-21 19:15:11.808 +03:00 [Information] AirBender Bus Emulator stopped
    2020-05-21 19:15:11.809 +03:00 [Information] Bus emulator "AirBender Bus Emulator" stopped successfully
    2020-05-21 19:15:11.810 +03:00 [Information] Stopping bus emulator "BthPS3 Bus Emulator"
    2020-05-21 19:15:11.814 +03:00 [Information] BthPS3 Bus Emulator stopped
    2020-05-21 19:15:11.815 +03:00 [Information] Bus emulator "BthPS3 Bus Emulator" stopped successfully
    2020-05-21 19:15:11.816 +03:00 [Information] Stopping bus emulator "FireShock Bus Emulator"
    2020-05-21 19:15:11.817 +03:00 [Information] FireShock Bus Emulator stopped
    2020-05-21 19:15:11.818 +03:00 [Information] Bus emulator "FireShock Bus Emulator" stopped successfully
    2020-05-21 19:15:16.576 +03:00 [Information] Launching Shibari, version: "1.5.171.0"
    2020-05-21 19:15:17.093 +03:00 [Information] Loaded sink plugin "ViGEm Xbox 360 Sink"
    2020-05-21 19:15:17.158 +03:00 [Information] Loaded bus emulator "BthPS3 Bus Emulator"
    2020-05-21 19:15:17.160 +03:00 [Information] Starting bus emulator "BthPS3 Bus Emulator"
    2020-05-21 19:15:17.272 +03:00 [Information] BthPS3 Bus Emulator started
    2020-05-21 19:15:17.273 +03:00 [Information] Bus emulator "BthPS3 Bus Emulator" started successfully
    2020-05-21 19:15:17.274 +03:00 [Information] Loaded bus emulator "FireShock Bus Emulator"
    2020-05-21 19:15:17.275 +03:00 [Information] Starting bus emulator "FireShock Bus Emulator"
    2020-05-21 19:15:17.276 +03:00 [Information] FireShock Bus Emulator started
    2020-05-21 19:15:17.277 +03:00 [Information] Bus emulator "FireShock Bus Emulator" started successfully
    2020-05-21 19:15:21.181 +03:00 [Information] Found SIXAXIS device "\\?\BTHPS3BUS#{53F88889-1AAF-4353-A047-556B69EC6DA6}#9&43BE849&0&E0AE5E82861B#{7B0EAE3D-4414-4024-BCBD-1C21523768CE}" ("BTHPS3BUS\{53F88889-1AAF-4353-A047-556B69EC6DA6}\9&43BE849&0&E0AE5E82861B")
    2020-05-21 19:15:21.251 +03:00 [Information] Device "DualShock3 (E0:AE:5E:82:86:1B)" got attached via Bluetooth
    2020-05-21 19:15:21.256 +03:00 [Information] Connecting ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller"
    2020-05-21 19:15:21.266 +03:00 [Information] ViGEm target "Nefarius.ViGEm.Client.Targets.Xbox360Controller" connected successfully
    
    

    btw respect for your work, Nefarius!



  • Hm, must consult the unholy SCP sources once again then. There's an invalid packet sent over BTH but I was a 100% confident that I fixed that in Shibari... hm, will take a 2nd look I guess 🤔



  • Hi again.
    I checked the Linux kernel driver and found the following section:

    static int sony_raw_event(struct hid_device *hdev, struct hid_report *report,
    		u8 *rd, int size)
    {
    	struct sony_sc *sc = hid_get_drvdata(hdev);
    
    	/*
    	 * Sixaxis HID report has acclerometers/gyro with MSByte first, this
    	 * has to be BYTE_SWAPPED before passing up to joystick interface
    	 */
    	if ((sc->quirks & SIXAXIS_CONTROLLER) && rd[0] == 0x01 && size == 49) {
    		/*
    		 * When connected via Bluetooth the Sixaxis occasionally sends
    		 * a report with the second byte 0xff and the rest zeroed.
    		 *
    		 * This report does not reflect the actual state of the
    		 * controller must be ignored to avoid generating false input
    		 * events.
    		 */
    		if (rd[1] == 0xff)
    			return -EINVAL;
    
    		swap(rd[41], rd[42]);
    		swap(rd[43], rd[44]);
    		swap(rd[45], rd[46]);
    		swap(rd[47], rd[48]);
    
    		sixaxis_parse_report(sc, rd, size);
    	}
    ...
    

    Is this something you have already taken into account in your driver?
    Sorry, in case this is something that has nothing to do with the issue. But this was the only thing in the linux kernel driver that I could find at a glance with my limited insight.
    Could you also please tell me in which project and files these kind of things are handled in your Windows driver? I tried to skim through your bluetooth driver, but could not find something similar to response interpretation. Would be really nice of you if you could give me a hint, so I can learn a thing or two about how this works.

    Cheers!



  • @Angrond yep, I'm aware of that part of the Linux sources. The driver doesn't handle the traffic itself, that code - for now - is in Shibari so take a look at the BthPS3 source plugin for that. You should also find the same check there. Maybe my offset is wrong or something, I'm unfortunately too booked currently to look into that.



  • OK this is really weird, I could've sworn this was added quite a while ago but I had a quick browse and sure enough, the check isn't there so I've added it.

    Binaries to check out here, I haven't tested it, be my guest to confirm if it works or not.

    Cheers



  • Thanks so much Nefarius!
    It seems to be working perfectly fine now. Tested under the same conditions but with your new Shibari binaries.
    Staying in a game menu for >10 minutes, not a single random input event gets through.
    Also while playing for more than 2 hours, I could not notice any issues.

    It does feel so good to finally be able to use my Dual Shock 3 controllers with such a clean driver 😁



  • Hey there, @nefarius wanted to report that the build you posted solved this issue for me as well! I was really sad when my MLB 11 PS3 controller was exhibiting this issue, but glad to see there was a fix for it.

    Will there be a new stable build of Shibari at some point? Thanks for reading!


Log in to reply