• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Common Events of the Wi-Fi Subsystem
2This document lists the common system events provided by the Wi-Fi subsystem to applications. Applications can use [APIs](../js-apis-commonEventManager.md) to subscribe to common system events.
3
4## COMMON_EVENT_WIFI_POWER_STATE
5Indicates that the Wi-Fi state has changed, for example, enabled or disabled.
6
7- Value: usual.event.wifi.POWER_STATE
8- Required subscriber permissions: none
9
10When the Wi-Fi state changes, the event notification service is triggered to publish this event.
11
12## COMMON_EVENT_WIFI_SCAN_FINISHED
13Indicates that the Wi-Fi access point has been detected and proven to be available.
14
15- Value: usual.event.wifi.SCAN_FINISHED
16- Required subscriber permissions: ohos.permission.LOCATION
17
18When a Wi-Fi access point is detected and proven to be available, the event notification service is triggered to publish this event.
19
20## COMMON_EVENT_WIFI_SCAN_STATE
21Indicates that the Wi-Fi access point state has changed.
22
23- Value: usual.event.wifi.SCAN_STATE
24- Required subscriber permissions: ohos.permission.LOCATION
25
26When the Wi-Fi access point state changes, the event notification service is triggered to publish this event.
27
28## COMMON_EVENT_WIFI_RSSI_VALUE
29Indicates that the Wi-Fi signal strength (RSSI) has changed.
30
31- Value: usual.event.wifi.RSSI_VALUE
32- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
33
34When the Wi-Fi signal strength (RSSI) changes, the event notification service is triggered to publish this event.
35
36## COMMON_EVENT_WIFI_CONN_STATE
37Indicates that the Wi-Fi connection state has changed.
38
39- Value: usual.event.wifi.CONN_STATE
40- Required subscriber permissions: none
41
42When the Wi-Fi connection state changes, the event notification service is triggered to publish this event.
43
44## COMMON_EVENT_WIFI_HOTSPOT_STATE
45Indicates that the Wi-Fi hotspot state has changed, for example, enabled or disabled.
46
47- Value: usual.event.wifi.HOTSPOT_STATE
48- Required subscriber permissions: none
49
50When the Wi-Fi hotspot state changes, the event notification service is triggered to publish this event.
51
52## COMMON_EVENT_WIFI_AP_STA_JOIN
53Indicates that a client has joined the Wi-Fi hotspot of the current device.
54
55- Value: usual.event.wifi.WIFI_HS_STA_JOIN
56- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
57
58When a client joins the Wi-Fi hotspot of the current device, the event notification service is triggered to publish this event.
59
60
61## COMMON_EVENT_WIFI_AP_STA_LEAVE
62Indicates that a client has disconnected from the Wi-Fi hotspot of the current device.
63
64- Value: usual.event.wifi.WIFI_HS_STA_LEAVE
65- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
66
67When a client is disconnected from the Wi-Fi hotspot of the current device, the event notification service is triggered to publish this event.
68
69## COMMON_EVENT_WIFI_MPLINK_STATE_CHANGE
70Indicates that the state of MPLINK (an enhanced Wi-Fi feature) has changed.
71
72- Value: usual.event.wifi.mplink.STATE_CHANGE
73- Required subscriber permissions: ohos.permission.MPLINK_CHANGE_STATE
74
75When the state of MPLINK (an enhanced Wi-Fi feature) changes, the event notification service is triggered to publish this event.
76
77## COMMON_EVENT_WIFI_P2P_CONN_STATE
78Indicates that the Wi-Fi P2P connection state has changed.
79
80- Value: usual.event.wifi.p2p.CONN_STATE_CHANGE
81- Required subscriber permissions: ohos.permission.GET_WIFI_INFO and ohos.permission.LOCATION
82
83When the Wi-Fi P2P connection state changes, the event notification service is triggered to publish this event.
84
85## COMMON_EVENT_WIFI_P2P_STATE_CHANGED
86Indicates that the Wi-Fi P2P state has changed, for example, enabled or disabled.
87
88- Value: usual.event.wifi.p2p.STATE_CHANGE
89- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
90
91When the Wi-Fi P2P state changes, the event notification service is triggered to publish this event.
92
93## COMMON_EVENT_WIFI_P2P_PEERS_STATE_CHANGED
94Indicates that the state of the Wi-Fi P2P peer device has changed.
95
96- Value: usual.event.wifi.p2p.DEVICES_CHANGE
97- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
98
99When the state of the Wi-Fi P2P peer device changes, the event notification service is triggered to publish this event.
100
101## COMMON_EVENT_WIFI_P2P_PEERS_DISCOVERY_STATE_CHANGED
102Indicates that the Wi-Fi P2P discovery state has changed.
103
104- Value: usual.event.wifi.p2p.PEER_DISCOVERY_STATE_CHANGE
105- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
106
107When the Wi-Fi P2P discovery state changes, the event notification service is triggered to publish this event.
108
109## COMMON_EVENT_WIFI_P2P_CURRENT_DEVICE_STATE_CHANGED
110Indicates that the state of the Wi-Fi P2P local device has changed.
111
112- Value: usual.event.wifi.p2p.CURRENT_DEVICE_CHANGE
113- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
114
115When the state of the Wi-Fi P2P local device changes, the event notification service is triggered to publish this event.
116
117## COMMON_EVENT_WIFI_P2P_GROUP_STATE_CHANGED
118Indicates that the Wi-Fi P2P group information has changed.
119
120- Value: usual.event.wifi.p2p.GROUP_STATE_CHANGED
121- Required subscriber permissions: ohos.permission.GET_WIFI_INFO
122
123When the Wi-Fi P2P group information changes, the event notification service is triggered to publish this event.
124