@plmservices/nativescript-easylink
by plmservices | v1.0.2
Nativescript plugin that implements MxChip's Easylink device setup protocol.
npm i --save @plmservices/nativescript-easylink

NativeScript Easylink apple android

npm npm Build Status Donate

This plugin implements MxChip's Easylink device discovery/configuration protocol.

NOTE: I am not affiliated with MxChip and this project is not endorsed by them. The native code that this plugin uses is publicly supplied by MxChip and all rights and credit for the native code belongs to MxChip.

Prerequisites / Requirements

To use this under iOS you must:

  • Request the access to the multicast special entitlement directly from Apple
  • Create a provisioning profile containing that entitlement
  • Create an app.entitlements file containing:
	<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.networking.multicast</key>
<true/>

Some helpful information on this can be found at: https://developer.apple.com/forums/thread/663271

Installation

ns plugin add @plmservices/nativescript-easylink

Usage

import * as Easylink from '@plmservices/nativescript-easylink';

const ssid: string = Easylink.ssid();
const password: string = 'password';
const type: number = 4; // AWS style
Easylink.startDiscovery(ssid, password, style);
Easylink.stopDiscovery();
Easylink.destroy();

API

Methods

Method Description
public destroy(): void; Releases allocated resources
public startDiscovery(ssid: string, password: string, type: number): Promise; Start device discovery
public stopDiscovery(): void; Stops device discovery
public ssid(): string; Returns the SSID of the locally attached WiFi network

TODO

  • Angular demo app
  • Vue demo app

Donation

If this project helped you reduce your development time, you could consider helping me with a cup of coffee or some electricity :)

Donate

License

Apache License Version 2.0