good day guys
I have a project in which i have to connect to the internal chip of a mouse and perform some actions such as applying changes on the RGB sensor and so on by using Java language. I’ve worked with serial ports with JSSC library before and I am familiar with this type of ports. My questions are :
-
How can I connect to the internal chip of the mouse using the serial port?
-
How are the algorithms of these types of ICs?
-
Is it possible to connect with the firmware of these types of mice using the serial port?
Any feedback would be appreciated
Pooya
I use this class to connect to the devices by using serialport . When i plug the serialport of the mouse i cant connect to the chip . I checked different COM numbers but i got port busy from the active ones . I think thats because of using wrong input parameters .
import jssc.SerialPort;
import jssc.SerialPortEvent;
import jssc.SerialPortEventListener;
import jssc.SerialPortException;
public class serialreader {
private static SerialPort serialPort;
public static void main(String[] args) {
serialPort = new SerialPort("COM Number");
try {
serialPort.openPort();
serialPort.setParams(SerialPort.BAUDRATE_9600,
SerialPort.DATABITS_8,
SerialPort.STOPBITS_1,
SerialPort.PARITY_NONE);
serialPort.setFlowControlMode(SerialPort.FLOWCONTROL_RTSCTS_IN |
SerialPort.FLOWCONTROL_RTSCTS_OUT);
serialPort.addEventListener(new PortReader(), SerialPort.MASK_RXCHAR);
serialPort.writeString("Get data");
}
catch (SerialPortException ex) {
System.out.println(ex);
}
}
private static class PortReader implements SerialPortEventListener {
@Override
public void serialEvent(SerialPortEvent event) {
if(event.isRXCHAR() && event.getEventValue() > 0){
try {
String data = serialPort.readString(event.getEventValue());
serialPort.writeString("Get data");
}
catch (SerialPortException ex) {
System.out.println(ex);
}
}
}
}
}
What are correct params for this kind of chips ?
Is there any datasheet for this kind of chips ?
Pooya Ziabakhsh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.