-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
具体支持是哪一个ISO 14229版本? #3
Comments
@driftregion 你的中文很不错 👍 👍 👍 我将 udsoncan.services.DiagnosticSessionControl.ResponseData 中的说明引用到了下面:
Request subfunction echoed back by the server
Raw session parameter records. Data given by the server. For 2006 configurations, this data can is manufacturer specific. For 2013 version and above, this data correspond to P2 and P2* timing requirement.
Default P2 max timing supported by the server for the activated diagnostic session. Applicable for 2013 version and above. Value in seconds.
Default P2* (NRC 0x78) max timing supported by the server for the activated diagnostic session. Applicable for 2013 version and above. Value in seconds 根据以上描述,在 ISO-14229 2013 的版本之后,才会包含 P2Server 和 P2*Server 的数据,故当前 UDS_S32K144_Bootloader 是符合 ISO-14229 2006 的版本。 所以,根据实际情况,你有两种方法使其运行起来:
UDS_S32K144_Bootloader/UDS_ProtocolStack/uds_app_cfg.c Lines 431 to 442 in 6017651
例如 P2Server = 50 ms = 0x0032,P2*Server = 5000 ms = 0x1388 则有积极响应: /* 修改后,适配 ISO-14229 2013 & 2020 */
case 0x03u : /* Extend mode */
case 0x83u :
#define UDS_P2______SERVER (50)
#define UDS_P2_STAR_SERVER (5000)
m_pstPDUMsg->aDataBuf[2u] = (UDS_P2______SERVER >> 8u) & 0xFFu;
m_pstPDUMsg->aDataBuf[3u] = (UDS_P2______SERVER >> 0u) & 0xFFu;
m_pstPDUMsg->aDataBuf[4u] = (UDS_P2_STAR_SERVER >> 8u) & 0xFFu;
m_pstPDUMsg->aDataBuf[5u] = (UDS_P2_STAR_SERVER >> 0u) & 0xFFu;
m_pstPDUMsg->xDataLen = 6u;
SetCurrentSession(EXTEND_SESSION);
if (0x83u == RequestSubfunction)
{
m_pstPDUMsg->xDataLen = 0u;
}
/* Restart S3Server time */
RestartS3Server();
break;
latest_standard = 2006 |
TP层协议版本兼容 ISO-15765-2 |
CN:由于篇幅有限,我将以下宏定义放在了代码段中,实际上,将其放在 ./UDS_PortingFiles/user_config.h 会更好。 EN:For convenience, I put the following macro definition code in the code snippet above, but it would be better to put it in ./UDS_PortingFiles/user_config.h #define UDS_P2______SERVER (50)
#define UDS_P2_STAR_SERVER (5000) |
感谢你的仔细答案! |
我在用一个udsoncan客户端做测试
UDS_S32K144_Bootloader的回复长度写的是2.
udsoncan的文档意味着现在回复不符合2013年以上的标准。
https://udsoncan.readthedocs.io/en/latest/_modules/udsoncan/services/DiagnosticSessionControl.html#DiagnosticSessionControl.interpret_response
有至少三个ISO 14229版本:2006, 2013, 2020。
好像是向后兼容。为了大家能方便一些的开PR,该项目要支持哪一些ISO 14229版本?
谢谢大佬!
The text was updated successfully, but these errors were encountered: