Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRC algorithm #21

Open
matrixmonster11 opened this issue Feb 2, 2023 · 0 comments
Open

CRC algorithm #21

matrixmonster11 opened this issue Feb 2, 2023 · 0 comments

Comments

@matrixmonster11
Copy link

I am able to connect to the rfid device ( chafon CF-RU5306 ), I can also send CMDS successfully which already pre-written in demo code ( Nodejs ) , but the issue I am having now is generating the CRC based on Buffer data. Would it be possible to share the also that you worked with please. Here the manual example which I could not replicate in javascript after many tries.
unsigned char CheckSum(unsigned char *uBuff, unsigned short iBuffLen)
{
unsigned char uSum=0;
unsigned short i = 0;
for(i=0;i< iBuffLen;i++)
{
uSum = uSum + uBuff[i];
}
uSum = (~uSum) + 1;
return uSum;
}
Manual reference https://drive.google.com/drive/folders/1GOMv5qGVvhCxKYK_7vSQAX9fz6ssXskk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant