Skip to content

friendlyuis/react-native-iot-wifi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-iot-wifi

Wifi configuration. This library was written to config iot devices. With iOS 11 Apple introduced NEHotspotConfiguration class for wifi configuration. Library supports same functioanllity on ios and android.

iOS

Important IOTWifi uses NEHotspotConfigurationManager. To use the NEHotspotConfigurationManager class, you must enable the Hotspot Configuration capability in Xcode.

  1. Drang an drop IOTWifi.xcodeproj to your workspace
  2. Link target to libIOTWifi.a library
  3. Link target to NetworkExtension.framework framework
  4. Enable Hotspot Configuration

android

Usage

import Wifi from "react-native-iot-wifi";

Wifi.isAvaliable((avaliable) => {
  console.log(avaliable ? 'avaliable' : 'failed');
});

Wifi.getSSID((SSID) => {
  console.log(SSID);
});

Wifi.connect("wifi-name", (error) => {
  console.log(error ? 'error: ' + error : 'connected to wifi-name');
});

Wifi.removeSSID("wifi-name", (error)=>{
  console.log(error ? 'error: ' + error : 'removed wifi-name');
});

About

Simple wifi configuration manager for IOT devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 64.4%
  • Objective-C 32.6%
  • JavaScript 3.0%