UNPKG

rasp-blefi

Version:

Experimental project that allow headless configuration of WIFI network on Rasperry PI using BLE.

38 lines (37 loc) 952 B
/// <reference types="node" /> import { EventEmitter } from 'events'; export declare enum NetworkStatus { connected = "connected", disconnected = "disconnected" } /** * Represent network */ export default class Network extends EventEmitter { /** * Wifi network interface name */ private ifName; private ssid; private status; constructor(ifName: string); /** * Get current connected SSID */ getConnectedSSID(): Promise<string>; /** * Get current network connection status */ getStatus(): Promise<NetworkStatus>; /** * Compare old status with new status * @param oldStatus - old status */ hasStatusChanged(oldStatus: NetworkStatus): Promise<boolean>; /** * Configure WIFI network * @param ssid - ssid * @param pwd - password */ configureNetwork(ssid: string, pwd: string): Promise<void>; }