RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
This document describes the Wifi Establishment in Thunder images.This can be achieved by using NetworkControl plugin and Netsrvmgr component.Here Networkcontrol plugin is used for IP configurations as part of the WPEFramwork infrastructure and Netsrvmgr component is used for Managing the Wi-Fi network by connecting to AP (Access Point) and provide the notification to the application. Generally it is called as Wi-Fi Network Manager.
$ repo init -u https://code.rdkcentral.com/r/manifests -m rdkv-asp-nosrc.xml -b thunder
$ repo sync -j4 --no-clone-bundle
$ source meta-cmf-raspberrypi/setup-environment
select meta-cmf-raspberrypi/conf/machine/raspberrypi-rdk-hybrid-thunder.conf
$ bitbake rdk-generic-hybrid-thunder-image
For establishing the wifi in Thunder image we need two things one is Networkcontrol plugin and other is Netsrvmgr. The Network Control plugin provides functionality for network interface management. Networkcontrol has mainly two properties which are Network and up. Network is used for Provides access to the current network information and up is used for Provides access to the interface up status.This plugin is designed to be loaded and executed within the Thunder framework.We can enable or disable Networkcontrol Plugin by using UI. And Netsrvmgr has 3 major functionalities like wifi,moca,route.Here we will discuss about wifi .This will takes some responsibilities likedetect the Network interfaces dynamically , send notifications to subscribers and Setup and update the network routes based on priorities, wifi connection status, availability, etc.we can provide ssid and password details in /opt/wifi/wpa_supplicant.conf.After reboot the box we can see the wifi connection in raspberry pi .we can verify this by using the netsrvmgr.service.
Note:Need to add below line in /opt/wifi/wpa_supplicant.conf before testing the wifi functionality.
ctrl_interface_group=0
network={
ssid=""
psk=""
}
Example:
journalctl -x -u wpeframework
Logs should be like this:
n/WPEFramework[215]: [Thu, 28 Nov 2019 14:38:12 ]:[NetworkControl.cpp:143]: Startup: Interface [wlan0] activated, DHCP request issued
n/WPEFramework[215]: [Thu, 28 Nov 2019 14:38:12 ]:[NetworkControl.cpp:143]: Startup: Interface [eth0] activated, DHCP request issued
Logs should be like this
Nov 28 14:38:18 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Inside wifi_event_monitor_thread
Nov 28 14:38:19 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Scanning results received
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Authentication completed successfully and data connection
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # wifi_event_monitor_thread <=> Waiting lock <=> held by:
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # New lock acquired by :wifi_event_monitor_thread
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # bssid=00:7f:28:67:d9:0f
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # ssid=RDK
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Successfully connected to AP:RDK
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Released lock: wifi_event_monitor_thread
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # wifi_event_monitor_thread <=> Waiting lock <=> held by:
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # New lock acquired by :wifi_event_monitor_thread
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # Released lock: wifi_event_monitor_thread
Nov 28 14:38:21 raspberrypi-rdk-hybrid-thunder netsrvmgr[1220]: WIFI-HAL # The SSID is:RDK
Need to give details of the wifi interface like ssid and psk in /opt/wifi/wpa_supplicant.conf file and remove Ethernet interface and do reboot.After that it will show the wifi ip in RDKSplashscreen.
https://wiki.rdkcentral.com/display/RDK/netsrvmgr
Contact | Organization | Phone | Role | |
Rajkumar Narayanan | LTTS | Nil | rajkumar.narayanan@ltts.com | Program Manager |