<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CRC mismatch]]></title><description><![CDATA[<p dir="auto">i have a problem to send a command to a device and get response,<br />
there is an exception that say CRC is mismatch but, i attached the request and response sniffed by serial monitor<br />
it seems everything is ok, but why i get CRC mismatch exception!!!?</p>
<p dir="auto">Native lib Version = RXTX-2.1-7<br />
Java lib Version   = RXTX-2.1-7<br />
ready to send connect command<br />
com.serotonin.modbus4j.exception.ModbusTransportException: CRC mismatch: given=1<br />
065, calc=49192<br />
at com.serotonin.modbus4j.base.ModbusUtils.checkCRC(ModbusUtils.java:87)</p>
<pre><code>    at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessage
</code></pre>
<p dir="auto">Response(RtuMessageResponse.java:21)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(R<br />
tuMessageParser.java:21)<br />
at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessag<br />
eParser.java:17)<br />
at com.serotonin.messaging.MessageControl.data(MessageControl.java:133)<br />
at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.j<br />
ava:76)<br />
at java.lang.Thread.run(Unknown Source)</p>
<hr />
<p dir="auto">**Request: 2012/03/03 02:26:34 ?.?.07964 (+23.5156 seconds)</p>
<p dir="auto">01 10 00 A8 00 02 04 35 35 35 35 30 F4            ...¨...55550ô</p>
<p dir="auto">Answer: 2012/03/03 02:26:34 ?.?.12664 (+0.0469 seconds)</p>
<p dir="auto">01 10 00 A8 00 02 04 29 93                        ...¨...)?</p>
<p dir="auto">**</p>
]]></description><link>https://forum.mango-os.com/topic/967/crc-mismatch</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 13:03:32 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/967.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Mar 2012 23:26:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CRC mismatch on Wed, 07 Mar 2012 20:28:56 GMT]]></title><description><![CDATA[<p dir="auto">I get the same result. The incoming response looks otherwise ok. The part "011000a80002" looks right. What is suspicious is that the response has 3 bytes at its tail instead of just two: "042993". A CRC is only two bytes.</p>
]]></description><link>https://forum.mango-os.com/post/6259</link><guid isPermaLink="true">https://forum.mango-os.com/post/6259</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Wed, 07 Mar 2012 20:28:56 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Wed, 07 Mar 2012 17:00:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">my problem still exist and my code throw CRC exception.<br />
but finally i can run I/O logging and here is the result:</p>
<h1>Stable Library</h1>
<p dir="auto">Native lib Version = RXTX-2.1-7<br />
Java lib Version   = RXTX-2.1-7<br />
ready to send connect command<br />
1331106184515 O 011000a80002043535353530f4<br />
1331106184609 I 011000a80002042993<br />
com.serotonin.modbus4j.exception.ModbusTransportException: CRC mismatch: given=1<br />
065, calc=49192<br />
at com.serotonin.modbus4j.base.ModbusUtils.checkCRC(ModbusUtils.java:104<br />
)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessage<br />
Response(RtuMessageResponse.java:41)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(R<br />
tuMessageParser.java:41)<br />
at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessag<br />
eParser.java:37)<br />
at com.serotonin.messaging.MessageControl.data(MessageControl.java:170)<br />
at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.j<br />
ava:76)<br />
at java.lang.Thread.run(Unknown Source)<br />
1331106186531 O 011000a80002043535353530f4<br />
1331106186562 I 011000a80002042993<br />
com.serotonin.modbus4j.exception.ModbusTransportException: CRC mismatch: given=1<br />
065, calc=49192<br />
at com.serotonin.modbus4j.base.ModbusUtils.checkCRC(ModbusUtils.java:104<br />
)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMessageResponse.createRtuMessage<br />
Response(RtuMessageResponse.java:41)<br />
at com.serotonin.modbus4j.serial.rtu.RtuMessageParser.parseMessageImpl(R<br />
tuMessageParser.java:41)<br />
at com.serotonin.modbus4j.base.BaseMessageParser.parseMessage(BaseMessag<br />
eParser.java:37)<br />
at com.serotonin.messaging.MessageControl.data(MessageControl.java:170)<br />
at com.serotonin.messaging.InputStreamListener.run(InputStreamListener.j<br />
ava:76)</p>
]]></description><link>https://forum.mango-os.com/post/6258</link><guid isPermaLink="true">https://forum.mango-os.com/post/6258</guid><dc:creator><![CDATA[greenday]]></dc:creator><pubDate>Wed, 07 Mar 2012 17:00:23 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Mon, 05 Mar 2012 20:16:26 GMT]]></title><description><![CDATA[<p dir="auto">I uploaded a newer jar file to the repo. It includes epoll support now too.</p>
<p dir="auto">Try setting the iolog to System.out or something like that. It works for me.</p>
]]></description><link>https://forum.mango-os.com/post/6246</link><guid isPermaLink="true">https://forum.mango-os.com/post/6246</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 05 Mar 2012 20:16:26 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Mon, 05 Mar 2012 12:14:34 GMT]]></title><description><![CDATA[<p dir="auto">Sorry, but i can not find ModbusMaster.setIoLog(...) or ModbusMaster.setDiscardDataDelay(...) in Modbus4j library project.<br />
I'm sure that i use last version of modbus4j that i download from sourceforge, so what can i do now?</p>
<p dir="auto">update 1 -------------------------------------</p>
<p dir="auto">Ok now i found that those functions are in cvs repository,<br />
i will try them and send report here</p>
<p dir="auto">update 2 -------------------------------------</p>
<p dir="auto">i try to use IoLog, but nothing happen, logger did not write even an character!!!<br />
about setDiscardDataDelay also nothing happen,</p>
<p dir="auto">but i found that if i ignore the exception, i can run the next command on my device without error!<br />
because the data that we send and receive is correct.</p>
<p dir="auto">so what is that crc problem?</p>
]]></description><link>https://forum.mango-os.com/post/6243</link><guid isPermaLink="true">https://forum.mango-os.com/post/6243</guid><dc:creator><![CDATA[greenday]]></dc:creator><pubDate>Mon, 05 Mar 2012 12:14:34 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Mon, 05 Mar 2012 04:06:50 GMT]]></title><description><![CDATA[<p dir="auto">ModbusMaster.setIoLog(PrintWriter)</p>
<p dir="auto">Also, have you tried ModbusMaster.setDiscardDataDelay. Maybe try setting that to something like 200ms and see if that helps.</p>
]]></description><link>https://forum.mango-os.com/post/6242</link><guid isPermaLink="true">https://forum.mango-os.com/post/6242</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Mon, 05 Mar 2012 04:06:50 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Sun, 04 Mar 2012 11:42:08 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your reply, but how to enable IO logging ?</p>
]]></description><link>https://forum.mango-os.com/post/6241</link><guid isPermaLink="true">https://forum.mango-os.com/post/6241</guid><dc:creator><![CDATA[greenday]]></dc:creator><pubDate>Sun, 04 Mar 2012 11:42:08 GMT</pubDate></item><item><title><![CDATA[Reply to CRC mismatch on Sun, 04 Mar 2012 02:04:18 GMT]]></title><description><![CDATA[<p dir="auto">Can you turn on IO logging to get a trace of what the lib is seeing?</p>
]]></description><link>https://forum.mango-os.com/post/6240</link><guid isPermaLink="true">https://forum.mango-os.com/post/6240</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Sun, 04 Mar 2012 02:04:18 GMT</pubDate></item></channel></rss>