如何用psi / si数据包计算crc32 [英] How to calculate crc32 in psi/si packet

查看:151
本文介绍了如何用psi / si数据包计算crc32的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello先生,



我们正在努力向PSI SI发送UDP数据包。我们正在开发PSI SI发生器。

但我们仍然坚持使用CheckSum CRC32 - 我们无法找到校验和。我尝试了几个来自互联网的代码。它提供了一些校验和,但校验和与wireshark校验和不匹配。



我们有使用正确校验和的PSISI数据包的wireshark转储。



任何人都可以帮我计算PSI SI的校验和吗?





问候,

Vipul

Hello Sir,

We are working on sending UDP packets to PSI SI. We are developing PSI SI generator.
But we are stuck on CheckSum CRC32 - we are not able to find the check sum. I tried on few code from the internet . It comes up with some checksum but that checksum doesnt match with wireshark check sum .

We have wireshark dump of the PSISI packets working with correct checksum .

Can anyoone help me in calculating the checksum for the PSI SI ?


Regards,
Vipul

推荐答案

不是真的 - 我们必须弄清楚协议是什么,应该是什么部分包括在CRC中,哪些不应该。然后我们必须找到一个CRC生成器,以及一些样本数据并尝试它。基本上,这是为你工作,只有你得到报酬! :笑:



相反,看看你到目前为止的情况。生成任何类型的校验和时最常见的错误是在总和检查中包含太多或太少的数据:通常开始和结束框架字符不包括在计算中。

首先看一下协议描述,然后尝试在你已知的例子上使用你的CRC代码(但我们没有)看看它给出了什么。如果这不能生成正确的值,请检查协议,看看你是否已经包含或排除了你不应该拥有的字符。

CRC现在是非常基本的东西,所以它不应该采取你太漫长了。
Not really - we'd have to work out what the protocol is, what parts should be included in the CRC and which shouldn't. Then we'd have to find a CRC generator, and some sample data and try it. Basically, that's doing your work for you, only you get paid for it! :laugh:

Instead, look at what you have so far. The most common mistake when generating checksums of whatever type is including too much or too little data in the sum check: often the "start" and "end" framing characters aren't included in the calculation.
So start by looking at the protocol description, and try using your CRC code on the known examples you have (but we don't) to see what it gives. If that doesn't generate the right values, check the protocol and see if you have included or excluded characters you shouldn't have.
CRC is pretty basic stuff these days, so it shouldn't take you too long to work it out.


这篇关于如何用psi / si数据包计算crc32的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆