Another sudden encounter with the use of Python processing modbus communication and need to CRC16 calibration problem, at that time in Baidu did not find, Google found a foreigner developed Python package, the results were installed and found that the checksum is incorrect (may be using a different pattern string, XCRC16 pattern String for 0xa001), later things past wrote a package to make up, xcrc16 means extend CRC->XCRC, is also my first open source project, if you use the program encountered what situation also trouble notify me, I will be the first time to maintain.
Introduced:
The XCRC16 module is written to solve the CRC16 checksum problem
Currently only 16-bit calibration, test support python2.7 and 3.2
How to use
Import XCRC16
XCRC16.CRC16 ([0x05,0x01,0x00,0x00,0x00,0x0a])
The form of the data stream
Import XCRC16
XCRC16.CRC16 (' \x05\x01\x00\x00\x00\x0a ')
Installation method under Linux:
Extract
Tar xjvf xcrc16.tar.bz2/unzip xcrc16.zip
Go to directory Installation
CD XCRC16
Python setup.py Install
If the installation fails, make sure that you use root privileges to perform
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service