Hi all,
I'm trying to write layer 3 GSM messages based on the 3GPP TS 04.80.
In Annex A, there are a set of ASN.1 SS Protocols that I can use to generate layer 3 messages.
I've been having a few problems, trying to work out how certain ASN1 elements work.
1) I'm not sure how to approach CHOICE elements.
Sometimes I think I should use the tag value of the chosen element for the CHOICE and a length value of whole of the chosen element.(When the chosen element is SEQUENCE)
Other times it seems that the CHOICE element shouldn't have it's own tag or length values. (When the chosen element is NULL, INTEGER, OCTET STRING)
2) Is an element with zero length always a NULL type or can other types have zero length?
The problems I am having are with the following examples
Facility Invoke=NotifySS(ss-code=CNAP, nameUnavailable)
Should this be 30 09 81 01 19 b4 04 80 02 82 00 (with callingName choice tag/le!
ngth)
or 30 07 81 01 19 b4 02 82 00 (without callingName choice tag/length)
notifySS OPERATION
ARGUMENT
notifySS-Arg SEQUENCE {
ss-Code [1] IMPLICIT OCTET STRING ( SIZE (1 ) ) OPTIONAL,
......
nameIndicator [20] IMPLICIT SEQUENCE {
callingName [0] CHOICE {
namePresentationAllowed [0] IMPLICIT SEQUENCE {
&!
nbsp; dataCodingScheme [0] IMPLICIT OCTET STRING ( SIZE (1 ) ),
lengthInCharacters [1] IMPLICIT INTEGER,
nameString [2] IMPLICIT OCTET STRING ( SIZE (1 .. 160 ) ),
... },
presentationRestricted [1] IMPLICIT NULL,
nameUnavailable &nb!
sp; [2] IMPLICIT NULL,
namePresentationRestricted [3] IMPLICIT SEQUENCE {
dataCodingScheme [0] IMPLICIT OCTET STRING ( SIZE (1 ) ),
lengthInCharacters [1] IMPLICIT INTEGER,
nameString [2] IMPLICIT OCTET STRING ( SIZE (1 .. 160 ) ),
... }} OPTIONAL,
... } OPTIONAL!
,
The other example is Facility (ReturnResult=interrogateSS(ss-Status=12)
Should this be 80 03 80 01 0C (with interrogateSS-Res tag/length)
or 80 01 0C (without interrogateSS-Res tag/length)
RESULT
interrogateSS-Res CHOICE {
ss-Status [0] IMPLICIT OCTET STRING ( SIZE (1 ) ),
basicServiceGroupList [2] IMPLICIT SEQUENCE ( SIZE (1 .. 13 ) ) OF
CHOICE {
bearerService [2] IMPLICIT OCTET STRING ( SIZE (1 ) ),
&n!
bsp; teleservice [3] IMPLICIT OCTET STRING ( SIZE (1 ) )},
....
}
.......
}
Thanks for any help you can offer
Paul
With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs
