0

We are integrating JDE-Edwards ERP to POS terminal using the Java integration Code but when I tried to send the transaction initiate request to the POS terminal it is working sometimes fine and sometimes I am getting the negative acknowledgment from the POS.B ut the request which I am sending is same in both scenario. I am unable to figure out where is the problem. I have taken the low-level traces of com port communication using the Eltima software but there is no difference. Here the POS terminal which I am using is HyperComm T4230

I have tested my same code VX520 Pos terminal it is working fine and it is not working on this terminal.

Request I am sending it while initiating the transaction.

static byte[] sendData =
    { 0x02, 'P', 'U', 'R', 0x1c, '1', '0', 0x1c, '9', '9', 0x1c, '0', '0', '0',
      '0', '0', '0', '0', '0', '0', '1', '0', '0', 0x1C, '6', '3', '4', 0x1C,
      ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',
      ' ', ' ', ' ', ' ', ' ', ' ', ' ', 0x1C, ' ', ' ', ' ', ' ', 0x1C, ' ',
      ' ', ' ', ' ', ' ', ' ', 0x1C, ' ', ' ', ' ', 0x1C, 0x03 };

I am expecting it should not be stuck while the user initiated the transaction from the JDE ERP.

Stefan Becker
  • 5,695
  • 9
  • 20
  • 30
Anand
  • 1
  • 3
  • Do you have the same Baudrate, Stopbit, Startbit, Databit, and Parity configuration on both devices? – B.Letz Aug 07 '19 at 07:17
  • Yes same configuration on both devices. – Anand Aug 07 '19 at 07:20
  • can you give a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)? – B.Letz Aug 07 '19 at 13:40
  • I am getting null value in outputstream.getstream() why i dont know but in run method previously i was checking flag now i have removed . – Anand Aug 10 '19 at 08:08
  • public void run() { // first thing in the thread, we initialize the write operation initwritetoport(); try { //while (flag) { // write string to port, the serialEvent will read it writetoport(); } – Anand Aug 10 '19 at 08:10
  • We are trying on different machine same code it is working on VX520 and T4230 is not working and we need to test it now on Spire c5 Pos terminal could you please help me to understand the difference as the message structure is same why it is giving the issue. – Anand Aug 10 '19 at 08:12
  • @Anand One possibility is that you have different flow control settings on both ends. Some terminals may be configured to have it off, and with these you have problems with, HW flow control may be the problem (with HW flow control I would inspect cables as well). AFAIR Hypercom T42 had one full port (with HW flow control lines) and the other was just RX/TX. The other thing is that I see your frame having STX and ETX but I cannot see any LRC (I don't know if the protocol requires one, but I would assume so). Do you calculate and send it? – Michal Gluchowski Aug 13 '19 at 11:36
  • @MichalGluchowski ,I had word with vendor regaarding LRC he is teeling that LRC is not required. and regarding flow control could you please elaborate. – Anand Aug 20 '19 at 06:19
  • @Anand Simply said, hardware flow control in RS232 is using two additional lines in serial cable to indicate when a side of communication is ready to receive data (when it is listening). You could probably find more on wikipedia and such about how RS232 and flow control work, but what is the most important, both communicating sides need to have their RS232 ports configured the same. – Michal Gluchowski Aug 20 '19 at 08:12
  • @MichalGluchowski Thanks for the clarification i will check this thing – Anand Aug 27 '19 at 01:52

0 Answers0