JSLEE Discussions
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
How to encode extension fields
Forum Index » Rhino SLEE Discussions
Author Message
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

I need to send a few extension fields in initialDP msg. But I didn't find any reference in the scenario editor user guide about how to do the same. I tried myself but failed and got a BER error. Please help.
If you can illustrate with some example, it will be great.
oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

What is the extension field you need to send?
[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

I want to send CGI and IMSI.
oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

You must have a definition of the extension field you wish to send.
i.e. the extension code, criticality, and an ASN.1 definition of the extension value.
What are those, and what is the actual value you are trying to send?

Perhaps you could attach your scenario and outline the exact problems you're having.
[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

Please find the scenario file attached herewith.

Problem: When i load this file with CGIN connectivity pack 1.1.4, a receive a BER violation error in the values assigned to the extensions. I think that the values are supposed to be entered in some specific format. I am also attaching the error snapshot.
[Thumb - BER_error_snapshot.JPG]
 Filename BER_error_snapshot.JPG [Disk] Download
 Description
 Filesize 86 Kbytes
 Downloaded:  10 time(s)

 Filename LBS_Scenario_13.scen [Disk] Download
 Description
 Filesize 2 Kbytes
 Downloaded:  1 time(s)

vashishth


Joined: 10/02/2010 23:23:44
Messages: 30
Location: India
Offline

Hi

I also faced the same problem and did the following,

1. create an IMSIAddress object (with your required values) in a sample program.
2. get the encoded form form from this object using getEncodedForm(), which returns a byte array.
3. convert this byte array to Hex which be your VALUE.
4. put this as value in the scenario, along with suitable TAG-LENGTH prefix (hex) since it expects field in TAG-LENGTH-VALUE format.

and that solved the BER error.




Sapan
oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

Correct, the value part of the extension is an ASN.1 open type, which is expected to be BER-encoded (i.e. starting at the tag part of a tag-length-value).
The specification of the extension should include an ASN.1 structure for the value; you should BER-encode that structure and then express the result as a hex string in your scenario.

There's no direct support in the CGIN API for BER-encoding arbitrary structures, so you may need to write your own code to do this.
[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

Hi,

To get over with the BER error, i tried what you said and it worked (i.e BER error disappeared)
But when I ran the scenario (using CGIN 1.1.4), I got a mistypedArgument error.
I have attached the scenario file herewith.
I have also attached the simulator log file (taken in debug mode)
 Filename simulator.log [Disk] Download
 Description
 Filesize 68 Kbytes
 Downloaded:  3 time(s)

 Filename LBS_Scenario_9.scen [Disk] Download
 Description
 Filesize 6 Kbytes
 Downloaded:  4 time(s)

oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

You should check the logs on the remote side to see why it is rejecting the IDP. The mistypedArgument reject is just reporting that the remote node rejected an operation.

This message was edited 1 time. Last update was at 28/04/2010 22:55:38

[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

Hi Olivier,

Currently there is no info in the Rhino log. May be we need to increase the level of the logs for RA. Could you guide me how to do that.
oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

Set the tracelevel of the "slee-cgin" and "cgin-tcap" tracers of the CGIN RA entity to Finest. ("settracerlevel" via rhino-console)
[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

Hi Olivier,

I have managed to get the decoded traces which says:

2010-04-28 16:50:27.181 Finer [trace.cginra.protocol.etsi_inap_cs1] <pool-3-thread-2> Exception caught decoding operation argument of initialDP
java.lang.NoClassDefFoundError: Could not initialize class etsi.ets_300_374_1.core_inap_cs1_datatypes.ExtensionField
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.oss.metadata.TypeInfo.forName(TypeInfo.java:112)
at com.oss.metadata.TypeInfoRef.getTypeInfo(TypeInfoRef.java:62)
at com.oss.metadata.ContainerInfo.getElementType(ContainerInfo.java:91)
at com.oss.coders.ber.BerContainer.decode(BerContainer.java:116)
at com.oss.coders.ber.BerCoder.decodeValue(BerCoder.java:1278)
at com.oss.coders.ber.BerSequence.decode(BerSequence.java:218)
at com.oss.coders.ber.BerCoder.decodeValue(BerCoder.java:1278)
at com.oss.coders.ber.BerCoder.doDecode(BerCoder.java:2822)
at com.oss.coders.ber.BerCoder.decode(BerCoder.java:979)
at com.oss.asn1.Coder.decode(Coder.java:108)
at com.opencloud.slee.resources.cgin.support.AbstractProject$DecoderImpl.decodePrivileged(AbstractProject.java:258)
at com.opencloud.slee.resources.cgin.support.AbstractProject$DecoderImpl.access$300(AbstractProject.java:196)
at com.opencloud.slee.resources.cgin.support.AbstractProject$DecoderImpl$1.run(AbstractProject.java:214)
at com.opencloud.slee.resources.cgin.support.AbstractProject$DecoderImpl$1.run(AbstractProject.java:213)
at java.security.AccessController.doPrivileged(Native Method)
at com.opencloud.slee.resources.cgin.support.AbstractProject$DecoderImpl.decode(AbstractProject.java:212)
at com.opencloud.slee.resources.cgin.support.AbstractProject.decode(AbstractProject.java:79)
at com.opencloud.slee.resources.cgin.etsi_inap_cs1.codecs.InitialDP_OperationCodec.decodeArgument(InitialDP_OperationCodec.java:38)
at com.opencloud.slee.resources.cgin.etsi_inap_cs1.codecs.InitialDP_OperationCodec.decodeArgument(InitialDP_OperationCodec.java:24)
at com.opencloud.slee.resources.cgin.ra.itutcap.ITUDialogManager.onInvoke(ITUDialogManager.java:1212)
at com.opencloud.slee.resources.cgin.ra.itutcap.ITUDialogManager.onComponent(ITUDialogManager.java:1092)
at com.opencloud.slee.resources.cgin.ra.itutcap.ITUDialogManager.onBegin(ITUDialogManager.java:566)
at com.opencloud.slee.resources.cgin.ra.itutcap.ITUDialogManager.onBegin(ITUDialogManager.java:67)
at com.opencloud.slee.resources.cgin.ra.itutcap.TracingITUTcapListener.onBegin(TracingITUTcapListener.java:103)
at com.opencloud.simulator.tcap.SimITUTcapStack.onBegin(SimITUTcapStack.java:228)
at com.opencloud.simulator.tcap.transport.SimITUTcapConnection.processBegin(SimITUTcapConnection.java:806)
at com.opencloud.simulator.tcap.transport.SimITUTcapConnection.processMessage(SimITUTcapConnection.java:650)
at com.opencloud.simulator.tcap.transport.SimTcapConnection.processTcapData(SimTcapConnection.java:338)
at com.opencloud.simulator.tcap.transport.SimTcapConnection.processNewData(SimTcapConnection.java:313)
at com.opencloud.transport.Connection.onReadable(Connection.java:211)
at com.opencloud.transport.IOLoop.run(IOLoop.java:308)
at com.opencloud.transport.IOLoop.access$300(IOLoop.java:26)
at com.opencloud.transport.IOLoop$5.run(IOLoop.java:207)
at java.lang.Thread.run(Thread.java:619)

So, some decoding exception is coming. Please help.
oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

Sounds like something odd is happening there. I'll try to reproduce this myself tomorrow.
[Email]
scorpio


Joined: 09/03/2010 22:59:58
Messages: 100
Offline

Oliver,

Do u have an idea about that missing class file?

This message was edited 1 time. Last update was at 28/04/2010 23:52:27

oliver


Joined: 29/10/2008 09:36:04
Messages: 680
Location: Cambridge, UK
Offline

It's not missing, it's failing to initialize for some reason.
I will have to reproduce this locally (tomorrow - it's after midnight here) to see exactly what the problem is.
[Email]
 
Forum Index » Rhino SLEE Discussions
Go to:   
Powered by JForum 2.1.8 © JForum Team