Sending serial data via USB to ASC1 GPIO Port in JAVA - EHS6T | Telit Cinterion IoT Developer Community
November 15, 2019 - 1:41am, 2415 views
Hi ,
I'm currently testing a Java program on my EHS6T to receive serial data through the ASC1 on GPIO port (using Weidmuller connector head). Described is connections and configuration and program parameters below.
Hardware Setup
1. I have a PC USB cable connected to an FTDI chip. The FTDI chip has GND, RXD, and TXD jumper leads connected which are directly connected to the corresponding pins on the Terminal's GPIO port.
2. COM15 is my PC serial port's USB to the Gemalto GPIO.
3. The USB B cable is connected to EHS6T usb port. (COM28, COM27 etc..).
Software Setup
1. Java SE program on PC which is sending a serial string down COM15 with connection 115200, 8, N, 1, NONE.
2. Java ME program is written to read from the InStream port, with connection string
"comm:COM1;blocking=off;baudrate=115200;bitsperchar=8;parity=none;stopbits=1;autocts=on;autorts=on"
3. Configurations on SCFG as follows:
- AT Sleep **** is AT^SPOW=1,0,0
- ASC1 is set to "std"
- Serial / Interface is 1,1,1
- StdOut is set to USB1.
- Debugging is set to on.
Pastebin link to JAVA ME serial Input reading
Pastebin link to JAVA SE serial output data
THE PROBLEM
As I run the Midlet program so it awaits incoming serial data, the open terminal showing Midlet standard output is not showing the serial data being sent through to ASC1's COM 1 port.
It is not reading and displaying the incoming serial data via its InStream.
I will pastebin and show you my both programs.
Is anyone able to advise from seeing my work what I am possibly getting wrong in cofigurations and code?
Thanks and thank you for your time and constant support.
Nick,
Hello,
Please check first if you can execute AT commands from the terminal program on your PC over ASC1 interface while the MIDlet is not running.
If not please make sure if the lines are connected appropriately. See the note below:
"Java Terminals are designed for use as a DCE. Based on the conventions for DCE-DTE connections
they communicate with the customer application (DTE) using the following signals:
• Port TXD @ application sends data to Java Terminal’s TXD1 signal line
• Port RXD @ application receives data from the Java Terminal’s RXD1 signal line"
Did you connect RTS and CTS lines? In your Java MIDlet you use the hardware flow control.
If AT commands work you can try to start the MIDlet and at first send data via the same terminal program manually.
Regards,
Bartłomiej
Hi,
Yes, I successfully got it working after connecting the RTS and CTS lines with a jumper wire.
Thanks and cheers.
Great!