Problem with simulator and ECOM-COMM


#1

Hello,

I try to communicate with the port com of my computer through the simulator with the platform: VDE-YELLOW-STM32F746GDISCO-8SG7V (1.11.4)

My code works fine when I configure the simulaton type ‘UART <-> FILE’ but If I configure ‘UART<->UART’ or even ‘UART<->SOCKET’ then the error below will happen.

Do you have any idea?
Thank you

Exception in thread “main” java.io.IOException: ECOM-COMM: Invalid connection descriptor.
at java.lang.Throwable.fillInStackTrace(Throwable.java:79)
at java.lang.Throwable.(Throwable.java:30)
at java.lang.Exception.(Exception.java:10)
at java.io.IOException.(IOException.java:16)
at ej.ecom.connection.comm.CommConnectionCreator.open(CommConnectionCreator.java:290)
at ej.ecom.connection.comm.ConnectionFactory.open(ConnectionFactory.java:24)
at ej.ecom.io.Connector.open(Connector.java:81)
at ej.ecom.io.Connector.open(Connector.java:47)
at com.ubiant.Uart.openConnection(Uart.java:65)
at com.ubiant.Uart.launch(Uart.java:37)
at com.ubiant.Launcher.uart(Launcher.java:21)
at com.ubiant.Launcher.main(Launcher.java:14)
at java.lang.MainThread.run(Thread.java:836)
at java.lang.Thread.runWrapper(Thread.java:372)
=============== [ Completed Successfully ] ===============


#2

Sorry, I think that I had no checked all boxes in the simulator configurator…
But now it works!


#3

Glad to hear it! :slight_smile:


#4

But I have a problem to set the baudrate :grin:.

What is the url format to set the baudrate?
Because with “comm:com6;baudrate:57600” I have an exception: “Exception in thread “main” java.io.IOException: ECOM-COMM: This option cannot be parsed: baudrate:57600”
(The URL “comm:com6” works)

Could you please give the right format?

Thank you


#5

Yeap,

The specification of the connector descriptor string is derived of the old MDPI CommConnection class [1]. So the right connection string for you would be:
comm:com6;baudrate=57600

Gaëtan

[1] https://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/javax/microedition/io/CommConnection.html especially the BNF Format for Connector.open() string part


#6

Perfect, it works!
Thank you