EHS5T ASC1 Serial Output issues | Telit Cinterion IoT Developer Community
November 15, 2018 - 1:03pm, 1478 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/Pullmode","0"
^SCFG: "Call/Ecall/SessionTimeout","20000"
^SCFG: "Call/Ecall/StartTimeout","5000"
^SCFG: "Call/Speech/Codec","0"
^SCFG: "GPRS/AutoAttach","enabled"
^SCFG: "Gpio/mode/ASC1","std"
^SCFG: "Gpio/mode/DAI","gpio"
^SCFG: "Gpio/mode/DCD0","gpio"
^SCFG: "Gpio/mode/DSR0","gpio"
^SCFG: "Gpio/mode/DTR0","gpio"
^SCFG: "Gpio/mode/FSR","gpio"
^SCFG: "Gpio/mode/PULSE","gpio"
^SCFG: "Gpio/mode/PWM","gpio"
^SCFG: "Gpio/mode/RING0","gpio"
^SCFG: "Gpio/mode/SPI","rsv"
^SCFG: "Gpio/mode/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"); } }
Hello,
Seems that ASC1 interface is correctly enabled.
Please try to enable RTS/CTS flow control on ASC1 - autocts=on;autorts=on in the connection string.
Regards,
Bartłomiej
Hello,
Thanks for your reply.
I have a 3 wire interface, there is nothing i could connect autocts and -rts. Nevertheless, I tried it, but it didn't change anything.
Hello,
This idea was because RS485 is built in the terminal and the module has RS232 interface. So you have 3 wires of RS485 but inside RTS/CTS lines of the module may be needed.
I have figured out that RS485 should be connected to ASC0 and not ASC1 interface. Please try. RS485 usage is not described in the document in a straightforward way so that's why I didn't notice it before. And I didn't have any RS485 device to verify this. In case there still is a problem it may be needed to connect power to VCCref pin (allowed range is 1.8...5.5V), for example from +5Vout.
Best regards,
Bartłomiej