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

You are here

EHS5T ASC1 Serial Output issues | Thales IoT Developer Community

November 15, 2018 - 1:03pm, 1143 views

Hello, 

I am trying to control a display via ASC1. I am using a EHS5T RS485 Terminal.
No matter what I try, the diesplay does not react and the oscilloscope doesnt show any lvl changes/output on the ports. 

Terminal Configuration:

at^scfg?

^SCFG: "Audio/Loop","0"

^SCFG: "Call/ECC","0"

^SCFG: "Call/Ecall/AckTimeout","5000"

^SCFG: "Call/Ecall/Callback","0"

^SCFG: "Call/Ecall/CallbackTimeout","43200000"

^SCFG: "Call/Ecall/Msd","0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"

^SCFG: "Call/Ecall/Pull****","0"

^SCFG: "Call/Ecall/SessionTimeout","20000"

^SCFG: "Call/Ecall/StartTimeout","5000"

^SCFG: "Call/Speech/Codec","0"

^SCFG: "GPRS/AutoAttach","enabled"

^SCFG: "Gpio/****/ASC1","std"

^SCFG: "Gpio/****/DAI","gpio"

^SCFG: "Gpio/****/DCD0","gpio"

^SCFG: "Gpio/****/DSR0","gpio"

^SCFG: "Gpio/****/DTR0","gpio"

^SCFG: "Gpio/****/FSR","gpio"

^SCFG: "Gpio/****/PULSE","gpio"

^SCFG: "Gpio/****/PWM","gpio"

^SCFG: "Gpio/****/RING0","gpio"

^SCFG: "Gpio/****/SPI","rsv"

^SCFG: "Gpio/****/SYNC","std"

^SCFG: "Ident/Manufacturer","Cinterion"

^SCFG: "Ident/Product","EHS5-E"

^SCFG: "MEShutdown/Fso","0"

^SCFG: "MEShutdown/sVsup/threshold","0","0"

^SCFG: "MEopMode/CFUN","0","1"

^SCFG: "MEopMode/Comp1",""

^SCFG: "MEopMode/Dormancy","0","0"

^SCFG: "MEopMode/ExpectDTR","current"

^SCFG: "MEopMode/ExpectDTR","powerup"

^SCFG: "MEopMode/SoR","off"

^SCFG: "Radio/Band","147"

^SCFG: "Radio/Mtpl","0"

^SCFG: "Radio/OutputPowerReduction","4"

^SCFG: "Serial/Interface/Allocation","1","1"

^SCFG: "Serial/USB/DDD","0","0","0409","1E2D","0058","Cinterion Wireless Modules","EHx",""

^SCFG: "Tcp/IRT","3"

^SCFG: "Tcp/MR","10"

^SCFG: "Tcp/OT","6000"

^SCFG: "Tcp/WithURCs","on"

^SCFG: "Trace/Syslog/OTAP","0"

^SCFG: "URC/Ringline","local"

^SCFG: "URC/Ringline/ActiveTime","2"

^SCFG: "Userware/Autostart","1"

^SCFG: "Userware/Autostart/Delay","0"

^SCFG: "Userware/DebugInterface","0.0.0.0","0.0.0.0","0"

^SCFG: "Userware/DebugMode","on"

^SCFG: "Userware/Passwd",

^SCFG: "Userware/Stdout","null",,,,"off"

^SCFG: "Userware/Watchdog","1"

//------------------------------------

at^spow?

^SPOW: 1,0,0

//-----------------------------------

I've tried a few ways but the terminals (I have two of them) do not show any reaction.

anyone out here wo could probably help? =)

here is my code

 import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import javax.microedition.io.CommConnection;
import javax.microedition.io.Connector;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class LCD_TEST_NEW extends MIDlet {

	public LCD_TEST_NEW() {
		// Default constructor
	}
	
	
	CommConnection commConn;
	InputStream     inStream;
	OutputStream    outStream;

 	protected void destroyApp(boolean unconditional) throws                                                                                                       MIDletStateChangeException {
		// this method should always be the exit point of the application
		// if any resources need to be released, the released methods should be
		// invoked here
		System.out.println("destroyApp()");

		// this method informes Java Virtual Machine that all users activities
		// were done, and the app may be closed; this method should be infoked
		// only from this place
		notifyDestroyed();
	}

	protected void pauseApp() {
		// this method is not used in the M2M applications

	}

	protected void startApp() throws MIDletStateChangeException {

		// the system out works like in Java SE, providing access to one of
		// available outputs (ASC0, ASC1 or USB)
		System.out.println("startApp()");
		try {
			lcd_init();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		
		try {
			lcd_init();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		// custom code should be put here
		// this part may just invoke some actions and quit JVM or start some
		// threads and exit without terminating, so the living threads will
		// still processing

		// this invokation is optional and may be invoked from any place in the
		// code
		// it should be used as an ony exit point of the application
		destroyApp(true);
	}
	
	
	public void lcd_init() throws IOException
	{
		
	System.out.println("RS232Demo: Constructor");
    System.out.println("Available COM-Ports: " + System.getProperty("microedition.commports"));
    
    try 
    {
    	/*System.out.println("sleep");
		
		try {
			Thread.sleep(30000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
    	String strCOM = "comm:COM1;baudrate=115200;bitsperchar=8;stopbits=1;parity=none;blocking=off;autocts=off;autorts=off"; //Verbindungseinstellungen für die Serielle Schnittstelle
    	
    	commConn = (CommConnection)Connector.open(strCOM);
		inStream = commConn.openInputStream();
		outStream = commConn.openOutputStream();

		
		/*System.out.println("sleep");
		
		try {
			Thread.sleep(20000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
		//byte[] b = new byte[64];
		//int iwas = inStream.read(b);
		int iwas = inStream.available();
		System.out.println("initial1");
		byte[] initial1 = {0x0C,0x1E,'T',1};
		outStream.write(initial1, 0, initial1.length);
		
		}*/
		outStream.flush();
		
		System.out.println("sleep");
		try {
			Thread.sleep(20000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		
		int iwas2 = inStream.available();
		byte[] initial2 = {0x1E,'H',15,'T',1};
		outStream.write(initial2, 0, initial2.length);
		outStream.flush();
		
		System.out.println("response laenge" +iwas);
		System.out.println("response laenge nach flush" +iwas2);
		/*String initial2 = "0x1EH150x1EC1";
		outStream.write(initial2.getBytes(), 0, initial2.length());
		outStream.flush();*/
    }
    catch(java.io.IOException e)
    {
    	System.out.println(e.getMessage());
    }
	}
	
	
	public void lcd_test() throws IOException{
		byte[] initial1 = {0x0C,0x1E,0X48,0x08,0x1E,0x4B,0x0C};
			outStream.write(initial1, 0, initial1.length);
			outStream.flush();
			System.out.println("testmethode erreicht");
		}
	
	
	
}