0

I'm using jssc to communicate with equipment.
In Windows and Linux the program was ok but I had a problem with virus and i format my pc then the program don't work with Windows but with Linux the program works fine.
I don't know why the program stopped working.
The program code is:

    try {
        command = new String(commandSend);
        serialPort.writeBytes(command.getBytes());
        logger.info("Sending to port " + a.getPort() + " " + command);
        Thread.sleep(1000);//Wait 0.8 seconds

        retorno = serialPort.readString();
    } catch (Exception e) {
        logger.error("Problems with send/receive command with the analyzer");
        logger.error(e.getMessage());
        logger.error(e.toString());
        e.printStackTrace();
    }
Anirudh Sharma
  • 7,968
  • 13
  • 40
  • 42
Pablo Aleman
  • 196
  • 1
  • 3
  • 13
  • Maybe you could search where the code stops and then edit your question – lrleon Oct 23 '15 at 04:01
  • Sure, the problem is in Linux serialPort.readString() return normally but in Windows returns null, it's very confusing the program works fine until I format my pc then teh program don't work – Pablo Aleman Oct 23 '15 at 14:30

1 Answers1

0

After formatting your PC, please install driver for your UART IC.

samuel05051980
  • 369
  • 2
  • 2