ln-capacitor-wifi
TypeScript icon, indicating that this package has built-in type declarations

0.3.0-beta • Public • Published

ln-capacitor-wifi

Connect to Wifi through your capacitor plugin. Good for IoT device connections.

Install

npm install ln-capacitor-wifi
npx cap sync

API

scanWifi()

scanWifi() => Promise<ScanWifiResult>

Returns: Promise<ScanWifiResult>


getCurrentWifi()

getCurrentWifi() => Promise<GetCurrentWifiResult>

Returns: Promise<GetCurrentWifiResult>


connectToWifiBySsidAndPassword(...)

connectToWifiBySsidAndPassword(connectToWifiRequest: ConnectToWifiRequest) => Promise<ConnectToWifiResult>
Param Type
connectToWifiRequest ConnectToWifiRequest

Returns: Promise<ConnectToWifiResult>


connectToWifiBySsidPrefixAndPassword(...)

connectToWifiBySsidPrefixAndPassword(connectToWifiPrefixRequest: ConnectToWifiPrefixRequest) => Promise<ConnectToWifiResult>
Param Type
connectToWifiPrefixRequest ConnectToWifiPrefixRequest

Returns: Promise<ConnectToWifiResult>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


disconnectAndForget()

disconnectAndForget() => Promise<void>

Interfaces

ScanWifiResult

Prop Type
wifis WifiEntry[]

WifiEntry

Prop Type
bssid string
capabilities WifiCapability[]
ssid string
level number
isCurrentWifi boolean

GetCurrentWifiResult

Prop Type
currentWifi WifiEntry

ConnectToWifiResult

Prop Type
wasSuccess true
wifi WifiEntry

ConnectToWifiRequest

Prop Type
ssid string
password string

ConnectToWifiPrefixRequest

Prop Type
ssidPrefix string
password string

PermissionStatus

Prop Type
LOCATION PermissionState
NETWORK PermissionState

Type Aliases

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Enums

WifiCapability

Members Value
WPA2_PSK_CCM 'WPA2-PSK-CCM'
RSN_PSK_CCMP 'RSN-PSK-CCMP'
RSN_SAE_CCM 'RSN-SAE-CCM'
WPA2_EAP_SHA1_CCM 'WPA2-EAP/SHA1-CCM'
RSN_EAP_SHA1_CCMP 'RSN-EAP/SHA1-CCMP'
ESS 'ESS'
ES 'ES'
WP 'WP'

SpecialSsid

Members Value
HIDDEN '[HIDDEN_SSID]'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.3.0-beta12latest

Version History

VersionDownloads (Last 7 Days)Published
0.3.0-beta12
0.2.200
0.2.190
0.2.180
0.2.170
0.2.160
0.2.150
0.2.141
0.2.130
0.1.130
0.0.130
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20

Package Sidebar

Install

npm i ln-capacitor-wifi

Weekly Downloads

13

Version

0.3.0-beta

License

MIT

Unpacked Size

77.1 kB

Total Files

33

Last publish

Collaborators

  • lindsor