PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → CheckSum
CheckSum
Débuté par Mark Richardson, 14 fév. 2015 00:58 - 4 réponses
Posté le 14 février 2015 - 00:58
I'm trying to communicate with a Ingenico Eftpos machine.
I'm having trouble getting the checksum of a string of hex charaters

Below works

// String to write into the port
StringToWrite is string = HexaToBuffer("0249034A")

02 Start of text
49 The letter I to initialize eftpost machine (Login)
03 End Of Text
4A the checksum of 02 49 03




But I need to work the checksum out in my code not just hard code it as I need to send different types of request all with diff checksums.

Has anyone done this? and could pass the code to me or point me in the right direction.

PS I'm new to WinDev

Thanks in advance...

Mark
Posté le 14 février 2015 - 20:24
Hello Mark

First, are you suppose to send the checksum of the hexa representation
or of the binary values?

Second, what type of checksum?

Anyway, the regular way of calculation checksums in windev is with the
hashstring function (with a parameter of one the checksum types)

You will have to experiment from there

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 2/13/2015 6:58 PM, Mark Richardson wrote:
I'm trying to communicate with a Ingenico Eftpos machine. I'm having
trouble getting the checksum of a string of hex charaters

Below works

// String to write into the port
StringToWrite is string = HexaToBuffer("0249034A")
02 Start of text
49 The letter I to initialize eftpost machine (Login)
03 End Of Text
4A the checksum of 02 49 03




But I need to work the checksum out in my code not just hard code it as
I need to send different types of request all with diff checksums.

Has anyone done this? and could pass the code to me or point me in the
right direction.

PS I'm new to WinDev

Thanks in advance...

Mark
Posté le 15 février 2015 - 21:01
LRC checksum = Longitudinal redundancy check.

Thanks
Membre enregistré
392 messages
Popularité : +12 (12 votes)
Posté le 15 février 2015 - 23:53
Hi... Google is your friend, wikipedia is your friend ... a little bit of work translation, and it is fixed ...

Have fun !

http://en.wikipedia.org/wiki/Longitudinal_redundancy_check

--
If it works, don't touch it, don't look at it, AND don't fix it ! No patches, no SP ! JUST DONT FIX IT.
Posté le 01 janvier 2019 - 09:14
Hi Mark,
did you resolve this issue?
If so please let me know how you accomplished it.
I've managed to calculate the LRC but it doesn't seem to work for all the strings.
Regards

Zunaid