I have this PDU defenition (and coding is Unaligned PER).
CONNECTION-REQUEST ::= SEQUENCE { module-id INTEGER(0..4294967295), c-id-1 INTEGER(0..4294967295), r-id-1 INTEGER(0..4294967295), c-id-2 INTEGER(0..4294967295), r-id-2 INTEGER(0..4294967295), c-id-3 INTEGER(0..4294967295), r-id-3 INTEGER(0..4294967295), c-id-4 INTEGER(0..4294967295), r-id-4 INTEGER(0..4294967295), ue-context INTEGER(0..4294967295), pdu-type INTEGER(0..4294967295), direction INTEGER(0..4294967295), message-length INTEGER(0..4294967295), message-contents-ref INTEGER(0..4294967295) }
And receive this PDU. 0000000000000BC3000000E6FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000001CA000000040000000000000015534894B8
This is how I would think the PDU should be de-coded. MODULE_ID 00000000 C_ID_1 00000BC3 R_ID_1 000000E6 C_ID_2 FFFFFFFF R_ID_2 FFFFFFFF C_ID_3 FFFFFFFF R_ID_3 FFFFFFFF C_ID_4 FFFFFFFF R_ID_4 FFFFFFFF UE_CONTEXT 000001CA PDU_TYPE 00000004 MESSAGE_DIRECTION 00000000 MESSAGE_LENGTH 00000015 MESSAGE_CONTENTS_REF 534894B8
As you can se 32 bit would be alocated to each of the parameter.
However when I run it throug my tools I get this.
CONNECTION-REQUEST SEQUENCE [fieldcount (not encoded) = 14] module-id INTEGER [length = 1.0] 0 c-id-1 INTEGER [length = 1.0] 0 r-id-1 INTEGER [length = 1.0] 0 c-id-2 INTEGER [length = 1.0] 195 r-id-2 INTEGER [length = 1.0] 0 c-id-3 INTEGER [length = 1.0] 230 r-id-3 INTEGER [length = 4.0] 4294967295 c-id-4 INTEGER [length = 4.0] 4294967295 r-id-4 INTEGER [length = 4.0] 4294967295 ue-context INTEGER [length = 4.0] 4294967295 pdu-type INTEGER [length = 4.0] 4294967040 message-direction INTEGER [length = 1.0] 1
As you can se the length for the first 6 parameters is only 8 bits each (not as expected 32 bits). Since I belive my tool more than my knowledge in ASN.1 I must have missunderstud something about howe the bit-packing is handled in this senario. But I can't figure out what. And also how can I rewrite the ASN.1 so it suites my need (that each parameter should be 32 bit wide).
Dear Mr. Andersson:
You are correct in your interpretation. The decoding of your hex data would, as you expected, be
value CONNECTION-REQUEST ::=
{
module-id 0,
c-id-1 3011,
r-id-1 230,
c-id-2 4294967295,
r-id-2 4294967295,
c-id-3 4294967295,
r-id-3 4294967295,
c-id-4 4294967295,
r-id-4 4294967295,
ue-context 458,
pdu-type 4,
direction 0,
message-length 21,
message-contents-ref 1397265592
}I can only suggest that you have set something incorrectly when you used your tools.
===================================================================== Conrad Sigona Voice Mail : 1-732-302-9669 x400 OSS Nokalva Fax : 1-614-388-4156 [EMAIL PROTECTED] My direct line : 1-315-845-1773 _______________________________________________ ASN1 mailing list [email protected] http://lists.asn1.org/mailman/listinfo/asn1
