Hi,

I am trying to decode the data produced by the EU digital tachograph units. The data structures are defined in ASN.1, I copied them out of the specification document and fiddled with them until they compiled with asn1c (svn revision 1406).

Wow! I am very impressed already. Just a few hours ago I was under the impression I would have to write all that bit-fiddling code by hand!

The ASN.1 source file I produced can be downloaded for reference from:

  http://www.marian-aldenhoevel.de/tmp/eurotacho.asn1

I believe the data is encoded using PER, but little do I know, the specs are not very clear on that. I do know that there don't seem to be any tag values in there. A sample download from a unit which I think starts with a instance of the "VuIdentification" type can be downloaded from:

  http://www.marian-aldenhoevel.de/tmp/2008-09-06-18-37-27-0000.dat

To verify this I thought I'd compile converter-sample with VuIdentification as the PDU. I have set it all up using autoconf/automake and I can get it to compile but it fails at the link stage:

[EMAIL PROTECTED]:/home/kbox/TachoX/src/eurotacho# make
gcc -DPDU=VuIdentification -g -O2 -pthread -o converter converter-sample.o pdu_collection.o ActivityChangeInfo.o Address.o BCDString.o CalibrationPurpose.o Distance.o CardActivityDailyRecord.o CardActivityLengthRange.o CardApprovalNumber.o CardCertificate.o CardChipIdentification.o CardConsecutiveIndex.o ControlType.o CardControlActivityDataRecord.o CardCurrentUse.o CardDriverActivity.o CardDrivingLicenceInformation.o CardEventData.o CardEventRecord.o CardFaultData.o CardFaultRecord.o CardIccIdentification.o CardIdentification.o CardNumber.o CardPlaceDailyWorkPeriod.o CardPrivateKey.o CardPublicKey.o CardRenewalIndex.o CardReplacementIndex.o CardSlotNumber.o CardSlotsStatus.o CardStructureVersion.o CardVehicleRecord.o CardVehiclesUsed.o Certificate.o CertificateContent.o CertificateHolderAuthorisation.o CertificateRequestID.o CertificationAuthorityKID.o CompanyActivityData.o CompanyActivityType.o CompanyCardApplicationIdentification.o CompanyCardHolderIdentification.o ControlCardApplicationIdentification.o ControlCardControlActivityData.o ControlCardHolderIdentification.o CurrentDateTime.o DailyPresenceCounter.o Datef.o DriverCardApplicationIdentification.o DriverCardHolderIdentification.o EntryTypeDailyWorkPeriod.o EquipmentType.o EuropeanPublicKey.o EventFaultType.o EventFaultRecordPurpose.o ExtendedSerialNumber.o FullCardNumber.o HighResOdometer.o HighResTripDistance.o HolderName.o K-ConstantOfRecordingEquipment.o KeyIdentifier.o L-TyreCircumference.o Language.o LastCardDownload.o ManualInputFlag.o ManufacturerCode.o MemberStateCertificate.o MemberStatePublicKey.o Name.o NationAlpha.o NationNumeric.o NoOfCalibrationRecords.o NoOfCalibrationsSinceDownload.o NoOfCardPlaceRecords.o NoOfCardVehicleRecords.o NoOfCompanyActivityRecords.o NoOfControlActivityRecords.o NoOfEventsPerType.o NoOfFaultsPerType.o OdometerValueMidnight.o OdometerShort.o OverspeedNumber.o PlaceRecord.o PreviousVehicleInfo.o PublicKey.o RegionAlpha.o RegionNumeric.o RSAKeyModulus.o RSAKeyPrivateExponent.o RSAKeyPublicExponent.o SensorApprovalNumber.o SensorIdentification.o SensorInstallation.o SensorInstallationSecData.o SensorOSIdentifier.o SensorPaired.o SensorPairingDate.o SensorSerialNumber.o SensorSCIdentifier.o Signature.o SimilarEventsNumber.o SpecificConditionType.o SpecificConditionRecord.o Speed.o SpeedAuthorised.o SpeedAverage.o SpeedMax.o TDesSessionKey.o TimeReal.o TyreSize.o VehicleIdentificationNumber.o VehicleRegistrationIdentification.o VehicleRegistrationNumber.o VuActivityDailyData.o VuApprovalNumber.o VuCalibrationData.o VuCalibrationRecord.o VuCardIWData.o VuCardIWRecord.o VuCertificate.o VuCompanyLocksData.o VuCompanyLocksRecord.o VuControlActivityData.o VuControlActivityRecord.o VuDataBlockCounter.o VuDetailedSpeedBlock.o VuDetailedSpeedData.o VuDownloadablePeriod.o VuDownloadActivityData.o VuEventData.o VuEventRecord.o VuFaultData.o VuFaultRecord.o VuIdentification.o VuManufacturerAddress.o VuManufacturerName.o VuManufacturingDate.o VuOverSpeedingControlData.o VuOverSpeedingEventData.o VuOverSpeedingEventRecord.o VuPartNumber.o VuPlaceDailyWorkPeriodData.o VuPlaceDailyWorkPeriodRecord.o VuPrivateKey.o VuPublicKey.o VuSerialNumber.o VuSoftInstallationDate.o VuSoftwareIdentification.o VuSoftwareVersion.o VuSpecificConditionData.o VuTimeAdjustmentData.o VuTimeAdjustmentRecord.o W-VehicleCharacteristicConstant.o WorkshopCardApplicationIdentification.o WorkshopCardCalibrationData.o WorkshopCardCalibrationRecord.o WorkshopCardHolderIdentification.o WorkshopCardPIN.o IA5String.o INTEGER.o NativeEnumerated.o NativeInteger.o asn_SEQUENCE_OF.o asn_SET_OF.o constr_CHOICE.o constr_SEQUENCE.o constr_SEQUENCE_OF.o constr_SET_OF.o OCTET_STRING.o BIT_STRING.o asn_codecs_prim.o ber_tlv_length.o ber_tlv_tag.o ber_decoder.o der_encoder.o constr_TYPE.o constraints.o xer_support.o xer_decoder.o xer_encoder.o per_support.o per_decoder.o per_encoder.o per_opentype.o -lusb -lhid CardActivityDailyRecord.o:(.data+0x1e8): undefined reference to `SET_OF_encode_uper'
CardEventData.o:(.data+0x1e8): undefined reference to `SET_OF_encode_uper'
CardFaultData.o:(.data+0x1e8): undefined reference to `SET_OF_encode_uper'
CardPlaceDailyWorkPeriod.o:(.data+0x168): undefined reference to `SET_OF_encode_uper'
CardVehiclesUsed.o:(.data+0x168): undefined reference to `SET_OF_encode_uper'
CompanyActivityData.o:(.data+0x168): more undefined references to `SET_OF_encode_uper' follow
collect2: ld returned 1 exit status
make: *** [converter] Error 1

I can't seem to find a definition fo SET_OF_encode_uper myself, so I can't really blame the linker :-).

Is there a way to overcome this problem? I do not really need a PER encoder at this stage, all I want is to decode. Can I just provide a dummy?

Ciao, MM

_______________________________________________
Asn1 mailing list
Asn1@asn1.org
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to