EHS5T ASC0 and ASC1 ports | Telit Cinterion IoT Developer Community
September 25, 2019 - 10:47am, 2534 views
Hi,
I would like to use RS485 and RS232 ports with Java programming for EHS5T terminal.
Is it possible to do this?
As I understand it;
ASC0 (COM0) corresponds to RS485 on GPIO,
ASC1 (COM1) corresponds to RS232 on GPIO.
When testing with Java code, I found that the COM1 port does not exist.
System.getProperty ( "microedition.commports")
I have made the following settings and can now open the COM1 port.
^ SCFG: "Gpio / mode / ASC1", "std"
^ SCFG: "Serial / Interface / Allocation", "1", "1"
(I turned off power saving mode)
When I plug the "USB/RS232 Converter" to my computer and Terminal RS232 port and test with RS232Demo project, I cannot see data communication over COM1
Where could I have done wrong?
Hello,
So after the configuration change you can now see COM1 in Java - that's good. You have probably noticed that RS232Demo communicates on COM0 by default and changed it to COM1. Anyway I'd recommend you to first check if you can execute AT commands ober ASC1 before testing with Java.
For ASC1 it is also necessary to connect power to VCCref pin.
Please also make sure that you have connected the transmission lines correctly. The module is designed as a DCE device. Based on the conventions for DCE-DTE connections it communicates with the customer application (DTE) using the following signals:
• Port TXD - application sends data to module’s TXD1 signal line
• Port RXD - application receives data from the module’s RXD1 signal line
Best regards,
Bartłomiej
Hi,
Thank you for the quick return.
As you mentioned, I set com port to 1 in RS232 demo project.
String strCOM = "comm:COM1;baudrate=115200;bitsperchar=8;parity=none;stopbits=1;blocking=off;autocts=off;autorts=off";
AT command via ASC1 not work.
Can I connect pin 7 (+ 5Vout) to energize the VCCref pin?
Note: When I connect TXD1 and RXD1 on the terminal, I can see from the debug that the data sent and received is the same (Echo can be done).
When I send a 'K' character to the serial line after energizing the VCCref pin as I mentioned above, this data is '?' character.
The code block I tested is at the bottom.
try {
int ch = -1;
while(ch != 'Q') {
outStream.write('K');
System.out.println("K Character Sended! Waiting 1 second!");
Thread.sleep(1000);
int numberOfBytesToRead2 = inStream.available();
if (numberOfBytesToRead2 > 0) {
ch = inStream.read();
if (ch >= 0) {
System.out.println((char)ch + " Character Received! and sended");
outStream.write(ch);
}
} else {
System.out.println("Not Received! inStream.available() = 0");
}
Thread.sleep(100);
}
} catch(Exception e) {
System.out.println(e);
}
The configuration of my EHS5T is as follows.
^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","gpio"
^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","0"
Hello,
The voltage depends that you need to connect depends on the voltage logic level of the interface that ou connect to the terminal. If it's 5V you can use +5Vout pin (the allowed range is 1.8-5.5V). You should start with AT commands and try the application after you can execute AT commands. Please make sure that lines are connected correctly.
Regards,
Bartłomiej
Does this mean that I cannot connect via RS232 if the voltage level is 0 - 12 volts on the "USB / RS232 converter device"?
You'd need a level shifter.