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).


brg/Martin
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to