Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #29863 > unrolled thread

Need Help with CRC16

Started byMiguel Angel Palos M <miguel.palos@gmail.com>
First post2020-07-27 12:54 -0700
Last post2020-07-31 17:24 -0700
Articles 16 — 6 participants

Back to article view | Back to comp.arch.embedded


Contents

  Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-27 12:54 -0700
    Re: Need Help with CRC16 Rick C <gnuarm.deletethisbit@gmail.com> - 2020-07-27 18:45 -0700
      Re: Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-27 18:57 -0700
        Re: Need Help with CRC16 David Brown <david.brown@hesbynett.no> - 2020-07-28 09:09 +0200
    Re: Need Help with CRC16 Don Y <blockedofcourse@foo.invalid> - 2020-07-28 01:00 -0700
      Re: Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-29 16:46 -0700
        Re: Need Help with CRC16 Rick C <gnuarm.deletethisbit@gmail.com> - 2020-07-29 17:38 -0700
        Re: Need Help with CRC16 Don Y <blockedofcourse@foo.invalid> - 2020-07-29 22:27 -0700
        Re: Need Help with CRC16 Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2020-07-30 11:15 +0300
        Re: Need Help with CRC16 Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2020-07-30 11:15 +0300
          Re: Need Help with CRC16 Don Y <blockedofcourse@foo.invalid> - 2020-07-30 02:41 -0700
            Re: Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-30 06:46 -0700
              Re: Need Help with CRC16 Don Y <blockedofcourse@foo.invalid> - 2020-07-30 07:00 -0700
          Re: Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-30 06:40 -0700
            Re: Need Help with CRC16 Miguel Angel Palos M <miguel.palos@gmail.com> - 2020-07-30 06:48 -0700
    Re: Need Help with CRC16 jgh@mdfs.net - 2020-07-31 17:24 -0700

#29863 — Need Help with CRC16

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-27 12:54 -0700
SubjectNeed Help with CRC16
Message-ID<7c987845-f06c-4375-812b-7adc6a498cf5n@googlegroups.com>
Hi good day; I want to see the possibility that if someone can help me generate a crc calculator from txt files, I have a text file, and the result of the crc by which it must be submitted I already have, but I don't know how to get to He actually has several files to do the test, but I couldn't get to those results; Can someone help me?

[toc] | [next] | [standalone]


#29864

FromRick C <gnuarm.deletethisbit@gmail.com>
Date2020-07-27 18:45 -0700
Message-ID<c94afcb2-1368-4e24-9da6-025f77b53c26o@googlegroups.com>
In reply to#29863
On Monday, July 27, 2020 at 3:55:00 PM UTC-4, Miguel Angel Palos M wrote:
> Hi good day; I want to see the possibility that if someone can help me generate a crc calculator from txt files, I have a text file, and the result of the crc by which it must be submitted I already have, but I don't know how to get to He actually has several files to do the test, but I couldn't get to those results; Can someone help me?

What is in the text file, the data you need to calculate the CRC16 on?  

Are you coding this in some particular language?  Can you give us some details? 

-- 

  Rick C.

  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209

[toc] | [prev] | [next] | [standalone]


#29865

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-27 18:57 -0700
Message-ID<22934a9c-5d81-43b6-8d5f-e429a62d6b0fn@googlegroups.com>
In reply to#29864
El lunes, 27 de julio de 2020 a las 20:45:25 UTC-5, Rick C escribió:
> On Monday, July 27, 2020 at 3:55:00 PM UTC-4, Miguel Angel Palos M wrote: 
> > Hi good day; I want to see the possibility that if someone can help me generate a crc calculator from txt files, I have a text file, and the result of the crc by which it must be submitted I already have, but I don't know how to get to He actually has several files to do the test, but I couldn't get to those results; Can someone help me?
> What is in the text file, the data you need to calculate the CRC16 on? 
> 
> Are you coding this in some particular language? Can you give us some details? 
> 
> -- 
> 
> Rick C. 
> 
> - Get 1,000 miles of free Supercharging 
> - Tesla referral code - https://ts.la/richard11209






Sure, the File is attached; I have a program that checks the value of the crc that is in the first line against the crc that gives the checksum of the file; so my purpose is to figure out how to modify the file and obviously put the new crc on the first line.

I do not know if I explained well?


--------------------Filetext begins-----------
E48D
8
   1
   1
   1
   400
8888
TH86
    9 
    8 
    7 
    6 
    3 
    2 
    1 
    0 
0
0
 0 0 0 0 0 0 0 0 0 0
 0 0 1 1 1 1 0 0 0 0
100
0
0
0
1
0
1
0 0 0 0 0 0
0
2
0
1
1
2
2
2 4
4 4
3
   120 
	6	1	20 
	1	55 
	200	1	999 
	1	999 
	0	0	0 
	0	0 
	300	1	999 
	1	999 
	0	0	0 
	0	0 
	3000	1	9000 
	1	9999 
	0	0	0 
	0	0 
	0	0	0 
	0	0 
	200	20	999 
	1	999 
	200	20	999 
	1	999 
	300	1	999 
	1	999 
	0	0	0 
	0	0 
	200	1	999 
	1	999 
	200	1	999 
	1	999 
654
        FALSE 
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
       TRUE 
  5 
    FIXED     XRAYS    1  500  400    0    0    NA    0  500
33   33   33   33   654  250  250 
    FIXED     XRAYS    1  100   80    0    0    NA    0  100
33   33   33   33   654  250  250 
    FIXED     XRAYS    1  100   80    0    0    NA    0  100
33   33   33   33   654  250  250 
      ARC     XRAYS    1  180   96 1800 2700    NA    0  180
33   33   33   33   654  100  100 
      ARC     XRAYS    1   90   53 2700 1800    NA    0   90
33   33   33   33   654  100  100 
--------------------------file text end-----------------------------

[toc] | [prev] | [next] | [standalone]


#29866

FromDavid Brown <david.brown@hesbynett.no>
Date2020-07-28 09:09 +0200
Message-ID<rfoiup$beh$1@dont-email.me>
In reply to#29865
On 28/07/2020 03:57, Miguel Angel Palos M wrote:
> El lunes, 27 de julio de 2020 a las 20:45:25 UTC-5, Rick C escribió:
>> On Monday, July 27, 2020 at 3:55:00 PM UTC-4, Miguel Angel Palos M
>> wrote:
>>> Hi good day; I want to see the possibility that if someone can
>>> help me generate a crc calculator from txt files, I have a text
>>> file, and the result of the crc by which it must be submitted I
>>> already have, but I don't know how to get to He actually has
>>> several files to do the test, but I couldn't get to those
>>> results; Can someone help me?
>> What is in the text file, the data you need to calculate the CRC16
>> on?
>> 
>> Are you coding this in some particular language? Can you give us
>> some details?
>> 
>> --
>> 
>> Rick C.
>> 
>> - Get 1,000 miles of free Supercharging - Tesla referral code -
>> https://ts.la/richard11209
> 
> 
> 
> 
> 
> 
> Sure, the File is attached; I have a program that checks the value of
> the crc that is in the first line against the crc that gives the
> checksum of the file; so my purpose is to figure out how to modify
> the file and obviously put the new crc on the first line.
> 
> I do not know if I explained well?
> 
> 

Do you have any documentation or information about the file format or
the way the CRC is calculated?

As I see it, there are two key challenges.  First, there are a large
number of variations as to what "CRC16" could mean.  The Wikipedia
article can give you some idea - there are lots of suitable polynomials
for 16-bit CRC's, you can have any starting value, there can be bit
reversals, byte reversals, and other variations.

<https://en.wikipedia.org/wiki/Cyclic_redundancy_check>

The biggest question, I think, is knowing what part of the file the CRC
is run over, and in what way.  Obviously the first line is not part of
the checksummed data, since it contains the CRC.  Which other parts are
omitted?  Are the numbers used directly as 16-bit values?  Are ASCII
characters used as the data?  Is white space skipped or included?  Line
endings?

No one here can tell you (unless someone happens to recognize the file
format).  Trying to figure out the variation used by guesswork and trial
and error is going to be a lot of effort.

[toc] | [prev] | [next] | [standalone]


#29867

FromDon Y <blockedofcourse@foo.invalid>
Date2020-07-28 01:00 -0700
Message-ID<rfom00$rdg$1@dont-email.me>
In reply to#29863
On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote:
> Hi good day; I want to see the possibility that if someone can help me
> generate a crc calculator from txt files, I have a text file, and the result
> of the crc by which it must be submitted I already have, but I don't know
> how to get to He actually has several files to do the test, but I couldn't
> get to those results; Can someone help me?

Why don't you ask "him" for clarification?

[toc] | [prev] | [next] | [standalone]


#29879

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-29 16:46 -0700
Message-ID<f22a7305-ba4e-4a1a-bb24-bd7a62840541n@googlegroups.com>
In reply to#29867
El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió:
> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote: 
> > Hi good day; I want to see the possibility that if someone can help me 
> > generate a crc calculator from txt files, I have a text file, and the result 
> > of the crc by which it must be submitted I already have, but I don't know 
> > how to get to He actually has several files to do the test, but I couldn't 
> > get to those results; Can someone help me?
> Why don't you ask "him" for clarification?


To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc?

[toc] | [prev] | [next] | [standalone]


#29883

FromRick C <gnuarm.deletethisbit@gmail.com>
Date2020-07-29 17:38 -0700
Message-ID<e4ba391c-fae6-4c0e-987d-34ba5cfcbe3ao@googlegroups.com>
In reply to#29879
On Wednesday, July 29, 2020 at 7:46:30 PM UTC-4, Miguel Angel Palos M wrote:
> El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió:
> > On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote: 
> > > Hi good day; I want to see the possibility that if someone can help me 
> > > generate a crc calculator from txt files, I have a text file, and the result 
> > > of the crc by which it must be submitted I already have, but I don't know 
> > > how to get to He actually has several files to do the test, but I couldn't 
> > > get to those results; Can someone help me?
> > Why don't you ask "him" for clarification?
> 
> 
> To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc?

I thought that was all you needed??? 

-- 

  Rick C.

  -++ Get 1,000 miles of free Supercharging
  -++ Tesla referral code - https://ts.la/richard11209

[toc] | [prev] | [next] | [standalone]


#29888

FromDon Y <blockedofcourse@foo.invalid>
Date2020-07-29 22:27 -0700
Message-ID<rftlog$5ld$1@dont-email.me>
In reply to#29879
On 7/29/2020 4:46 PM, Miguel Angel Palos M wrote:
> El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió:
>> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote:
>>> Hi good day; I want to see the possibility that if someone can help me 
>>> generate a crc calculator from txt files, I have a text file, and the
>>> result of the crc by which it must be submitted I already have, but I
>>> don't know how to get to He actually has several files to do the test,
>>> but I couldn't get to those results; Can someone help me?
>> Why don't you ask "him" for clarification?
> 
> To this day I already know the polynomial of the crc16, any other idea of ​​
> how to obtain the other data that I lack to calculate the data of the crc?

Why don't you ask "him" for clarification?

[toc] | [prev] | [next] | [standalone]


#29892

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2020-07-30 11:15 +0300
Message-ID<rftvin$osf$1@dont-email.me>
In reply to#29879
On 30.7.20 2.46, Miguel Angel Palos M wrote:
> El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió:
>> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote:
>>> Hi good day; I want to see the possibility that if someone can help me
>>> generate a crc calculator from txt files, I have a text file, and the result
>>> of the crc by which it must be submitted I already have, but I don't know
>>> how to get to He actually has several files to do the test, but I couldn't
>>> get to those results; Can someone help me?
>> Why don't you ask "him" for clarification?
> 
> 
> To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc?


In the Internet RFC 1662 <https://tools.ietf.org/html/rfc1662> part C, 
there is a pretty general example of calculating CRCs. The PPP 
polynomial is different from the IBM CRC-16, but the algorithm is valid 
for it, too, if the polynomial is adjusted in a suitable way.

-- 

-TV

[toc] | [prev] | [next] | [standalone]


#29893

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2020-07-30 11:15 +0300
Message-ID<rftvj9$ou8$1@dont-email.me>
In reply to#29879
On 30.7.20 2.46, Miguel Angel Palos M wrote:
> El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió:
>> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote:
>>> Hi good day; I want to see the possibility that if someone can help me
>>> generate a crc calculator from txt files, I have a text file, and the result
>>> of the crc by which it must be submitted I already have, but I don't know
>>> how to get to He actually has several files to do the test, but I couldn't
>>> get to those results; Can someone help me?
>> Why don't you ask "him" for clarification?
> 
> 
> To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc?


At least, you need the initial value of the generator and which way the 
bits are processed, most significant end first or least significant end
first.

If you have many examples, the initial value can be deduced, but it 
would be better to know it. Often all ones (0xffff) are used, to prevent 
initial null bytes of the message being ignored. Sometimes the final 
value is inverted.

The example text file cannot be reliably used to check, as its 
whitespace can be transformed during transfers through the NNTP protocol.

-- 

-TV

[toc] | [prev] | [next] | [standalone]


#29894

FromDon Y <blockedofcourse@foo.invalid>
Date2020-07-30 02:41 -0700
Message-ID<rfu4kf$m27$1@dont-email.me>
In reply to#29893
On 7/30/2020 1:15 AM, Tauno Voipio wrote:
> The example text file cannot be reliably used to check, as its whitespace can 
> be transformed during transfers through the NNTP protocol.

You also don't know if the CRC is calculated over the actual text file
*or* if the text file is a pretty-printed version of the data (stored
in some not defined encoding) that the checksum protects.

Are line terminations CRs?  LFs?  CRFLs?

Sure seems like the *source* of the file would be best equipped to
indicate what the "rules" are!

[toc] | [prev] | [next] | [standalone]


#29897

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-30 06:46 -0700
Message-ID<3bae2a6b-cb3a-4387-9f6d-b3bb86bfc6e9n@googlegroups.com>
In reply to#29894
El jueves, 30 de julio de 2020 a las 4:41:39 UTC-5, Don Y escribió:
> On 7/30/2020 1:15 AM, Tauno Voipio wrote: 
> > The example text file cannot be reliably used to check, as its whitespace can 
> > be transformed during transfers through the NNTP protocol.
> You also don't know if the CRC is calculated over the actual text file 
> *or* if the text file is a pretty-printed version of the data (stored 
> in some not defined encoding) that the checksum protects. 
> 
> Are line terminations CRs? LFs? CRFLs? 
> 
> Sure seems like the *source* of the file would be best equipped to 
> indicate what the "rules" are!


In fact, when modifying even a blank space the program that validates the crc, marks an error; if you take into account the blank spaces.

The Line terminations are a new line /n

the source files are published, 
and the rest is an executable (exe) that only verifies it and then executes.

[toc] | [prev] | [next] | [standalone]


#29899

FromDon Y <blockedofcourse@foo.invalid>
Date2020-07-30 07:00 -0700
Message-ID<rfujqh$ljj$1@dont-email.me>
In reply to#29897
On 7/30/2020 6:46 AM, Miguel Angel Palos M wrote:
> El jueves, 30 de julio de 2020 a las 4:41:39 UTC-5, Don Y escribió:
>> On 7/30/2020 1:15 AM, Tauno Voipio wrote:
>>> The example text file cannot be reliably used to check, as its
>>> whitespace can be transformed during transfers through the NNTP
>>> protocol.
>> You also don't know if the CRC is calculated over the actual text file 
>> *or* if the text file is a pretty-printed version of the data (stored in
>> some not defined encoding) that the checksum protects.
>> 
>> Are line terminations CRs? LFs? CRFLs?
>> 
>> Sure seems like the *source* of the file would be best equipped to 
>> indicate what the "rules" are!
> 
> 
> In fact, when modifying even a blank space the program that validates the
> crc, marks an error; if you take into account the blank spaces.
> 
> The Line terminations are a new line /n
> 
> the source files are published, and the rest is an executable (exe) that
> only verifies it and then executes.

"source files"?  As in "source code" (for the program)?
If so, then you already have what you need.

Otherwise, try removing the first line from the file and feeding
the balance to <https://crccalc.com/> to see what *it* computes
as the checksum.  If it agrees with the value in the line that
you removed, then you (appear to) have a tool that will do
the work that you want.

[toc] | [prev] | [next] | [standalone]


#29896

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-30 06:40 -0700
Message-ID<192c74ea-bbcf-497d-9971-50e81046947cn@googlegroups.com>
In reply to#29893
El jueves, 30 de julio de 2020 a las 3:15:40 UTC-5, Tauno Voipio escribió:
> On 30.7.20 2.46, Miguel Angel Palos M wrote: 
> > El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió: 
> >> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote: 
> >>> Hi good day; I want to see the possibility that if someone can help me 
> >>> generate a crc calculator from txt files, I have a text file, and the result 
> >>> of the crc by which it must be submitted I already have, but I don't know 
> >>> how to get to He actually has several files to do the test, but I couldn't 
> >>> get to those results; Can someone help me? 
> >> Why don't you ask "him" for clarification? 
> > 
> > 
> > To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc?
> At least, you need the initial value of the generator and which way the 
> bits are processed, most significant end first or least significant end 
> first. 
> 
> If you have many examples, the initial value can be deduced, but it 
> would be better to know it. Often all ones (0xffff) are used, to prevent 
> initial null bytes of the message being ignored. Sometimes the final 
> value is inverted. 
> 
> The example text file cannot be reliably used to check, as its 
> whitespace can be transformed during transfers through the NNTP protocol. 
> 
> -- 
> 
> -TV


Mr Tauno Voipio


I have many examples of +10 files with the crc in the header which is what it should give and all in TXT format, the detail is that I have not even found what you are commenting on and it makes itself look so easy.

----physics.txt-------
E48D
8
   1
   1
   1
   400
8888
TH86
    9 
    8 
    7 
    6 
    3 
    2 
    1 
    0 
0
0
 0 0 0 0 0 0 0 0 0 0
 0 0 1 1 1 1 0 0 0 0
100
0
0
0
1
0
1
0 0 0 0 0 0
0
2
0
1
1
2
2
2 4
4 4
3
   120 
	6	1	20 
	1	55 
	200	1	999 
	1	999 
	0	0	0 
	0	0 
	300	1	999 
	1	999 
	0	0	0 
	0	0 
	3000	1	9000 
	1	9999 
	0	0	0 
	0	0 
	0	0	0 
	0	0 
	200	20	999 
	1	999 
	200	20	999 
	1	999 
	300	1	999 
	1	999 
	0	0	0 
	0	0 
	200	1	999 
	1	999 
	200	1	999 
	1	999 
654
        FALSE 
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
               -1                  0
       TRUE 
  5 
    FIXED     XRAYS    1  500  400    0    0    NA    0  500
33   33   33   33   654  250  250 
    FIXED     XRAYS    1  100   80    0    0    NA    0  100
33   33   33   33   654  250  250 
    FIXED     XRAYS    1  100   80    0    0    NA    0  100
33   33   33   33   654  250  250 
      ARC     XRAYS    1  180   96 1800 2700    NA    0  180
33   33   33   33   654  100  100 
      ARC     XRAYS    1   90   53 2700 1800    NA    0   90
33   33   33   33   654  100  100 
----physics.txt----ends



-----service.txt-----
EB78
 7
 0
 0
 100 5
 200 11
 200 0
 200 7
 200 5
 300 14
 462 5
 442 3
 -100 -3
 -100 -3
 -100 -3
 -100 -3
 -100 -4
 -100 -3
 0 0
 300 -2
 -1500 -3
 2100 1
 0 0
 -6 0
 76 0
 125 0
 -300 -14
 500 40
 200 5
 200 8
 510 77
 100 0
 0 0
 0 0
 -1500 600
 100 0
 100 0
 100 0
 100 0
 100 -1
 100 0
 100 0
 100 0
 100 0
 100 0
 100 0
 200 0
 200 0
 205 0
 200 0
 210 0
 195 0
 300 0
 100 0
 100 0
 100 0
 100 0
 100 0
 300 0
 100 0
 100 0
 100 0
 100 0
 0 0
 0 0
 0 0
 0 0
 100 0
 3650 -50 180 409 40 2048 -52 21 1024 1024 16
 7197 -32293 0 7194 -32290 0
 2750 850 200 409 512 12288 -52 32 1024 1024 16
 7214 18905 0 0 0 0
 201 -105 40 615 885 4096 52 0 1024 1024 6
 6 -4117 857 4 4095 1481
 201 -105 40 615 885 4096 52 0 1024 1024 6
 -5 -4098 482 -15 4125 586
 201 -20 40 615 864 8192 52 0 1024 1024 6
 366 1827 -406 0 0 0
 201 -20 40 615 864 8192 52 0 1024 1024 6
 348 1805 -285 0 0 0
 1675 595 64 307 200 0 -52 32 2047 102 8
 4646 9594 0 0 0 0
 1250 750 160 307 180 16384 52 40 683 300 8
 4009 4211 0 0 0 0
 1540 0 160 307 200 8192 52 40 683 400 8
 3185 12886 0 0 0 0
 2750 850 96 624 128 12288 -52 32 500 500 8
 7190 -20251 0 0 0 0
 402 5 40 615 0 0 52 0 1024 1024 1
 0 0 0 0 0 0
 402 5 60 615 384 0 52 0 1024 1024 8
 737 3683 439 0 0 0
 32
 20 20
 30 100
 842 6 -8 0 8196
 800 256 0 0 0
 3640 800 0 0 4096
 3640 800 0 0 4096
 2400 630 0 0 1280
 2400 800 0 0 1280
 2500 400 0 0 0
 1200 120 0 0 12288
 1000 110 0 0 10496
 1700 50 0 0 18176
 28 120
 20 100
 6 20
 6 20
 6 20
 6 20
 6 100
 6 100
 6 100
 20 120
 5 0 900 1800 2700 3600 0
 5 900 1350 1800 2250 2700 0
 6 -90 -40 20 80 140 190
 6 -90 -40 20 80 140 190
 5 -20 20 80 140 190 0
 5 -20 20 80 140 190 0
 6 650 800 1000 1200 1400 1600
 5 770 875 1000 1125 1230 0
 6 0 300 600 900 1200 1500
 5 900 1350 1800 2250 2700 0
 0 0 0 0 0 0 0
 5 20 100 200 300 380 0
 255
 0 1 1 1 2 3 4 5 6 6 7 8 9 10 11 12
 12 13 13 14 14 15 15 16 16 17 18 19 20 21 22 23
 23 25 28 32 36 40 40 40 40 40 40 40 40 40 40 40
 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40

---------service.txt---ends-------

[toc] | [prev] | [next] | [standalone]


#29898

FromMiguel Angel Palos M <miguel.palos@gmail.com>
Date2020-07-30 06:48 -0700
Message-ID<368f47fe-052b-497b-988f-673c5375dca1n@googlegroups.com>
In reply to#29896
El jueves, 30 de julio de 2020 a las 8:40:53 UTC-5, Miguel Angel Palos M escribió:
> El jueves, 30 de julio de 2020 a las 3:15:40 UTC-5, Tauno Voipio escribió: 
> > On 30.7.20 2.46, Miguel Angel Palos M wrote: 
> > > El martes, 28 de julio de 2020 a las 3:01:09 UTC-5, Don Y escribió: 
> > >> On 7/27/2020 12:54 PM, Miguel Angel Palos M wrote: 
> > >>> Hi good day; I want to see the possibility that if someone can help me 
> > >>> generate a crc calculator from txt files, I have a text file, and the result 
> > >>> of the crc by which it must be submitted I already have, but I don't know 
> > >>> how to get to He actually has several files to do the test, but I couldn't 
> > >>> get to those results; Can someone help me? 
> > >> Why don't you ask "him" for clarification? 
> > > 
> > > 
> > > To this day I already know the polynomial of the crc16, any other idea of ​​how to obtain the other data that I lack to calculate the data of the crc? 
> > At least, you need the initial value of the generator and which way the 
> > bits are processed, most significant end first or least significant end 
> > first. 
> > 
> > If you have many examples, the initial value can be deduced, but it 
> > would be better to know it. Often all ones (0xffff) are used, to prevent 
> > initial null bytes of the message being ignored. Sometimes the final 
> > value is inverted. 
> > 
> > The example text file cannot be reliably used to check, as its 
> > whitespace can be transformed during transfers through the NNTP protocol. 
> > 
> > -- 
> > 
> > -TV
> Mr Tauno Voipio 
> 
> 
> I have many examples of +10 files with the crc in the header which is what it should give and all in TXT format, the detail is that I have not even found what you are commenting on and it makes itself look so easy. 
> 
> ----physics.txt-------
> E48D 
> 8 
> 1 
> 1 
> 1 
> 400 
> 8888 
> TH86 
> 9 
> 8 
> 7 
> 6 
> 3 
> 2 
> 1 
> 0 
> 0 
> 0 
> 0 0 0 0 0 0 0 0 0 0 
> 0 0 1 1 1 1 0 0 0 0 
> 100 
> 0 
> 0 
> 0 
> 1 
> 0 
> 1 
> 0 0 0 0 0 0 
> 0 
> 2 
> 0 
> 1 
> 1 
> 2 
> 2 
> 2 4 
> 4 4 
> 3 
> 120 
> 6 1 20 
> 1 55 
> 200 1 999 
> 1 999 
> 0 0 0 
> 0 0 
> 300 1 999 
> 1 999 
> 0 0 0 
> 0 0 
> 3000 1 9000 
> 1 9999 
> 0 0 0 
> 0 0 
> 0 0 0 
> 0 0 
> 200 20 999 
> 1 999 
> 200 20 999 
> 1 999 
> 300 1 999 
> 1 999 
> 0 0 0 
> 0 0 
> 200 1 999 
> 1 999 
> 200 1 999 
> 1 999 
> 654 
> FALSE 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> -1 0 
> TRUE 
> 5 
> FIXED XRAYS 1 500 400 0 0 NA 0 500 
> 33 33 33 33 654 250 250 
> FIXED XRAYS 1 100 80 0 0 NA 0 100 
> 33 33 33 33 654 250 250 
> FIXED XRAYS 1 100 80 0 0 NA 0 100 
> 33 33 33 33 654 250 250 
> ARC XRAYS 1 180 96 1800 2700 NA 0 180 
> 33 33 33 33 654 100 100 
> ARC XRAYS 1 90 53 2700 1800 NA 0 90 
> 33 33 33 33 654 100 100
> ----physics.txt----ends 
> 
> 
> 
> -----service.txt----- 
> EB78 
> 7 
> 0 
> 0 
> 100 5 
> 200 11 
> 200 0 
> 200 7 
> 200 5 
> 300 14 
> 462 5 
> 442 3 
> -100 -3 
> -100 -3 
> -100 -3 
> -100 -3 
> -100 -4 
> -100 -3 
> 0 0 
> 300 -2 
> -1500 -3 
> 2100 1 
> 0 0 
> -6 0 
> 76 0 
> 125 0 
> -300 -14 
> 500 40 
> 200 5 
> 200 8 
> 510 77 
> 100 0 
> 0 0 
> 0 0 
> -1500 600 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 100 -1 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 200 0 
> 200 0 
> 205 0 
> 200 0 
> 210 0 
> 195 0 
> 300 0 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 300 0 
> 100 0 
> 100 0 
> 100 0 
> 100 0 
> 0 0
> 0 0 
> 0 0 
> 0 0
> 100 0 
> 3650 -50 180 409 40 2048 -52 21 1024 1024 16 
> 7197 -32293 0 7194 -32290 0 
> 2750 850 200 409 512 12288 -52 32 1024 1024 16 
> 7214 18905 0 0 0 0 
> 201 -105 40 615 885 4096 52 0 1024 1024 6 
> 6 -4117 857 4 4095 1481 
> 201 -105 40 615 885 4096 52 0 1024 1024 6 
> -5 -4098 482 -15 4125 586 
> 201 -20 40 615 864 8192 52 0 1024 1024 6 
> 366 1827 -406 0 0 0 
> 201 -20 40 615 864 8192 52 0 1024 1024 6 
> 348 1805 -285 0 0 0 
> 1675 595 64 307 200 0 -52 32 2047 102 8 
> 4646 9594 0 0 0 0 
> 1250 750 160 307 180 16384 52 40 683 300 8 
> 4009 4211 0 0 0 0 
> 1540 0 160 307 200 8192 52 40 683 400 8 
> 3185 12886 0 0 0 0 
> 2750 850 96 624 128 12288 -52 32 500 500 8 
> 7190 -20251 0 0 0 0 
> 402 5 40 615 0 0 52 0 1024 1024 1
> 0 0 0 0 0 0
> 402 5 60 615 384 0 52 0 1024 1024 8 
> 737 3683 439 0 0 0 
> 32 
> 20 20 
> 30 100 
> 842 6 -8 0 8196 
> 800 256 0 0 0 
> 3640 800 0 0 4096 
> 3640 800 0 0 4096 
> 2400 630 0 0 1280 
> 2400 800 0 0 1280 
> 2500 400 0 0 0 
> 1200 120 0 0 12288 
> 1000 110 0 0 10496 
> 1700 50 0 0 18176 
> 28 120 
> 20 100 
> 6 20 
> 6 20 
> 6 20 
> 6 20 
> 6 100 
> 6 100 
> 6 100 
> 20 120 
> 5 0 900 1800 2700 3600 0 
> 5 900 1350 1800 2250 2700 0 
> 6 -90 -40 20 80 140 190 
> 6 -90 -40 20 80 140 190 
> 5 -20 20 80 140 190 0 
> 5 -20 20 80 140 190 0 
> 6 650 800 1000 1200 1400 1600 
> 5 770 875 1000 1125 1230 0 
> 6 0 300 600 900 1200 1500 
> 5 900 1350 1800 2250 2700 0
> 0 0 0 0 0 0 0
> 5 20 100 200 300 380 0 
> 255 
> 0 1 1 1 2 3 4 5 6 6 7 8 9 10 11 12 
> 12 13 13 14 14 15 15 16 16 17 18 19 20 21 22 23 
> 23 25 28 32 36 40 40 40 40 40 40 40 40 40 40 40 
> 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 
> 
> ---------service.txt---ends-------


The First Line in each file are the crc that should be.

[toc] | [prev] | [next] | [standalone]


#29904

Fromjgh@mdfs.net
Date2020-07-31 17:24 -0700
Message-ID<48925c7e-cd27-4390-9cdf-40f4e345aa81o@googlegroups.com>
In reply to#29863
A bit of web searching will find sample code to do CRC16 for various processors.

-- 
mdfs.net/Info/Comp/Comms/CRC16.htm

[toc] | [prev] | [standalone]


Back to top | Article view | comp.arch.embedded


csiph-web