Find Jobs
Hire Freelancers

Calculating LRC by XORing Data in a TCP/IP Client Server App

$30-100 USD

Ukończony
Opublikowano ponad 13 lat temu

$30-100 USD

Płatne przy odbiorze
Calculating LRC for communication in a TCP/IP application. ## Deliverables Below is the information I have on what needs to be done. I can already handle the and values as well as the data between them. I just don't know how to calculate LRC (**Linear Redundancy Check**) that needs to be sent back to the connected application. This is what the details say i need to do to calculate it: is calculated by XORing the first byte after the through the inclusive. Given this sample data, how do I calculate LRC based on above statement? Sample data: 1733300000199991440011174003102 or this sample: 37958000033999910600523259 I need a function that I can use to get the answer for LRC. **More Protocol Level Details: **All Packets sent between application A and application B will be wrapped in a Data Envelope to ensure correct processing and to provide protection against errors during transmission. The Data Envelope is described as follows: DATA Where is the ASCII value 0x02 is the ASCII value 0x03 DATA is the ASCII printable data contained in the packet is calculated by XORing the first byte after the through the inclusive. ------------ I am having trouble with this statement. is calculated by XORing the first byte after the through the inclusive I don't know if I should take the first byte and XOR with the remaining bits. Since I do know what the outcome should be that someone could help with the calculation. ------------- INCOMING MESSAGE: <02>37958000039999910600523259<03><04> MY RESPONSE MESSAGE: <02>459580000399999<03><00> 2010/12/28 10:43:08:448 - ERROR invalid LRC data $00<> calculated $3C LRC should be 3C by XORing incoming message somehow. ------------- This is how I am responding to the request. char stx = (char)2; char etx = (char)3; char lrc = (char)0; //should be calculated bytes = [login to view URL]([login to view URL]() + "459580000399999" + [login to view URL]() + [login to view URL]()); // Send back a response. [login to view URL](bytes, 0, [login to view URL]); -------------- It is possible and more likely now that I would need to calculate LRC for the message being sent back. The message sent is as follows. This should result in a LRC of 3C if this theory is correct. 459580000399999 with STX and ETX it would be <02>459580000399999<03> If this is the case then the incoming message LRC is <04> Any function that comes up with 04 for the incoming message will have it. INCOMING MESSAGE: <02>37958000039999910600523259<03><04> ## Platform Windows
Identyfikator projektu: 3000886

Informację o projekcie

3 ofert
Zdalny projekt
Aktywny 13 lat temu

Szukasz sposobu na zarobienie pieniędzy?

Korzyści ze składania ofert na Freelancer.com

Ustal budżet i ramy czasowe
Otrzymuj wynagrodzenie za swoją pracę
Przedstaw swoją propozycję
Rejestracja i składanie ofert jest bezpłatne
Przyznano:
Awatar Użytkownika
See private message.
$22,10 USD w 14 dni
4,2 (23 opinii)
4,1
4,1
3 freelancerzy składają oferty o średniej wysokości $15 USD dla tej pracy
Awatar Użytkownika
See private message.
$17 USD w 14 dni
5,0 (13 opinii)
4,3
4,3
Awatar Użytkownika
See private message.
$5,95 USD w 14 dni
5,0 (11 opinii)
3,2
3,2

O kliencie

Flaga UNITED STATES
Aurora, United States
5,0
24
Zweryfikowana metoda płatności
Członek od wrz 13, 2004

Weryfikacja Klienta

Dziękujemy! Przesłaliśmy Ci e-mailem link do odebrania darmowego bonusu.
Coś poszło nie tak podczas wysyłania wiadomości e-mail. Proszę spróbować ponownie.
Zarejestrowani Użytkownicy Całkowita Liczba Opublikowanych Projektów
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Wczytywanie podglądu
Udzielono pozwolenia na Geolokalizację.
Twoja sesja logowania wygasła i zostałeś wylogowany. Proszę, zalogować się ponownie.