0

I'm trying to use UART serial communication with MicroEj in STM32F7 using java, and I've got exception throw opening the Com Port. Here is the simple code to open a connection:

private static final String CONNECTION_STRING = "comm:com42;baudrate=9600;bitsperchar=8;stopbits=1;parity=none";
try {
    CommConnection comm = (CommConnection) Connector.open(CONNECTION_STRING);
} catch (IOException e1) {
    e1.printStackTrace();
}

And here is the exception:

java.io.IOException: ECOM-COMM: Invalid connection descriptor.

I think there might be some problems with the CONNECTION_STRING but I couldn't find any examples. anyone can help me?

Suhas Bachhav
  • 403
  • 1
  • 7
  • 28
A. Beigi
  • 3
  • 3

1 Answers1

0

Try with com51.

You can find the correct value in launch parameters/Configuration tab/Libraries/ECOM/Comm Connection

Erwan
  • 16