Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active December 14, 2024 22:45
Show Gist options
  • Select an option

  • Save Lewiscowles1986/eef220dac6f0549e4702393a7b9351f6 to your computer and use it in GitHub Desktop.

Select an option

Save Lewiscowles1986/eef220dac6f0549e4702393a7b9351f6 to your computer and use it in GitHub Desktop.
Playstation 2 EU USB "The Buzz" controller

"The Buzz" Playstation 2 EU USB controller

Using tool "Simple HID Write"

  • W: Write
  • R: Read
W 00 {FF} 00 00 00 // controller 1 red light activate
W 00 {00} 00 00 00 // controller 1 red light deactivate
W 00 00 {FF} 00 00 // controller 2 red light activate
W 00 00 {00} 00 00 // controller 2 red light deactivate
W 00 00 00 {FF} 00 // controller 3 red light activate
W 00 00 00 {00} 00 // controller 3 red light deactivate
W 00 00 00 00 {FF} // controller 4 red light activate
W 00 00 00 00 {00} // controller 4 red light deactivate

R 7F 7F {00 00 F0} // any controller button release (reports currently pressed buttons)

R 7F 7F {01} 00 F0 // controller 1 red button press
R 7F 7F {10} 00 F0 // controller 1 blue button press
R 7F 7F {08} 00 F0 // controller 1 orange button press
R 7F 7F {04} 00 F0 // controller 1 green button press
R 7F 7F {02} 00 F0 // controller 1 yellow button press

R 7F 7F {20} 00 F0 // controller 2 red button press
R 7F 7F 00 {02} F0 // controller 2 blue button press
R 7F 7F 00 {01} F0 // controller 2 orange button press
R 7F 7F {80} 00 F0 // controller 2 green button press
R 7F 7F {40} 00 F0 // controller 2 yellow button press

R 7F 7F 00 {04} F0 // controller 3 red button press
R 7F 7F 00 {40} F0 // controller 3 blue button press
R 7F 7F 00 {20} F0 // controller 3 orange button press
R 7F 7F 00 {10} F0 // controller 3 green button press
R 7F 7F 00 {08} F0 // controller 3 yellow button press

R 7F 7F 00 80 {F0} // controller 4 red button press
R 7F 7F 00 00 {F8} // controller 4 blue button press
R 7F 7F 00 00 {F4} // controller 4 orange button press
R 7F 7F 00 00 {F2} // controller 4 green button press
R 7F 7F 00 00 {F1} // controller 4 yellow button press

NOTE: All results seem to be flag-sets for buttons so for example combining is a binary OR operation

R 7F 7F {20 80} F0 // controller 2 & controller 4 red button press

R 7F 7F 00 {03} F0 // controller 2 blue & orange button press

R 7F 7F 00 00 {FC} // controller 4 blue & orange button press

R 7F 7F 00 {03 FC} // controller 2 & 4 blue & orange button press

W 00 {FF FF FF FF} // Turn on all red lights for controllers

Also:

  • When multiple buttons are pressed, multiple button release receives are generated (seems to be one-per button)
  • When multiple buttons are pressed, even if simultaneous the hw controller generates one event per button resolving timing issues
  • When multiple reads are detected from multi-press, it's probably a good idea to debounce until presses stop, or register the first and ignore the rest
  • As the controller sends complete state per button press, no need to store state

Device Info

  • VID 054C (hex) 1356 (dec) 2514 (oct)
  • PID 0002 (hex) 0002 (dec) 0002 (oct)
  • REV 1101 (hex) 4353 (dec) 10401 (oct)
  • Vendor name "Logitech"
  • Product name "Logitech Buzz(tm) Controller V1"
  • Serial No ""

Report Size

  • Input 6-Bytes
  • Output 8-Bytes
  • Feature 0-Byte
@SteCla
Copy link
Copy Markdown

SteCla commented Apr 17, 2019

Getting the HEX commands for all buttons is great, thanks! Can you clarify where to get / how to set up the interface ( tool "Simple HID Write" ?)

@Lewiscowles1986
Copy link
Copy Markdown
Author

Lewiscowles1986 commented Dec 31, 2020

If you have access to windows, I just hacked together the following using pywinusb library

from time import sleep
import pywinusb.hid as hid


activeDevice = None
all_hids = hid.find_all_hid_devices()
for index, device in enumerate(all_hids):
    if all([
        device.vendor_id == 1356,
        device.product_id == 2,
    ]):
        print("PS2 Buzz EU controller found!")
        print(f"VID: {device.vendor_id}, PID: {device.product_id}")
        activeDevice = device

if activeDevice:
    try:
        activeDevice.open()
        for report in device.find_output_reports() + device.find_feature_reports():
            print(report.report_type)
            print(report.get_raw_data())
            report.set_raw_data( [0, 0, 0, 0, 0, 0, 0, 0])
            report.send()
            print(report.get_raw_data())
            print(dir(report))
            for i in range(20):
                report.set_raw_data( [0, 0, 255, 0, 0, 0, 0, 0])
                report.send()
                sleep(0.15)
                report.set_raw_data( [0, 0, 0, 255, 0, 0, 0, 0])
                report.send()
                sleep(0.15)
                report.set_raw_data( [0, 0, 0, 0, 255, 0, 0, 0])
                report.send()
                sleep(0.15)
                report.set_raw_data( [0, 0, 0, 0, 0, 255, 0, 0])
                report.send()
                sleep(0.15)
            report.set_raw_data( [0, 0, 255, 255, 255, 255, 0, 0])
            report.send()
            sleep(10)
            print(report.get_raw_data())
    finally:
        report.set_raw_data( [0, 0, 0, 0, 0, 0, 0, 0])
        report.send()
        activeDevice.close()

The library seems to require sending 8 bytes to the device, and receiving 8, which is fine for me.

The script initializes the device in a known state, cycles through each of the buzzer lights in sequence 20 times, then turns them all on, then exits.

I Had to go into device manager and change the device type from USB hub to USB HID input.inf

@Lewiscowles1986
Copy link
Copy Markdown
Author

from time import sleep
import hid

activeDevice = None
all_hids = hid.enumerate()
activeDevice = hid.Device(1356, 2)

if activeDevice:
    try:
        # activeDevice.open()
        activeDevice.write(b'\x00\x00\xff\xff\xff\xff\x00\x00')
        for i in range(20):
            activeDevice.write(b'\x00\x00\xff\00\00\00\x00\x00')
            sleep(0.15)
            activeDevice.write(b'\x00\x00\00\xff\00\00\x00\x00')
            sleep(0.15)
            activeDevice.write(b'\x00\x00\0\00\xff\00\x00\x00')
            sleep(0.15)
            activeDevice.write(b'\x00\x00\00\00\00\xff\x00\x00')
            sleep(0.15)
        activeDevice.write(b'\x00\x00\xff\xff\xff\xff\x00\x00')
        sleep(10)
    finally:
        activeDevice.close()

@Anukatak
Copy link
Copy Markdown

Hello! Realy happy with your script! Is there a way to keep the lights on?

@Lewiscowles1986
Copy link
Copy Markdown
Author

@Anukatak well you'll see there are turn off and turn on, so if you turn on without turning off, they would stay on, wouldn't they 😉

@Anukatak
Copy link
Copy Markdown

Sorry for the dumb question ahaha a few minutes after asking I understood just that! Thanks for the script!

@Lewiscowles1986
Copy link
Copy Markdown
Author

It was not my intent to make you feel dumb or like your question was unfounded. Sorry for that. Text medium was not conveying me being a bit smirky in explanation. Thanks for feedback and glad you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment