Closed logoff closed 6 years ago
It seems to be the problem with ASN compiler running on 32bit machine. I assume your Linux PC is 64bit... You should apply the fix mentioned in this forum https://github.com/vlm/asn1c/issues/252. Then generate again the .c and .h files from ASN files with updated ASN compiler.
@logoff Can you confirm that the solution proposed by @valt2017 is fixing your problem? If this is the case I might regenerate the bundled ASN.1 code accordingly.
I don't have a clear idea about how to apply the fix. My understanding is that I need to recompile ASN.1, but I don't know exactly how, Could you please give some pointers to do it? Thank you.
@logoff I have created a branch asn1_update
for you including aforementioned bugfix for asn1c. Please pull this branch of Vanetza and check if your problem is fixed then.
I tested socktap-cam
app in a Raspberry Pi 3 with a 32 bit ARM architecture with the new branch and it worked as expected. So it seems the applied changes solved the issue.
It also worked for me on several embedded 32bit platforms. If you plan to use also DENM messages on 32bits you may discover the issue with TimestampIts field mentioned here: https://sourceforge.net/p/asn1c/discussion/357921/thread/4c43bdf3/ We can discuss possible workarounds then.
@logoff @valt2017 Thank you very much for your feedback!
@valt2017 I suppose one can prevent the described problem by using asn_uint642INTEGER
instead of asn_ulong2INTEGER
. However, I haven't tried this yet. Do you have any experience in this regard?
My first attempt was to force ASN compiler to use 64bit integer automatically instead of 32bit by switches or patches mentioned in the forums dedicated to implementation of 32bit compilation support. It did not solve this but I haven't tested all versions...maybe when I have time in the future. My second "dirty" attempt was from ETSI ITS Wireshark plugin or OpenC2X sources - changing TimestampIts in ASN file from INTEGER to BITSTRING(SIZE(42)). I can confirm it works for me as expected. I haven't found any other issues that prevent the use of Vanetza on 32bit systems (Tested only with simple CAM, DENM, IVI, MAP and SPAT messages). If you have discovered something else, please let me know.
Former asn1_update
branch has been merged into master
with 9b9d332f284e09b276d77f91e7ed9bfd81de46f1.
@valt2017 Please feel free to open another issue ticket if you experience any problems regarding TimestampIts
.
Thanks again for supporting the development of Vanetza!
I'm trying to use vanetza in a small project. My intention is to send periodical CAMs, so socktap-cam application seems to be good starting point.
I'm indoor, so I want to use gpsfake with pre-recorded real GPS sessions during development. I'm experiencing some issues executing socktap-cam with recorded sessions. I recorded some GPS sessions with gpsfake and now I'm playing it with this command:
gpsfake -c 1 20180621-1.gps
Then I run gpsmon and I see good results.
But when I run socktap-cam in my Raspberry Pi I get this error:
I see where is it produced: https://github.com/riebl/vanetza/blob/master/vanetza/asn1/its/per_support.c#L238
In my Linux PC I don't get this error. I don't know why...
What is the explanation of this error? How could I get rid of it?