Page 5 of 5

Re: Inter-Display link protocol documented

PostPosted: Wed Aug 21, 2019 5:02 am
by GRT_Jeff
OAT is part of the EIS data if the OAT is connected to the EIS. It is not currently transferred otherwise.

Re: Inter-Display link protocol documented

PostPosted: Fri Sep 06, 2019 10:41 pm
by cofford
I've managed to get the ethernet link established with my HXr, but I can't seem to replicate the checksum or character stuffing. Can someone please explain how the checksum is calculated, and how character stuffing works in this case?

Thanks,
Casey

Re: Inter-Display link protocol documented

PostPosted: Fri Sep 06, 2019 11:23 pm
by MolsonB
Start of this post, Jeff talks about the char stuffing. Basically if you see 0x7D 0x5E then replace both hex bytes with 0x7E. If you see 0x7D 0x5D then replace both hex bytes with 0x7D. Do checksum after this step.

Are you using Arduino software? They have a library called FastCRC16 for checksum that does the processing and it's actually really quick. Compare the last two bytes

Code: Select all
  //Last two bytes are checksum   
  if (FastCRC16.x25(msg, len-2) == (uint16_t)(word(msg[len-1], msg[len-2]))) {
    EFISData.CrcValid++;
  }
  else {       
    EFISData.CrcError++;               //Crc do not match
    return;
  }

Re: Inter-Display link protocol documented

PostPosted: Sat Sep 07, 2019 6:52 pm
by cofford
Thanks for the info on the checksum...I've tried quite a few different methods and the CRC16.X25 was the info I was missing. I'm currently working in Python. I'm still a bit unclear on the character stuffing, but now that I know what the correct checksum is I should be able to figure it out.

Thanks again!

Code: Select all
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\Casey\Documents\Python Projects\GRT Ethernet> & C:/Users/Casey/AppData/Local/Programs/Python/Python37-32/python.exe "c:/Users/Casey/Documents/Python Projects/GRT Ethernet/UDPserver.py"
starting up UDP on 192.168.50.85 port 10001

waiting to receive UDP message
received 10 bytes from ('192.168.0.1', 10001)
b'[\x01\xff\n\x00\x01\x01\x94h\xa5'
sent 10 bytes back to ('192.168.0.1', 10001)
b'[\x01\xff\n\x00\x01\x00\x01\x94\x7f'
starting up TCP on 192.168.50.85 port 10001
waiting for a TCP connection
TCP connection from ('192.168.0.1', 47664)
received b'~[\x02\xff\t\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x90~'
sending data back to the client