OpenACS configuration and scripting

As first, congrats to Audrys, aka au3, OpenACS author; I played a little with OpenACS and it seems to be a really good TR-069 framework, even if in beta version.

In the last days I have found some bugs, immediately fixed by the author in the svn version; at this time (svn revision 181 and release 0.03) I suggest you to download the latest svn version and compile it (on Debian you need subversion package):

svn co http://openacs.svn.sourceforge.net/svnroot/openacs openacs
ant -f b.xml
cp dist/acs.ear /opt/jboss/server/default/deploy/

If you already have it running, be aware you need to drop db tables and lets the svn version to create them.

OpenACS exposes a javascript engine you can use to implement your configuration server logic. Of course, you need to know TR-069 (CWMP) and related Technical Reports; you can find these documents here: Broadband Forum Technical Reports

OpenACS runs the “Default” script for each Inform request it receives: in this script you can do your business and call other script.
On each script you can access objects exposed by OpenACS: you can find some information on the OpenACS wiki page on SourceForge.

You can find a Default script example at the end of this post.

Actually I’m testing OpenACS with AVM Fritz!Box Fon 7170 and they really speak the same language! Firmware upgrade and configuration changes work good, I have not yet tested parameter attributes and notification changes.

If you are interested in this matter, stay tuned! 😉

My Default script:

var i;
var sData;

sData = 'n==========================================================';
sData += 'nDeviceId:';
sData += 'n   Manufacturer: ' + cpe.Inform.DeviceId.Manufacturer;
sData += 'n   OUI: ' + cpe.Inform.DeviceId.OUI;
sData += 'n   ProductClass: ' + cpe.Inform.DeviceId.ProductClass;
sData += 'n   SerialNumber: ' + cpe.Inform.DeviceId.SerialNumber;
sData += 'nMisc:';
sData += 'n   MaxEnvelopes: ' + cpe.Inform.MaxEnvelopes;
sData += 'n   RetryCount: ' + cpe.Inform.RetryCount;
sData += 'n   CurrentTime: ' + cpe.Inform.CurrentTime;

sData += 'nEvents:' ;

for( i=0; i<=cpe.Inform.Event.length-1; i++ )
   sData += 'n   ' + cpe.Inform.Event[i].EventCode+' ['+cpe.Inform.Event[i].CommandKey + ']';

sData += 'nParams:';

for( i=0; i<=cpe.Inform.ParameterList.length-1; i++ )
   sData += 'n   ' + cpe.Inform.ParameterList[i].Name+'='+cpe.Inform.ParameterList[i].Value;

sData += 'n';
sData += 'n==========================================================';

logger( sData );

// ------------------------------------------------------------------------------
for( i=0; i<=cpe.Inform.ParameterList.length-1; i++ )
{
       switch ( cpe.Inform.ParameterList[i].Name )
       {
               case 'InternetGatewayDevice.ManagementServer.ParameterKey':
                       cpedb.ManagementServer_ParameterKey = cpe.Inform.ParameterList[i].Value;
                       break;

               case 'InternetGatewayDevice.DeviceInfo.SpecVersion':
                       cpedb.DeviceInfo_SpecVersion = cpe.Inform.ParameterList[i].Value;
                       break;

               case 'InternetGatewayDevice.DeviceInfo.HardwareVersion':
                       cpedb.DeviceInfo_HardwareVersion = cpe.Inform.ParameterList[i].Value;
                       break;

               case 'InternetGatewayDevice.DeviceInfo.SoftwareVersion':
                       cpedb.DeviceInfo_SoftwareVersion = cpe.Inform.ParameterList[i].Value;
                       break;

               case 'InternetGatewayDevice.DeviceInfo.ProvisioningCode':
                       cpedb.DeviceInfo_ProvisioningCode = cpe.Inform.ParameterList[i].Value;
                       break;

               case 'InternetGatewayDevice.ManagementServer.ConnectionRequestURL':
                       cpedb.ManagementServer_ConnectionRequestURL = cpe.Inform.ParameterList[i].Value;
                       break;

               default:
                       if( cpe.Inform.ParameterList[i].Name.indexOf( 'InternetGatewayDevice.WANDevice.' ) >= 0 )
                       {
                               cpedb.DefaultWANConnection = cpe.Inform.ParameterList[i].Name.substr( 0, cpe.Inform.ParameterList[i].Name.indexOf( '.ExternalIPAddress' ) );
                               cpedb.DefaultWANConnection_ExternalIPAddress = cpe.Inform.ParameterList[i].Value;
                       }
                       break;
       }
}
cpedb.Save()

var sEvent;
var sCommandKey;
for( i=0; i<=cpe.Inform.Event.length-1; i++ )
{
       sEvent = cpe.Inform.Event[i].EventCode;
       sCommandKey = cpe.Inform.Event[i].CommandKey;

       switch ( sEvent )
       {
               case '0 BOOTSTRAP':
                       break;

               case '1 BOOT':
                       break;

               case '2 PERIODIC':
                       break;

               case '3 SCHEDULED':
                       break;

               case '4 VALUE CHANGE':
                       break;

               case '5 KICKED':
                       break;

               case '6 CONNECTION REQUEST':
                       break;

               case '7 TRANSFER COMPLETE':
                       break;

               case '8 DIAGNOSTICS COMPLETE':
                       break;
       }
}

DoSomething();
The following two tabs change content below.
Italian, born in 1980, I started working in the IT/telecommunications industry in the late '90s; I'm now a system and network engineer with a deep knowledge of the global Internet and its core architectures, and a strong focus on network automation.

Latest posts by Pier Carlo Chiodi (see all)

60 Comments

  1. alexei says:

    What is the cpe.Inform.ParameterList.length?

  2. alexei says:

    it is array length – count of array elements?

    • pierky says:

      Yes, it is ParameterList array length.

      From TR-069:
      ParameterList – ParameterValueStruct[] – Array of name-value pairs as specified in Table 11. The Inform request contains a list of informational parameters, specific to a given type of CPE. The parameters that MUST be included in the case of an Internet Gateway Device are listed in Table 33. A CPE MAY send additional parameters as well.

      You can find more about Inform on TR-069 document at Broadband Forum Technical Reports

      Bye,

      Pierky

  3. Harry says:

    Can you send me some links/tutorials regarding the serverside javascript used in openacs.
    and also any documents regarding openacs

  4. ivory says:

    Dear pierky
    I add a default script like

    response = cpe.Download (“daCommand”, “3 Vendor Configuration File”,”http://192.168.1.1:8080/kkonf”, “”, “”,000,”user.ini”)

    But openACS server didn’t send download request to client.
    Dose the openACS server support this methods?
    Do I need to modify openACS server code?

    thanks

    ivory

    • pierky says:

      Hi Ivory,

      did you send the Connection Request to the client?

      ACSs are not supposed to send the “Download” request to clients: an ACS can ask a client to connect, when the client connects it performs some actions and it can reply to the client with the Download method. In OpenACS you can find the Connection Request in the GUI, within the CPE page (you can look for a specific CPE using its serial-number as keyword).

      Regards,

      Pierky

  5. skizzo3000 says:

    hi !
    i installed openacs but now i don’t know how to use it. I want to configure a fritz!box 7170 with this software but where can i find the list of parameters for voip settings, connection settings ecc ecc ?

    Thanks Sk3

  6. ivory says:

    Dear pierky
    Sorry to disturb you again!
    I add SSL code in my TR069 client then send inform
    RPCmethod to ACS but no response.
    dose ACS can verify SSL ?

    thanks

    ivory

  7. Amit Kumar says:

    Hi ,

    How openACS will send the connection request to CPE . is there is any script for this ?

    Thanks
    Amit

    • pierky says:

      There is a button on the web GUI of OpenACS, actually I don’t remember exactly where it is, it should be on the CPE details page.
      Please remember that scripts run when a CPE-to-ACS event triggers.
      Bye

  8. Yacine says:

    pierky said
    October 21, 2009 at 8:16 pm

    Hi Yacine, sorry, I did not understand when do you want the script to be executed. OpenACS runs “Default” script on every inform it receives; within that script you can handle many “events”. Please refer to my other post about OpenACS scripting.

    Bye
    Reply

    Hi Pierky,

    I’m sorry my first question wasn’t very clear.
    I want that the script to be executed when openACS receives an http post from CPE without an http body, without inform request, in the same session.

    In the case of MaxEnvelopes=1 we must follow this scenario(see 3.7.3 in TECHNICAL REPORT DSL Forum TR-069 CPE WAN Management Protocol):

    1.The CPE sends (http post)an Inform request in order to open the session.
    2.The ACS sends(http responce) an Inform responce and gives the MaxEnvelopes.
    3.The CPE sends http post without http body. ———> how i can launch the script ?
    4.
    5.

    see the Figure 3 in 26 page in”TECHNICAL REPORT DSL Forum TR-069 CPE WAN Management Protocol”

    • pierky says:

      The HTTP post without body is part of the previous Inform handling.
      You can implement the 3.7.3 figure 3 example in the TR-069 with a GetParameterValues in any Inform event.

      • Yacine says:

        Thanks Pierky for your response but it didn’t work.

        When CPE sends http post without body the ACS responses without body and I have this error :

        10:59:45,175 INFO [STDOUT] EVENT: 6 CONNECTION REQUEST[null]
        10:59:45,178 ERROR [STDERR] 22 oct. 2009 10:59:45 org.openacs.ACSServlet processRequestINFO: oui=00147F, sn=CP0607JT4AE, URL=http://localhost:8080/, hw=BANT-R, sw=6.1.7.2, cfg=, ProvisioningCode=All
        10:59:45,216 INFO [STDOUT] End of processing
        10:59:45,240 INFO [STDOUT] Run exception: la valeur renvoyée est incorrecte (skriptas#2)
        10:59:45,244 INFO [STDOUT] No Inform received on this session.

        so I have this scenario:
        1.The CPE sends (http post)an Inform request in order to open the session.
        2.The ACS sends(http responce) an Inform responce and gives the MaxEnvelopes=1.
        3.The CPE sends http post without http body.
        4.The ACS sends(http responce 200 OK) without http body.

        My “Default” script:

        [cut]
        .
        .
        case ‘5 KICKED’:
        break;

        case ‘6 CONNECTION REQUEST’:
        var parameters = new Array ();
        parameters[0] = ‘InternetGatewayDevice.DeviceSummary’;
        var response = cpe.GetParameterValues (parameters);
        logger (response[0].name+’=’+response[0].value);
        break;

        case ‘7 TRANSFER COMPLETE’:
        .
        .
        [cut]

    • pierky says:

      Are you using my Default script? If so, can you dump the logger( sData ) output?

      On your log I see 10:59:45,175 INFO [STDOUT] EVENT: 6 CONNECTION REQUEST[null]; maybe the script receives 6 CONNECTION REQUEST[null] as cpe.Inform.Event[i].EventCode and it doesn’t match the case ‘6 CONNECTION REQUEST’: statement…

      Can you try a simple Default script like the following?

      ———
      var parameters = new Array ();
      parameters[0] = ‘InternetGatewayDevice.DeviceSummary’;
      var response = cpe.GetParameterValues (parameters);
      logger (response[0].name+’=’+response[0].value);
      ———

      I mean without all my code, case, for…

      • Yacine says:

        Now it work well.

        The probleme it is in the http sessionid, the cpe don’t save the sessionid.

        thank you very much.

  9. Yacine says:

    Hi Pierky,

    Does the OpenACS treats the fault responses ?

    When OpenACS receives the following fault response :

    intrnl.unset.id.GetParameterValues1257435470570.29503679

    Client
    CWMP fault

    9002
    Internal error

    displays the following message :

    15:37:50,608 INFO [STDOUT] Received: GetParameterValues
    15:37:50,610 INFO [STDOUT] End of processing
    15:37:50,621 INFO [STDOUT] Request is Fault
    15:37:50,628 INFO [STDOUT] URI null
    15:37:50,629 ERROR [[ACS servlet]] “Servlet.service()” pour la servlet ACS servlet a gĂ©nĂ©rĂ© une exception
    java.lang.NullPointerException
    at org.openacs.Message.getRequestElement(Message.java:199)
    at org.openacs.message.Fault.parseBody(Fault.java:65)
    at org.openacs.Message.parse(Message.java:81)
    at org.openacs.ACSServlet.processRequest(ACSServlet.java:248)
    at org.openacs.ACSServlet.doPost(ACSServlet.java:480)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:595)
    15:38:20,592 INFO [STDOUT] RCV1: req=null
    15:38:20,594 INFO [STDOUT] Run exception: Wrapped java.lang.NullPointerException (skriptas#101)

    Thanks,

    Yacine.

    • pierky says:

      Hi Yacine, with 0.1 version I used the following code to handle errors:

      try {
        cpe.DoSomething();
      } catch (err) {
        DoSomethingWrong();
      }

      This code handled CWMP errors. Actually I don’t remember if I got Java exception as well…

  10. Yacine says:

    Hi Pierky,

    I have an other problem, cpe.SetParameterValue don’t work, here the code:
    [
    .
    .
    .
    var sEvent;
    var sCommandKey;
    for( i=0; i’+parameters[0].name+’—–‘+parameters[0].value+’—-‘);
    cpe.SetParameterValues(parameters,”abcd”);
    break;

    case ‘7 TRANSFER COMPLETE’:
    break;

    case ‘8 DIAGNOSTICS COMPLETE’:
    break;
    }
    }
    ]

    and here the erreur OpenAcs:

    Events:
    6 CONNECTION REQUEST []
    Params:
    InternetGatewayDevice.ManagementServer.ConnectionRequestURL=http://localhost:8080/
    InternetGatewayDevice.ManagementServer.ParameterKey=
    InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Version=
    InternetGatewayDevice.DeviceInfo.SpecVersion=1
    InternetGatewayDevice.DeviceInfo.SoftwareVersion=6.1.7.2
    InternetGatewayDevice.DeviceInfo.ProvisioningCode=All
    InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Description=UK Factory Defaults
    InternetGatewayDevice.DeviceInfo.HardwareVersion=BANT-R
    InternetGatewayDevice.WANDevice.ExternalIPAddress=192.168.1.1
    InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Name=Routed PPPoA on 0.38
    InternetGatewayDevice.DeviceInfo.VendorConfigFile.1.Date=Configuration modified b

    ==========================================================
    16:47:37,962 ERROR [STDERR] 9 nov. 2009 16:47:37 org.openacs.js.Script logger
    INFO: ———>DefaultWANConnection_ExternalIPAddress—–192.168.0.1—-
    16:47:37,962 INFO [STDOUT] Run exception: Wrapped java.lang.ClassCastException: org.mozilla.javascript.UniqueTag (skriptas#100)
    16:47:42,941 INFO [STDOUT] Received: null
    16:47:42,942 INFO [STDOUT] End of processing

    Can you help me?

    Thank you

    • Yacine says:

      here the script code :

      var parameters = new Array ();
      parameters[0] = {name: ‘DefaultWANConnection_ExternalIPAddress’, value:’192.168.0.1′};
      logger(‘———>’+parameters[0].name+’—–‘+parameters[0].value+’—-‘);
      cpe.SetParameterValues(parameters,”abcd”);
      break;

      • pierky says:

        I guess in the current version you have to add the “type” property, as shown in the author’s wiki page:

        parameters[2] = {name: 'InternetGatewayDevice.IPPingDiagnostics.NumberOfRepetitions', value: '2', type: 'xsd:unsignedInt'};
        cpe.SetParameterValues (parameters, "commandKey");
  11. Yacine says:

    Thanks Pierky,

    Yes we have to add the “type”!!!!

    So I think it is necessary to update this guide http://en.wikipedia.org/wiki/Javascript.

  12. Lan says:

    Hi pierky and Yacine,
    how did you tested for your script? what tool did you used?

    I can capture the files that be exchange between the ACS and CPE by Wireshark.

    thanks,
    Lan

    • pierky says:

      I used real CPEs to test scripts while I was writing them.

      • Lan says:

        Dear Pierky,
        I also used the real CPE to test script but I didn’t seen errors!

        Beside Inform method, did you write other methods, such as GetParameterValue, SetParameterValue…???

      • sindhuja says:

        Hi,

        Is that possible to redirect the cpe when the session is in progress???

        If so please guide us through it.

        bye

  13. Lan says:

    Hi Pierky,
    when all events in Inform method are empty, why the CPE can connect with OpenAcs?

  14. Skyper says:

    Hi Pierky,
    ur blog is very useful! Thanks a lot!
    I have few questions.
    In “6 connection request”, I want descript many methods: GetParameterValue, SetParameterValue, Download… Then, how does the OpenAcs start each of those methods, such as SetparameterValue or Download?
    when request is error, what does openAcs treats?

    Please reply as soon as possible!

    Thanks,

    Skyper

    • pierky says:

      It runs them sequentially as you write them.
      There are already comments from Yacine and me about error handling, please refer to them.

      • skyper says:

        Hi Pierky,
        thanks for your answer.
        Is your opinion following that :
        ….
        case ‘6 CONNECTION REQUEST’:
        {
        //setParameterValue method
        { var parameters0= new array ();

        cpe.SetParameterValues (parameters0, commandKey);
        }
        //SetParameterAttributes method
        { var parameters1 = new array ();

        cpe.SetParameterAttributes (parameters1);
        }
        ….//other method description
        }

        case ‘…’

        Then, the OpenAcs excutes sequentialy all methods in each connection???

    • pierky says:

      Yes, as far as I remember it should do that and CPE should apply changes only at the end.

      • skyper says:

        But when cpe download complete, it must inform the ACS (HoldRequest=1) with transferComplete in the same session.
        how does cpe do that?

        About error, I thought that Yacine only talk about error of Setparameter (9002 fault). what about other errors? Does the ACS excutes all errors with following code:

        try {
        cpe.DoSomething();
        } catch (err) {
        DoSomethingWrong();
        }

        Plz reply asap!
        Thanks!

    • pierky says:

      The try/catch statement is used to handle every javascript exception, so I think every CWMP error may be handled that way; of course, this is true only if OpenACS raise an exception for the error. I should check its source code but actually I’m too busy and I can’t access the testplant where I have it.

      Unfortunately I just tried the Download methods few times and I don’t know how OpenACS handles it; I’m quite sure it receives the TRANSFER COMPLETE.

  15. Skyper says:

    Hi Pierky,
    sorry to disturb you again!
    I have another question: when ACS received a Inform message that contain ‘BOOT’ eventcode, Do ACS will send Reboot request to the CPE and then, receive a InformResponse?
    Is reboot request following that:

    cpe.Reboot(“commandKey”);

  16. aurabhi says:

    As per TR-069 the ACS doesn’t send a reboot for a BOOT event.

    • au3 says:

      Why should openacs send reboot request on boot event? does not make sense. beside it would loop – booting -> reboot -> booting -> reboot

  17. skyper says:

    hi Pierky,
    I’m testing AddObject method, and it’s errors following that:

    16:54:14,718 INFO [STDOUT] Connection request START
    16:54:15,687 ERROR [STDERR] Jan 5, 2010 4:54:15 PM org.openacs.utils.Jms setupJMS
    INFO: Not clustered – Using non-HA JMS
    16:54:15,816 INFO [STDOUT] ContentType=text/xml cs=UTF-8
    16:54:15,856 WARN [EnvelopeBuilderDOM] Ignore child type: 3
    16:54:15,866 WARN [EnvelopeBuilderDOM] Ignore child type: 3
    16:54:15,873 INFO [STDOUT] Request is Inform
    16:54:15,875 INFO [STDOUT] URI null
    16:54:15,876 INFO [STDOUT] EVENT: 2 PERIODIC[null]
    16:54:15,877 INFO [STDOUT] EVENT: 6 CONNECTION REQUEST[null]
    16:54:15,882 ERROR [STDERR] Jan 5, 2010 4:54:15 PM org.openacs.ACSServlet processRequest
    INFO: oui=021018, sn=021018010001, URL=http://123.24.177.235:30005/, hw=tmp_hardware1.0, sw=091229_0011.4.02L.03.A2pB025c1.d21j2, cfg=null, ProvisioningCode=
    16:54:15,920 ERROR [STDERR] Jan 5, 2010 4:54:15 PM org.openacs.utils.Jms setupJMS
    INFO: Not clustered – Using non-HA JMS
    16:54:16,067 INFO [STDOUT] End of processing
    16:54:16,596 INFO [STDOUT] ContentType=text/xml cs=UTF-8
    16:54:16,730 INFO [STDOUT] Run exception: missing ) after argument list (skriptas#211)
    16:54:21,600 INFO [STDOUT] Received: null
    16:54:21,600 INFO [STDOUT] End of processing

    and here’s the code:

    var object_name = new Object;

    object_name=”InternetGateway.Object”;

    cpe.AddObject (object_name, “parameterKey”);

    logger (“Instance number= “+ object_name.InstanceNumber+ ” ” + “status= “object_name.InstanceNumber.Status);

    what’s wrong? Plz help me!

    And, when the script includes many methods, they aren’t executed sequently. why does server first method?
    plz reply asap! thnx!

    • au3 says:

      maybe it only looks so, but quotes in “cpe.AddObject (object_name, “parameterKey”);” are different and not “

  18. John says:

    Hi

    For setParameterAttributes i am using this script
    var parameters = new String ();
    parameters[0]=new Object;
    parameters[0].Name=’InternetGatewayDevice.DeviceInfo.SerialNumber’;
    //logger (parameters[0].Name);
    parameters[0].NotificationChange=true;
    //logger(parameters[0].NotificationChange);
    parameters[0].Notification=2;
    //logger(parameters[0].Notification);
    parameters[0].AccessListChange=true;
    //logger(parameters[0].AccessListChange);
    parameters[0].AccessList= new String ();
    parameters[0].AccessList[0]=’subscriber’;
    //logger(parameters[0].AccessList[0]);
    cpe.SetParameterAttributes (parameters);

    but openAcs is throwing the exception and not generating the soap message :

    15:49:18,501 INFO [STDOUT] Run exception: Wrapped java.lang.ClassCastException: java.lang.Integer (skriptas#116)
    15:49:23,459 INFO [STDOUT] Received: null
    15:49:23,459 INFO [STDOUT] End of processing

    Can anyone help me out on this .

    Thanks
    John

    • pierky says:

      Hi,

      please try to use only string values:

      parameters[0].NotificationChange='true';
      parameters[0].Notification='2';
      parameters[0].AccessListChange='true';
  19. John says:

    Hi ,

    I am still facing the same issue .

    var parameters = new String ();
    parameters[0]=new Object;
    parameters[0].Name=’InternetGatewayDevice.DeviceInfo.SerialNumber’;
    logger(‘came’);
    logger (parameters[0].Name);
    parameters[0].NotificationChange=’true’;
    logger(parameters[0].NotificationChange);
    parameters[0].Notification=’2′;
    logger(parameters[0].Notification);
    parameters[0].AccessListChange=’true’;
    logger(parameters[0].AccessListChange);
    parameters[0].AccessList= new String ();
    parameters[0].AccessList[0]=’subscriber’;
    logger(parameters[0].AccessList[0]);
    cpe.SetParameterAttributes (parameters);

    exception is :

    12:06:35,087 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: came
    12:06:35,087 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: InternetGatewayDevice.DeviceInfo.SerialNumber
    12:06:35,088 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: true
    12:06:35,088 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: 2
    12:06:35,088 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: true
    12:06:35,088 ERROR [STDERR] 18 Jan, 2010 12:06:35 PM org.openacs.js.Script logger
    INFO: subscriber
    12:06:35,089 INFO [STDOUT] Run exception: Wrapped java.lang.ClassCastException: java.lang.String (skriptas#117)
    12:06:40,041 INFO [STDOUT] Received: null
    12:06:40,042 INFO [STDOUT] End of processing

    Thanks
    John

  20. john says:

    Hi ,

    I am not able to open openAcs using https . can you please let me know the openSSL package which i have to install .
    I there is any specific procedure to install the same in debian

    Thanks
    John

  21. nak says:

    Hi all,

    I am confused with different databases in openacs.Can u please calrify what are
    1. cpedb (where the properties saves when cpedb.save()),
    2. mysql database created as in this post
    3. the database reffered as ‘db’ in this http://sourceforge.net/apps/mediawiki/openacs/index.php?title=JavaScript
    4. To what database Openacs point to when find cpe clicked in GUI

    thnx
    thnx

    • pierky says:

      Hi Nak,

      as far as I remember, cpedb is the props blob field of the current CPE (once identified by OpenACS). It’s a field of the CPEs table on the backend database, the one you asked for in point n. 2 (mysql database created as in this post).

      In the version I used there was not a db object, but as I can see on the support page it seems you can use it with any datasource you want; you just have to define datasources you want to use in the openacs-ds.xml file.

      When I used it there was only 1 database, used for everything.

  22. Hi Pierky

    can you help me to write script (openacs) who can execute this methode (getparameterattribute)

    thanks

  23. Chris says:

    Dear Pierky,

    After CPE sent out empty http request, ACS sent back empty response.
    I have no idea what to do.
    Please help me to get right answer from ACS.

    Thanks,

    (I’m running acs on jboss4-2.2 with mysql)
    —————————

    :

    2010-09-29 15:28:03,525 INFO [STDOUT] EVENT: 6 CONNECT REQUEST[null]
    2010-09-29 15:28:03,535 ERROR [STDERR] Sep 29, 2010 3:28:03 PM org.openacs.ACSServlet processRequest
    INFO: oui=000B82, sn=00100300cl0100100000000088880013, URL=http://172.18.32.237:7547, hw=GXP2120, sw=0.1.1.11, cfg=null, ProvisioningCode=null
    2010-09-29 15:28:03,548 INFO [STDOUT] End of processing
    2010-09-29 15:28:03,561 INFO [STDOUT] CLIENT: Creating cosumer: JMSCorrelationID=’ID:intrnl.unset.id.GetParameterValues1285802883558.11015333′ OR JMSCorrelationID=’intrnl.unset.id.GetParameterValues1285802883558.11015333”
    2010-09-29 15:28:03,564 INFO [STDOUT] ContentType=null cs=UTF-8
    2010-09-29 15:28:03,566 INFO [STDOUT] No Inform received on this session.

    —————–

    :

    var parameters = new Array ();
    parameters[0] = ‘InternetGatewayDevice.DeviceSummary’;
    var response = cpe.GetParameterValues (parameters);
    logger (response[0].name+’=’+response[0].value);

  24. Sfrangebob says:

    Hi pierky very good job.
    I am new in tr-069. I have done a lot of research on this topic and I have found your webiste.

    I have followed your tutorial and I have succesfully set up the jboss with openacs.

    But I haven’t understand where should I put the default script.
    Can I use your default script in order to test the CPE connectivity?

    In which way can I see the CPE logging into the openacs server?

    With openacs I haven’t to set up the send/receive soap comunication in the acs server? The acs server do the comunciations step?

    I have only to insert the script with the functions I need.. Is it correct?

    Thanks a lot.

    Are you italian? can we speak in italian in some other place or there?

    • pierky says:

      Hi Sfrangebob,

      Can I use your default script in order to test the CPE connectivity?

      yes, you can. I don’t follow OpenACS releases anymore, so I can’t tell you how to configure the default script in the latest versions; when I used it I put that script in the “Scripts” section of the configuration web panel. I made a new script and named it “default” (lower case).

      In which way can I see the CPE logging into the openacs server?

      As far as I remember I used the JBoss log file, where OpenACS wrote debug lines such as the “logger” output.

      With openacs I haven’t to set up the send/receive soap comunication in the acs server? The acs server do the comunciations step?

      Yes, the ACS server does this job for you. You just have to call javascript methods and handle the events.

      I’m Italian, but even if my English is quite poor I prefer to not speak Italian here in the blog, in order to allow more people to get these contents.

      Bye

  25. Mario says:

    Hello Pierky and others,

    thangs for this blog it helps a lot with OpenACS. I am also “fighting” with this topic. I have two questions related to this topic.

    1.)I dont get really the difference between cpedb and cpe? When do I use the one, when do I use the other? I read the short definition and tried to understand. Can I access with cpedb the properties of a CPE without the Tr69-syntax? That means just like they are in the settings of the CPE?

    I understood that with cpe you can call different methods…but for variables and properties what is the difference?

    2.) It is mentioned that everytime any request comes from the CPE the script is executed. Therefore, for testing I just added to the default script:

    cpe.reboot;

    Yes, makes no sense, but for testing ok. After restarting the cpe it connects to the server but does not reboot. The log just says:

    2010-11-04 12:04:18,897 INFO [STDOUT] Received: null
    2010-11-04 12:04:18,897 INFO [STDOUT] End of processing

    Why the cpe does not reboot? Where can I find which methods are allowed for which requests?

    Thanks a lot Mario

    • Mario says:

      wrong syntax, I put : cpe.Reboot (‘CommandKey’);

    • pierky says:

      Hi Mario,

      I no longer work with OpenACS for so long, so what I write here is based on my experience on old releases, maybe something changed in the while.

      The cpe object contains TR-069 methods and properties, while cpedb is simply a kind of dictionary where you can store your own properties related to the CPE identified by the serial-number used in the transaction. The “param=value” pairs are stored in the backend database, in a record which represents the CPE. They are all stored in a “text” field. You may use and fill this field from your own application in order to instruct OpenACS about thinks to do with CPEs.

      if( cpedb.CustomerName == ‘Smith’ )
      {
      do something particular here…
      }

      For your second question I have no clue about what happened, sorry.

      Pierky

  26. Beeru says:

    Hi Yacine,

    I am facing the same problem wat u faced previously.. that is after sending the empty HTTP POST without the HTTP body.. I am getting the following exception at the server side..

    18:56:14,937 INFO [STDOUT] URI null
    18:56:14,937 INFO [STDOUT] cwmp NS =urn:dslforum-org:cwmp-1-0
    18:56:14,938 INFO [STDOUT] EVENT: 0 BOOT STRAP[null]
    18:56:14,938 INFO [STDOUT] EVENT: 1 BOOT[null]
    18:56:14,939 ERROR [STDERR] 25 Mar, 2011 6:56:14 PM org.openacs.ACSServlet log
    INFO: Request is Inform
    18:56:14,954 ERROR [STDERR] 25 Mar, 2011 6:56:14 PM org.openacs.ACSServlet log
    INFO: oui=000000 sn=12345 oui=000000, sn=12345, URL=http://localhost:7547/, hw=Linux VDSL, sw=0.0.1, cfg=null, ProvisioningCode=
    18:56:15,013 INFO [STDOUT] End of processing
    19:02:56,281 ERROR [[ACS servlet]] Servlet.service() for servlet ACS servlet threw exception
    java.lang.NullPointerException
    at org.openacs.ACSServlet.RunConfigurator(ACSServlet.java:611)
    at org.openacs.ACSServlet.processRequest(ACSServlet.java:501)
    at org.openacs.ACSServlet.doPost(ACSServlet.java:588)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:636)

    Please can u tell me how to save the sessionid in the client side and put the same into the HTTP header of the empty POST method.

  27. ambika says:

    Hi pierky ,

    I have installed the 0.4 ear of openacs server in jboss 4.2.3 and everything works fine.

    But the problem I face now is only the first time i start the client , the default script is hit.after that how many ever times i try to start the client, I get the inform and informresponse xml on console, but default script is not hit.(i am using modus-clientTR69 as client)

    Can you please help me understand why this happens.

    If i restart the server, and then run the client, default script is hit.

    I am new to TR069 so please help.

    thanks
    Ambika