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

You are here

EHS6T CSD Data connection problem - corrupted mesages received in Java | Thales IoT Developer Community

November 26, 2016 - 6:08pm, 2512 views

Hello.

We have production system that uses CSD dial-up connection to send commands from desktop PC program to java terminals. Originally, we used TC65i termanals and all worked fine, and i've never seen that data received was corrupted, but recently we switched to the EH6T and problems revealed. EH6T Terminal receives commands with missed and replaced symbols and communication fails. 

Out software is rather complex, so i created very simple program that receives data and prints it to the serial out, byte by byte. You can see full source code here: https://gitlab.com/Grigoriy/ehs6t_test/tree/master

Main part that receives data is simle as:

 while (true) {
                    int bytesAvailable = dataIn.available();
                    
                    while (bytesAvailable > 0) {
                        char ch = (char) dataIn.read();
                        System.out.print(ch);
                        bytesAvailable--;
                    }
                } 

Then I tested this example sending packets of some strings like '1111122222333335555566666777778888899999' repeated several *****. I've done 10 cycles of connect - send 1000 bytes - restart terminal and in ALL attempts data was corrupted. I've noticed that corrupted symbols are located in the same place every time - near 140 - 160 symbols after connection start. You can see this on attached screenshots.

correct data:

correct

error example:

corrupted data example

another example:

corrupted data example 2

My question is what can be the reason of such data **********? It seems like bug in java implementation  - in my code (please any suggestions about what i should correct) or in internal EHS6T firmware. My EHS6T version is 

ATI1

Cinterion

EHS6

REVISION 03.001

A-REVISION 00.000.42

On the other side (to send data from PC) I use old but trustworthy Siemens TC35i.

Also i should notice that it is not looks like data ********** somethere in CSD protocol itself, because when i repeat same tests without java program, controlling EHS6T by external AT commands, data get never corrupted