Captive Portal

Created on June 21, 2022

Overview

  • Captive portal is part of onboarding process which is presented to user once device is activated.
  • It allows user to configure his/her WiFi credentials to be personalized which user can remember. It is presented to user if user does factory reset too.
  • It is presented to user if user does factory reset too.
  • On fresh boot-up and factory-reset, Captive Portal prompts to change the default ssid name and password for browsing on connected client’s through Gateway network

  • On fresh boot-up and factory-reset,, anything user tries in browser will redirect to local captive portal

     https://<LAN IP >/captiveportal.php

Code Flow

 The below diagram depicts the captive portal flow via CcspPandM module.

 The below diagram depicts the captive portal flow via CcspWifiAgent module.

Objects

MODULE

XML file

PARAMETERS

CcspPandM


TR181-USGv2.XML

Device.DeviceInfo.X_RDKCENTRAL-COM_CaptivePortalEnable

Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi

CcspWiFiAgent

TR181-WiFi-USGv2.XML




Device.WiFi.SSID.1.SSID

Device.WiFi.SSID.2.SSID

Device.WiFi.AccessPoint.1.Security.KeyPassphrase

Device.WiFi.AccessPoint.2.Security.KeyPassphrase

Supported Languages

  • Currently the supported languages are “English” , “French”
  • The default language is “eng”

  • The default language will be obtained as a string through “Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.RDKB_UIBranding.DefaultLanguage”.

Trouble Shooting

  • During any captive portal issues, verify the below commands .

syscfg get redirection_flag

To get value of redirection_flag (true/false)

root@RaspberryPi-Gateway:~# syscfg get redirection_flag
true

          

 syscfg get HTTPS_Server_IP

To get HTTPS_Server_IP to which it is connected.

root@RaspberryPi-Gateway:~# syscfg get HTTPS_Server_IP
10.0.0.1

 

 syscfg get PartnerID

To get partern id of syndication partners

root@RaspberryPi-Gateway:~# syscfg get PartnerID
RDKM


 ifconfig erouter0 , brlan0

root@RaspberryPi-Gateway:~# ifconfig erouter0
erouter0  Link encap:Ethernet  HWaddr B8:27:EB:50:C1:CF
          inet addr:192.168.0.4  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fe50:c1cf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:238 errors:0 dropped:0 overruns:0 frame:0
          TX packets:276 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:38241 (37.3 KiB)  TX bytes:34078 (33.2 KiB)

root@RaspberryPi-Gateway:~# ifconfig brlan0
brlan0    Link encap:Ethernet  HWaddr B8:27:EB:05:94:9A
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::e862:39ff:fe51:dde7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:3811 (3.7 KiB)


dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi

root@RaspberryPi-Gateway:~#  dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi
Execution succeed.
Parameter    1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_ConfigureWiFi
               type:       bool,    value: false


 dmcli eRT getv  Device.DeviceInfo.X_RDKCENTRAL-COM_CaptivePortalEnable

root@RaspberryPi-Gateway:~#  dmcli eRT getv  Device.DeviceInfo.X_RDKCENTRAL-COM_CaptivePortalEnable
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.pam): Device.DeviceInfo.X_RDKCENTRAL-COM_CaptivePortalEnable
Execution succeed.
Parameter    1 name: Device.DeviceInfo.X_RDKCENTRAL-COM_CaptivePortalEnable
               type:       bool,    value: true


ps | grep lighttpd // Lighttpd process should be running

root@RaspberryPi-Gateway:~# ps | grep lighttpd
 3562 root       0:00 lighttpd -f /var/lighttpd.conf
12172 root       0:00 grep lighttpd





Go To Top