Skip to content

Instantly share code, notes, and snippets.

@jasursadikov
Created December 30, 2024 06:15
Show Gist options
  • Select an option

  • Save jasursadikov/c69c15f7b62feb8d4d8bb7e30ca075d9 to your computer and use it in GitHub Desktop.

Select an option

Save jasursadikov/c69c15f7b62feb8d4d8bb7e30ca075d9 to your computer and use it in GitHub Desktop.
Disables LED light on the back of the laptop for Alienware R15x
#!/usr/bin/env python3
import hid
vendor_id=0x187c
product_id=0x0550
with hid.Device(vendor_id, product_id) as h:
off_lights='03266400130001020405060708090a0b0c0d0e0f10111213000000000000000000'
h.write(bytes.fromhex(off_lights))
@jasursadikov

Copy link
Copy Markdown
Author
#!/usr/bin/env python3

import hid
import time

VENDOR  = 0x187c
PRODUCT = 0x0550

with hid.Device(VENDOR, PRODUCT) as h:

    # set all zones black
    for zone in range(1, 25):

        pkt = bytearray(33)

        pkt[0] = 0x03
        pkt[1] = 0x26
        pkt[2] = 0x64
        pkt[4] = zone

        h.write(bytes(pkt))

    # apply changes
    apply_pkt = bytearray(33)
    apply_pkt[0] = 0x03
    apply_pkt[1] = 0x27
    apply_pkt[2] = 0x64

    h.write(bytes(apply_pkt))

This is something that ChatGPT made to disable also Alien head

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