Introduction :

Websocket based protocol hence bi-directional asynchronous communication is possible between gateway and WEBPA Server in real-time. This is similar to SNMP-PA and TR069-PA.

Cloud PA will be implemented as a RDK-B component which would register with RDKB-CR (Component Registry). Server PA would act like an interface between Cloud UI and RDK-B stack for faster real time communication. Persistent websocket connection is established between Cloud PA and Server PA during the client boot up. This would eliminate initial connection handshake overhead but would have an impact on the scalability aspects on the server side.

Data communication and messaging format will be based on JSON format.

Curl Commands :

              Below data needs to be furnished in the Curl Get & Set commands

               URL: CommunityWebpaserverurl              

               MAC: 080027D7C5A7 (eth0 MAC of Emulator/erouter0  MAC of RPI )

               SECRET TOKEN: Needs to be generated on daily basis 

GET Command ExampleGet Request in Console to get RadioNumberofEntries

          Curl -X GET   'URL/api/v2/device/mac:DEVICE MAC/config?names=Device.WiFi.RadioNumberOfEntries' -H 'authorization: Bearer SECRET TOKEN'
          Curl -X GET   'URL/api/v2/device/mac:DEVICE MAC/config?names=Device.WiFi.SSID.10001.SSID' -H 'authorization: Bearer SECRET TOKEN'


Output Of the above command in Console



 {"parameters":[{"name":"Device.WiFi.RadioNumberOfEntries","value":"2","dataType":2,"parameterCount":1,"message":"Success"}],"statusCode":200}
 {"parameters":[{"name":"Device.WiFi.SSID.10001.SSID","value":"RDKB_EMU-2.4G","dataType":0,"parameterCount":1,"message":"Success"}],"statusCode":200}

               

SET Command Example : Set Request in Console to set Wifi SSID for Privatewifi 2.4Ghz


curl -X PATCH     URL/api/v2/device/mac:DEVICE MAC/config -d '{"parameters": [ {"dataType": 0, "name": "Device.WiFi.SSID.10001.SSID", "value": "Testing"}]}' -H 'authorization: Bearer SECRETTOKEN'
curl -X PATCH     URL/api/v2/device/mac:DEVICE MAC/config -d '{"parameters": [ {"dataType": 3, "name": "Device.WiFi.Radio.10000.X_CISCO_COM_ApplySetting", "value": "true"}]}' -H 'authorization: Bearer SECRET TOKEN'      


 
Output of the above command in Console :


 {"parameters":[{"name":"Device.WiFi.SSID.10001.SSID","message":"Success"}],"statusCode":200}  
{"parameters":[{"name":"Device.WiFi.Radio.10000.X_CISCO_COM_ApplySetting","message":"Success"}],"statusCode":200}


Sample Success & Failure Parameters Response in WebPA Server

{

          "parameters": [

            {

              "name": "Device.X_COM",

              "value": "Low",

                 “status”:”Invalid Parameter Name”

            },

            {

              "name": "Device.Radio.2.Status",

              "value": "Enable",

                 “status”:”Read only parameter”

            },

            {

              "name": "Device.XHOSTS.X_CISCO_COM_ConnectedDeviceNumber",

              "value": "0",

             “status”:”Success”

            },

          ],     

}


  • No labels