Pm3 Error Code 380

Post questions and issues with Concept2 PM3 SDK
Post Reply
[old] ChrisW
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] ChrisW » May 16th, 2005, 5:04 pm

The PM3 screen (App Ver 976) displays this error when I attempt to issue a PM3 specific command from my application. The strange thing is the expected values are returned to my app - but the PM3 displays this error screen each time a command is issued. <br /><br />Does anyone have any ideas what is happening?<br /><br />Thanks<br />

[old] ChrisW
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] ChrisW » May 16th, 2005, 5:08 pm

To be more specific, the actual error code is 380 -35.<br /><br />Chris<br />

[old] mlyons

Post by [old] mlyons » May 16th, 2005, 7:58 pm

<!--QuoteBegin-ChrisW+May 16 2005, 04:08 PM--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(ChrisW @ May 16 2005, 04:08 PM)</b></div></td></tr><tr><td class='quote'><!--QuoteEBegin-->To be more specific, the actual error code is 380  -35.<br /><br />Chris <br /> </td></tr></table><br />Chris,<br /><br />Please list the specific command frame you are issuing to cause this error. The SDK document has a list of error codes in an appendix. Error 380 indicates an "invalid CSAFE command". If you are using a PM3-specific command, you may not be "wrapping" it properly with the appropriate public CSAFE command.<br /><br />Mark

[old] ChrisW
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] ChrisW » May 17th, 2005, 3:33 pm

Mark,<br /><br />I am attempting to use CSAFE_PM_GET_STROKESTATE using the CSAFE_SETUSERCFG1_CMD wrapper:<br /><br />//get the stroke state<br />int[] cmdDataX = new int[4];<br />cmdDataX[0] = 0x1A;<br />cmdDataX[1] = 1;<br />cmdDataX[2] = 0xBF;<br />cmdLen = 1;<br />i = PM3DDI.tkcmdsetCSAFE_command(0, cmdLen, cmdDataX, replyLen, replyData);<br />val = replyData[4];<br /><br /><br />This approach works for commands like CSAFE_GETHORIZONTAL_CMD, perhaps I can't use this approach for PM3 specific commands?<br /><br />The thing is, the call to get the stroke state works (ie it returns the correct data), the problem is that it immediately causes the PM3 error 380.<br /><br />Thanks for any ideas or comments you may have.<br /><br />Chris<br /><br />

[old] mlyons

Post by [old] mlyons » May 17th, 2005, 4:56 pm

<!--QuoteBegin-ChrisW+May 17 2005, 02:33 PM--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(ChrisW @ May 17 2005, 02:33 PM)</b></div></td></tr><tr><td class='quote'><!--QuoteEBegin-->Mark,<br /><br />I am attempting to use CSAFE_PM_GET_STROKESTATE using the CSAFE_SETUSERCFG1_CMD wrapper:<br /><br />//get the stroke state<br />int[] cmdDataX = new int[4];<br />cmdDataX[0] = 0x1A;<br />cmdDataX[1] = 1;<br />cmdDataX[2] = 0xBF;<br />cmdLen = 1;<br />i = PM3DDI.tkcmdsetCSAFE_command(0, cmdLen, cmdDataX, replyLen, replyData);<br />val = replyData[4];<br /><br /><br />This approach works for commands like CSAFE_GETHORIZONTAL_CMD, perhaps I can't use this approach for PM3 specific commands?<br /><br />The thing is, the call to get the stroke state works (ie it returns the correct data), the problem is that it immediately causes the PM3 error 380.<br /><br />Thanks for any ideas or comments you may have.<br /><br />Chris <br /> </td></tr></table><br />Chris,<br /><br />I'll have to check V976 behavior to confirm what you are seeing. There have been numerous bug fixes in the area of "'wrapped" PM3-specific commands. I have verified proper behavior of your command frame using the current Beta firmware release. I would suggest you update your PM3 with the Beta firmware release (see <a href='http://www.concept2.com/05/rower/servic ... update.asp)' target='_blank'>http://www.concept2.com/05/rower/servic ... update.asp)</a> and continue your development. Let me know if you have further difficulties and continue to visit this forum for additional Beta firmware updates.<br /><br />Mark

[old] haboustak

Post by [old] haboustak » May 18th, 2005, 10:17 am

<!--QuoteBegin-ChrisW+May 17 2005, 02:33 PM--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(ChrisW @ May 17 2005, 02:33 PM)</b></div></td></tr><tr><td class='quote'><!--QuoteEBegin-->//get the stroke state<br />int[] cmdDataX = new int[4];<br />cmdDataX[0] = 0x1A;<br />cmdDataX[1] = 1;<br />cmdDataX[2] = 0xBF;<br />cmdLen = 1;<br />i = PM3DDI.tkcmdsetCSAFE_command(0, cmdLen, cmdDataX, replyLen, replyData);<br />val = replyData[4];<br /> </td></tr></table><br /><br />Shouldn't cmdLen be 3 in this case, not 1? I don't know how that will affect the packet that's assembled by CSAFE_command, but it very well could affect the CRC and stuff.<br /><br />As a sidenote - if you're writing C++ or C#, I like to assemble my frames this way:<br />UINT32_T cmd_data[CSAFE_FRAME_LENGTH];<br />UINT32_T cmd_len=0;<br /><br />cmd_data[cmd_len++] = 0x1A;<br />cmd_data[cmd_len++] = 0x01;<br />cmd_data[cmd_len++] = 0xBF;<br /><br />It eliminates some counting on my part and some chance that cmd_len is not equal to the actual data in the buffer.<br /><br />Mike

[old] ChrisW
Posts: 0
Joined: March 18th, 2006, 10:32 pm

Post by [old] ChrisW » May 18th, 2005, 7:19 pm

<!--QuoteBegin-haboustak+May 18 2005, 09:17 AM--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(haboustak @ May 18 2005, 09:17 AM)</b></div></td></tr><tr><td class='quote'><!--QuoteEBegin--><!--QuoteBegin-ChrisW+May 17 2005, 02:33 PM--><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><div class='genmed'><b>QUOTE(ChrisW @ May 17 2005, 02:33 PM)</b></div></td></tr><tr><td class='quote'><!--QuoteEBegin-->//get the stroke state<br />int[] cmdDataX = new int[4];<br />cmdDataX[0] = 0x1A;<br />cmdDataX[1] = 1;<br />cmdDataX[2] = 0xBF;<br />cmdLen = 1;<br />i = PM3DDI.tkcmdsetCSAFE_command(0, cmdLen, cmdDataX, replyLen, replyData);<br />val = replyData[4];<br /> </td></tr></table><br /><br />Shouldn't cmdLen be 3 in this case, not 1? I don't know how that will affect the packet that's assembled by CSAFE_command, but it very well could affect the CRC and stuff.<br /><br />As a sidenote - if you're writing C++ or C#, I like to assemble my frames this way:<br />UINT32_T cmd_data[CSAFE_FRAME_LENGTH];<br />UINT32_T cmd_len=0;<br /><br />cmd_data[cmd_len++] = 0x1A;<br />cmd_data[cmd_len++] = 0x01;<br />cmd_data[cmd_len++] = 0xBF;<br /><br />It eliminates some counting on my part and some chance that cmd_len is not equal to the actual data in the buffer.<br /><br />Mike <br /> </td></tr></table><br /><br /><br />Mike<br /><br />Thankyou - you were absolutely correct - fixing cmdLen eliminated my error!<br /><br />Thanks again,<br /><br />Chris<br />

Post Reply