G
Guest
Hello,
I’m working with handheld device that communicates with windows service thru
the serial port.
Transaction between device and my application looks like this:
Handshaking:
Device sends ENQ
Service responds DLE 0
Device sends DLESOH4168840000SR01L01DLEETX4á
As you see at the end of the string, after DLE ETX (Data Link escape and end
of text) control codes, device sends two more characters 4á.
If I’m not mistaking, this would be the calculation of CRC checksum of this
string.
After each transaction, I need to calculate CRC and compare to the one that
device sends. Just to make sure that we didn’t miss any data.
I tried many different ways, but can’t come up with the correct algorithm to
get 4á on this string.
Is anybody can give me a hand on this one?
Thanks
I’m working with handheld device that communicates with windows service thru
the serial port.
Transaction between device and my application looks like this:
Handshaking:
Device sends ENQ
Service responds DLE 0
Device sends DLESOH4168840000SR01L01DLEETX4á
As you see at the end of the string, after DLE ETX (Data Link escape and end
of text) control codes, device sends two more characters 4á.
If I’m not mistaking, this would be the calculation of CRC checksum of this
string.
After each transaction, I need to calculate CRC and compare to the one that
device sends. Just to make sure that we didn’t miss any data.
I tried many different ways, but can’t come up with the correct algorithm to
get 4á on this string.
Is anybody can give me a hand on this one?
Thanks