asn1c: J2735 (2016 version) MessageFrame cannot be decoded?
Hi,
I’m current facing this issue: MessageFrame
cannot be decoded after encoded.
A BSM
is generated with some customized fields. When testing to encode and decode BSM
without encapsulating in MessageFrame
, both der_encode_to_buffer()
and ber_decode()
functions work well.
But after encapsulating BSM
in MessageFrame
, encoding function seems to work (I’m not sure if it is working correctly), decoding function does not work. It gives the result code: 2
, which is failure.
All messages are properly written, since I can verify them by decode the byte sequence into xml format for verification.
The message below is xml format:
<MessageFrame>
<messageId>20</messageId>
<value>
<BasicSafetyMessage>
<coreData>
<msgCnt>0</msgCnt>
<id></id>
<secMark>0</secMark>
<lat>0</lat>
<long>0</long>
<elev>0</elev>
<accuracy>
<semiMajor>0</semiMajor>
<semiMinor>0</semiMinor>
<orientation>0</orientation>
</accuracy>
<transmission><neutral/></transmission>
<speed>0</speed>
<heading>470220800</heading>
<angle>847118336</angle>
<accelSet>
<long>2140209152</long>
<lat>2139422720</lat>
<vert>0</vert>
<yaw>1908211712</yaw>
</accelSet>
<brakes>
<wheelBrakes>
0000000000000000000000000000000000000
</wheelBrakes>
<traction><unavailable/></traction>
<abs><unavailable/></abs>
<scs><unavailable/></scs>
<brakeBoost><unavailable/></brakeBoost>
<auxBrakes><unavailable/></auxBrakes>
</brakes>
<size>
<width>0</width>
<length>0</length>
</size>
</coreData>
<platoon>
<status>00</status>
<position>00</position>
<ecef>
<ecefX>D6 9A 07 91</ecefX>
<ecefY>D6 9A 07 91</ecefY>
<ecefZ>D6 9A 07 91</ecefZ>
</ecef>
<brakePercentage><minPressure/></brakePercentage>
<platoonPos>
<headway>-2012020736</headway>
<range>604307456</range>
<rangeRate>2138636288</rangeRate>
</platoonPos>
<goal>
<desiredAcc>2138374144</desiredAcc>
<goalHeadway>1614479360</goalHeadway>
<goalSpeed>1476395008</goalSpeed>
</goal>
</platoon>
</BasicSafetyMessage>
</value>
</MessageFrame>
What could be wrong?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 16 (2 by maintainers)
I have my J2735_201603SA decoder working now. Don’t know why folks here are doing BER/DER as UPER is the chosen standardized format. I do find that ASN_STRUCT_FREE crashes for J2735, but not for the P1609.2 decoder I have (OER).