Thales' cellular IoT products business is now part of Telit Cinterion, find out more.

You are here

Telit Cinterion IoT Developer Community

BGS5: Fix RS232Demo ConnectionNotFoundException error

Tutorial, January 16, 2017 - 8:35am, 4581 views

After installed Java CD, one could find there are 6 demo projects included, RS232Demo is one of them.

If you are using BGS5 for Java development, and happened to run RS232Demo project,  you'll find the following error message from the console:

 RS232Demo: Constructor
 Available COM-Ports: COM0,USB0 com0 port not found!
 MIDlet:RS232Demo.RS232Demo exited 

For this case, actually the 2nd line of debug message already gives you hint of solution

 Available COM-Ports: COM0,USB0 

It’s the output of

 System.out.println("Available COM-Ports: " + System.getProperty("microedition.commports")); 

My advice is changing the strCOM, replacing the port identifier “com0” from lower case to “COM0”, this will fix the issue:

     try {
      String strCOM = "comm:COM0;blocking=on;baudrate=115200";


antonyshen's picture