Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

need help in ps2 port power toggle


ghost's Avatar
0 0

On the top of my head, place the LED on a MCU unit of some kind. Write a keyboard emulating piece of software that responds on the initial command RESET that the host (Your computer) sends to the keyboard for identification and initialization.

Implement to to run the LED high or low based on RESET commands from the host or similar.

You could also implement your own device driver to send custom data to the PS/2 port instead as I'm not exactly sure how the RESET command works in different operating systems.

There might also be a possibility to fiddle with IRQ 1 to run the entire PS/2 port low, but doubtful that the user space allows you to do this without kernel spacing.

More reading:

http://www.computer-engineering.org/ps2protocol/


ghost's Avatar
0 0

i cant do programing :( i was hoping some one else has done this be for after two hours of messing around with crap i broke down and installed a switch :xx: some times you just cant win


stealth-'s Avatar
Ninja Extreme
0 0

On an alternate note, that looks really awesome.


ghost's Avatar
0 0

thank you i got the leds from this idog knockoff called happy dog but they dont blink to sound :( but that what made me kill it to make this :D


techb's Avatar
Member
0 0

Your video reminded me of this. Could do this with your setup. If you used an Arduino Mini or a Teensy, you could hid all the guts in the formfactor. This could also add the switching functionality, code is required, but I could help you out. It doesn't use the ps2 port though, rather a serial or usb(used a COM).


ghost's Avatar
0 0

cant the code be modded to use ps2 just have a constant data out but but it needs to be the same 5v but he did not post the code


ghost's Avatar
0 0

never mind found it it runs on IDE Code

//Developed by Rajarshi Roy import java.awt.Robot; //java library that lets us take screenshots import java.awt.AWTException; import java.awt.event.InputEvent; import java.awt.image.BufferedImage; import java.awt.Rectangle; import java.awt.Dimension; import processing.serial.*; //library for serial communication

Serial port; //creates object "port" of serial class Robot robby; //creates object "robby" of robot class

void setup() { port = new Serial(this, Serial.list()[0],9600); //set baud rate size(100, 100); //window size (doesn't matter) try //standard Robot class error check { robby = new Robot(); } catch (AWTException e) { println("Robot class not supported by your system!"); exit(); } }

void draw() { int pixel; //ARGB variable with 32 int bytes where //sets of 8 bytes are: Alpha, Red, Green, Blue float r=0; float g=0; float b=0;

//get screenshot into object "screenshot" of class BufferedImage BufferedImage screenshot = robby.createScreenCapture(new Rectangle(new Dimension(1368,928))); //1368*928 is the screen resolution

int i=0; int j=0; //1368928 //I skip every alternate pixel making my program 4 times faster for(i =0;i<1368; i=i+2){ for(j=0; j<928;j=j+2){ pixel = screenshot.getRGB(i,j); //the ARGB integer has the colors of pixel (i,j) r = r+(int)(255&(pixel>>16)); //add up reds g = g+(int)(255&(pixel>>8)); //add up greens b = b+(int)(255&(pixel)); //add up blues } } r=r/(684464); //average red (remember that I skipped ever alternate pixel) g=g/(684464); //average green b=b/(684464); //average blue

port.write(0xff); //write marker (0xff) for synchronization port.write((byte)(r)); //write red value port.write((byte)(g)); //write green value port.write((byte)(b)); //write blue value delay(10); //delay for safety

background(r,g,b); //make window background average color }