Gemalto is now part of the Thales Group, find out more.

You are here

BGS5T CommConnection problems | Thales IoT Developer Community

mcs's picture
mcs

July 6, 2016 - 2:25pm, 1921 views

I have BGS5T firmware 01.100  A-REVISION 00.000.18

I set AT^SPOW=1,0,0 but I noticed that after ASC0 connection is opened it gets reset to
AT^SPOW=0,0,0 and I need to enter AT^SPOW=1,0,0 again to make ASC0 connection work.


But even then I am able to read InputStream from ASC0 but not able to write OutputStream.
No data comes out when I do os.write(...). I am using this basic example.

try {
      String strCOM = "comm:COM0;blocking=on;baudrate=115200;autocts=off;autorts=off";
      commConn = (CommConnection)Connector.open(strCOM);
      System.out.println("CommConnection(" + strCOM + ") opened");
      System.out.println("Real baud rate: " + commConn.getBaudRate());
      inStream  = commConn.openInputStream();
      outStream = commConn.openOutputStream();
      System.out.println("InputStream and OutputStream opened");
    } catch(IOException e) {
      System.out.println(e);
      notifyDestroyed();
    }

 try {
      int ch = -1;
      while(ch != 'Q') {
        ch = inStream.read();
        if (ch >= 0) {
          outStream.write(ch);
          System.out.print((char)ch);
        }
      }
    } catch(IOException e) {
      System.out.println(e);
    }

If you need help with programming gemalto BGS5, EHS6,ELS61, PLS61 you can hire us. We have completed lots of IoT projects with Gemalto and other devices.