Do you have a question? Post it now! No Registration Necessary
- Subject
- Posted on
- CRC of Preferred Roaming List problem
- 10-21-2005
- Autumn-Fox
October 21, 2005, 3:29 pm
I have a problem with the crc calculation for the preferred roaming
list.
Here is a roaming list from a motorola phone
Roaming List NAM 0:
00 31 30 39 00 02 40 03 10 51 c8 49 8c 6b b9 6a
b0 74 d8 e1 b8 6e 14 a3 70 89 94 a3 02 5d 63 47
84 57 41 15 e0 0c 08 22 bc 81 02 2b 9c 0a 06 98
dd
The last two bytes are the 16 bit CRC-ccitt result for the message
ahead.
According to the protocol TIA-EIA-IS683A , the crc calcuation is
described as follows:
Page 3-43 of IS683A
(http://www.3gpp2.org/Public_html/specs/C.S0016-0with3Gcover.pdf )
the 16 bit preferred roaming list crc field PR_LIST_CRC is calculated
on all bits of the PRL excluding the bits of the PR_LIST_CRC field
itself. The generator polynomial for this CRC is g(x) = x^16+x^12+x^5 +
1
................
using the logic shown in figure 2.2.1-2
..............
initially, all shift register elements are set to logical one and the
switches are set in the position A.
the register is clocked with each preferred roaming list bit as an
input,from the most significant bit of the PR_LIST_SIZE field through
the least significant bit of the reserved field.
the switches are set in the position B and the register is clocked an
additional 16 times. the 16 additional output bits constitute the CRC.
value 0xffff, am I correct ?
After I programmed like the protocol , I found the crc result is 0x6722
instead of 0x89dd. Also I tested on the website
http://www.lammertbies.nl/comm/info/crc-calculation.html?crc00%+31+30+39+00+02+40+03+10+51+c8+49+8c+6b+b9+6a+++b0+74+d8+e1+b8+6e+14+a3+70+89+94+a3+02+5d+63+47+84+57+41+15+e0+0c+08+22+bc+81+02+2b+9c+0a+06&method=hex
which gave me the same result ( which means I am correct ? )
Now I am wondering whether it is possible they use a different
algorithm to calculate the CRC of the preferred roaming list ?
And I am wondering whether it matters if I use the protocol algorithm
not their algorithm.
list.
Here is a roaming list from a motorola phone
Roaming List NAM 0:
00 31 30 39 00 02 40 03 10 51 c8 49 8c 6b b9 6a
b0 74 d8 e1 b8 6e 14 a3 70 89 94 a3 02 5d 63 47
84 57 41 15 e0 0c 08 22 bc 81 02 2b 9c 0a 06 98
dd
The last two bytes are the 16 bit CRC-ccitt result for the message
ahead.
According to the protocol TIA-EIA-IS683A , the crc calcuation is
described as follows:
Page 3-43 of IS683A
(http://www.3gpp2.org/Public_html/specs/C.S0016-0with3Gcover.pdf )
the 16 bit preferred roaming list crc field PR_LIST_CRC is calculated
on all bits of the PRL excluding the bits of the PR_LIST_CRC field
itself. The generator polynomial for this CRC is g(x) = x^16+x^12+x^5 +
1
................
using the logic shown in figure 2.2.1-2
..............
initially, all shift register elements are set to logical one and the
switches are set in the position A.
the register is clocked with each preferred roaming list bit as an
input,from the most significant bit of the PR_LIST_SIZE field through
the least significant bit of the reserved field.
the switches are set in the position B and the register is clocked an
additional 16 times. the 16 additional output bits constitute the CRC.
value 0xffff, am I correct ?
After I programmed like the protocol , I found the crc result is 0x6722
instead of 0x89dd. Also I tested on the website
http://www.lammertbies.nl/comm/info/crc-calculation.html?crc00%+31+30+39+00+02+40+03+10+51+c8+49+8c+6b+b9+6a+++b0+74+d8+e1+b8+6e+14+a3+70+89+94+a3+02+5d+63+47+84+57+41+15+e0+0c+08+22+bc+81+02+2b+9c+0a+06&method=hex
which gave me the same result ( which means I am correct ? )
Now I am wondering whether it is possible they use a different
algorithm to calculate the CRC of the preferred roaming list ?
And I am wondering whether it matters if I use the protocol algorithm
not their algorithm.
Re: CRC of Preferred Roaming List problem
http://www.lammertbies.nl/comm/info/crc-calculation.html?crc00%+31+30+39+00+02+40+03+10+51+c8+49+8c+6b+b9+6a+++b0+74+d8+e1+b8+6e+14+a3+70+89+94+a3+02+5d+63+47+84+57+41+15+e0+0c+08+22+bc+81+02+2b+9c+0a+06&method=hex
your calc is correct, however the result is normally inverted ( NOT ) so
your 0x6722
becomes 0x98DD .. you have 0x89DD .. was that a typo ?
Re: CRC of Preferred Roaming List problem
http://www.lammertbies.nl/comm/info/crc-calculation.html?crc00%+31+30+39+00+02+40+03+10+51+c8+49+8c+6b+b9+6a+++b0+74+d8+e1+b8+6e+14+a3+70+89+94+a3+02+5d+63+47+84+57+41+15+e0+0c+08+22+bc+81+02+2b+9c+0a+06&method=hex
per previous post.. it looks like you did have a typo.. the last two data
bytes
are indeed 0x98dd...
enjoy..
Site Timeline
- » Reverse current into a lithium battery
- — Next thread in » Embedded Programming
- » Ethernet chip - newbie need help with selection
- — Previous thread in » Embedded Programming
- » Industrial IoT Latest Technology Research, Top Players with Current Trends and Emerging Ch...
- — Newest thread in » Embedded Programming
- » OT: Sweden Preps for Civil War
- — The site's Newest Thread. Posted in » Electronics Design
- » Kliješta za krimpanje
- — The site's Last Updated Thread. Posted in » Electronics (Croatian)