Git Product home page Git Product logo

wireless-tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wireless-tools's Issues

hostapd AP doesn't stay on [RPI3]

I'm trying to broadcast a network from my Raspberry Pi 3 using rasbian. This seems related to #15 so I followed the advice from @snowbreeze in setting dnsmasq and network interfaces. But as soon as the network begins to be broadcast, Wifi reverts back to connecting to the router.

Do I need to disable this behavior manually some how?

iwlist scan issue

Running on a pi with Electron UI

Getting the following error;

Error { killed: false, code: 127, signal: null, cmd: 'iwlist wlan0 scan' }

running like

scanSSIDS() { return new Promise((resolve, reject) => { iwlist.scan('wlan0', function(error, networks){ if(!error) return resolve(networks) return reject(error) }) }) }

Does this still work if we're not root?

iwconfig not working on ArchLinux

Hello,

I'm currently using your library and I'm running into trouble trying to query all wireless interfaces in Arch Linux with iwconfig.status.

When I type iwconfig in the terminal, it shows me two wireless interfaces, wlan0 and wlan1. When I use your library, it only shows one interface. Digging into your code I could find the problem. The problem is in iwconfig.js:115 where the split('\n\n') is not splitting well the interfaces, thus, just generating one interface. I corrected the problem adding a .replace(/ {10,}/g, ''), but I'm not sure if it's the best solution, so I decided to create this issue to know if you guys have a better solution.

The function with the modifications is listed bellow.

function parse_status(callback) { return function(error, stdout, stderr) { if (error) callback(error); else callback(error, stdout.trim().replace(/ {10,}/g, '').split('\n\n').map(parse_status_block).filter(function(i) { return !! i })); }; }

Thanks :)

ifconfig support for Debian stretch

Hi,
It seems now-stable debian 9.1 "stretch" has slightly changes ifconfig report format:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.101  netmask 255.255.255.0  broadcast 192.168.1.255
        ether e8:80:2e:e7:a4:cb  txqueuelen 1000  (Ethernet)
        RX packets 2598  bytes 223207 (217.9 KiB)
        RX errors 0  dropped 12  overruns 0  frame 0
        TX packets 1760  bytes 879290 (858.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Therefore the library does not report correct information anymore (ip address for instance).
Any plan for a fix?
Thanks.

[Raspberry Pi 4] Can't Join Network using wpa_supplicant.enable(options)

I have tried using wpa_supplicant.enable(options) with the following options:

{
  ssid,
  passphrase,
  driver: 'wext',
  interface: 'wlan0'
}

but it fails and makes no changes to the wpa_supplicants.conf config file... I will need to do some logging to capture the precise nature of the failure and will report back. On its face is there something I'm doing wrong here with respect to doing this on the Raspberry Pi 4?

In reading the source code for this method, it's not clear to me whether the effects of this call persist through a reboot. Can anyone help clarify this for me? I'm looking for a reliable way to programatically configure Wi-Fi network connections on a Raspberry Pi, and package really seems like it's the right tool for the job, I just need to better understand how it works and how to use it I think.

Hostapd.enable not working

{ Error: Command failed: cat <wlp2s0-hostapd.conf && hostapd -B wlp2s0-hostapd.conf && rm -f wlp2s0-hostapd.conf
channel=1
driver=nl80211
hw_mode=g
interface=wlp2s0
ssid=bhavika
wpa=2
wpa_passphrase=123456789

at ChildProcess.exithandler (child_process.js:205:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:513:12)

killed: false,
code: 1,
signal: null,
cmd: 'cat <wlp2s0-hostapd.conf && hostapd -B wlp2s0-hostapd.conf && rm -f wlp2s0-hostapd.conf\nchannel=1\ndriver=nl80211\nhw_mode=g\ninterface=wlp2s0\nssid=bhavika\nwpa=2\nwpa_passphrase=123456789' }

I am trying to make a software access point by making an API using wireless-tools/hostapd module and got error related to EOF .

interface word is future-reserved

Hi, I am using the wireless-tools package in my node.js app. Also I am trying to create a standalone app with nexe. But it I am getting such errors:

Acorn error: The keyword 'interface' is reserved (57:17)
File: /projects/blotcycler/node_modules/wireless-tools/hostapd.js

55   *
56   */
57  function disable(interface, callback) {
58    var file = interface + '-hostapd.conf';
59
60    return this.exec('kill `pgrep -f "^hostapd -B ' + file + '"` || true',
61      callback);

The interface word is future-reserved (link), so it is better replace it into another in whole package.

UTF8 names are not decoded

If the SSID contains a UTF8 character, the ssid contains not decoded strings like "TEST\xc3"

to fix it, I currently use this function

function decodeUtf8(string) {
  return Buffer.from(string, 'ascii').toString('utf8');
}

however this should be in the library and not in the application

It is possible to configure a sort of dnsmaq?

Hi @bakerface i found your module very interesting and i think that i'll test it in these day on a project with my new raspberry pi.
I would like to know if at the moment the module provide a a way to configure a sort of dnsmasq or if i have to use some other module that i found on npm.
Thanks in advance for the answer and for module developed.

wpa_cli.set_network

wpa_cli.set_network fails when trying to set network SSID in add_network callback.

Module not found: Can't resolve 'child_process'

I am using iw.js, I did npm i wireless-tools and when I am building my code, it is failing with the above error. I also did npm i child_process but it did not fix the error. Any pointers please.

how to use wpa_cli.set_network() ?

I have been trying to use "wpa_cli.set_network(interface, id, variable, value, callback)".
Below is my code.

var wpa_cli = require('wireless-tools/wpa_cli');

 wpa_cli.set_network("wlan0", 0, "ssid", "SuperQuark-Slow", function(err,data) {
            if (err) {
                console.log("set_network ssid");
                console.log(err);
            } else {
                console.log("set_network ssid");
                console.log(data);
                }
});

I am getting this error : "[Error: FAIL]".

Please help me in this.

iwconfig more status info

Great stuff!
If it doesn't cost too much, y should add the actual bit rate [Mb/s] and power management [on/off] too.
Also the number of connected clients to an AP.

Thanks and best regards,
Nic

iwlist 'security' should be an array

It is possible to have more than one security scheme in play at the same time. Eg:

Cell 06 - Address: 00:19:A9:7B:96:E0
    ESSID:"Rn4INSTa3q"
    Protocol:IEEE 802.11b
    Mode:Master
    Frequency:2.462 GHz (Channel 11)
    Encryption key:on
    Bit Rates:11 Mb/s
    Extra:wpa_ie=dd180050f20101000050f20201000050f20201000050f2010000
    IE: WPA Version 1
        Group Cipher : TKIP
        Pairwise Ciphers (1) : TKIP
        Authentication Suites (1) : 802.1x
    Extra:rsn_ie=30140100000fac020100000fac040100000fac012900
    IE: IEEE 802.11i/WPA2 Version 1
        Group Cipher : TKIP
        Pairwise Ciphers (1) : CCMP
        Authentication Suites (1) : 802.1x
        Preauthentication Supported
    Quality=0/100  Signal level=61/100  

ifconfig does not work properly on some locale

When LANG has been set to fr_FR.UTF-8, stdout of ifconfig is as following.

wlan0 Link encap:Ethernet HWaddr 34:76:c5:5d:65:e3
inet adr:192.168.10.1 Bcast:192.168.10.255 Masque :255.255.255.0
adr inet6: fe80::6b63:a10d:d185:85c0/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21287 errors:0 dropped:13 overruns:0 frame:0
TX packets:131 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:0 (0.0 B) TX bytes:40210 (39.2 KiB)

In this case, subnet mask value will not be shown.
Because regex does never match the word 'Mask'.

if ((match = block.match(/Mask:\s*([^\s]+)/))) {
parsed.ipv4_subnet_mask = match[1];
}

This issue will happen on other locale like ja_JP.UTF8.

Async Callback wait

I have the following code:

            onReadRequest : function(offset, callback) {
                console.log("WIFI READ request received");
                var ssid = "";
                var rssi = "";
                var connected = "0";
                console.log("A");
                iwconfig.status('wlan0', function(err, networks) {
                  if (err) {
                    return console.log(err);
                  }
                  ssid = networks.ssid;
                  rssi = networks.signal.toString();
                  connected = "1";
                  var x = {ssid: ssid, pwd: "", rssi: rssi, connected: connected};
                  this.value = JSON.stringify(x);
                  console.log("B");
                });
                console.log("C");
                this.value = "wifi"
                console.log('\tWifi Value: ' + this.value);
                callback(this.RESULT_SUCCESS, new Buffer(
                (this.value ? this.value.toString() : "")));
            },

The issue is that iwconfig use exec and run asynchronously. So "C" get printed before B. Or the end of the code gets executed before the iwconfig is finished.
How can I make the iwconfig wait to be finished before the rest of the code gets executed.

Thank you

maxBuffer option for iw.scan

Sometimes iw.scan fails when there are too many networks around.
It happens because of maxBuffer option of child_process.exec, which by default is 200 * 1024 bytes.

{ Error: stdout maxBuffer exceeded at Socket.onChildStdout (child_process.js:258:14) at emitOne (events.js:96:13) at Socket.emit (events.js:191:7) at readableAddChunk (_stream_readable.js:178:18) at Socket.Readable.push (_stream_readable.js:136:10) at Pipe.onread (net.js:559:20) cmd: 'iw dev wifi5g scan' }

Can we add possibility to change this default option of child_process.exec?
I also guess it could be interesting for some other function, not explicitly iw.scan.

Hostapd Enable Fail [RaspberryPi3]

I want to setup my rpi as a AP.
I did sudo apt-get install hostapd

installed wireless-tools

then ran

var hostapd = require('wireless-tools/hostapd');

var options = {
  channel: 6,
  driver: 'rtl871xdrv',
  hw_mode: 'g',
  interface: 'wlan0',
  ssid: 'RaspberryPi',
  wpa: 2,
  wpa_passphrase: 'raspberry'
};

hostapd.enable(options, function(err) {
  // the access point was created 
  console.log(err)
  console.log('Hostapd')
});

Got Error

{ [Error: Command failed: /bin/sh -c cat <<EOF >wlan0-hostapd.conf && hostapd -B wlan0-hostapd.conf && rm -f wlan0-hostapd.conf
channel=6
driver=rtl871xdrv
hw_mode=g
interface=wlan0
ssid=RaspberryPi
wpa=2
wpa_passphrase=raspberry
]
  killed: false,
  code: 1,
  signal: null,
  cmd: '/bin/sh -c cat <<EOF >wlan0-hostapd.conf && hostapd -B wlan0-hostapd.conf && rm -f wlan0-hostapd.conf\nchannel=6\ndriver=rtl871xdrv\nhw_mode=g\ninterface=wlan0\nssid=RaspberryPi\nwpa=2\nwpa_passphrase=raspberry' }
Hostapd

Error hostapd.enable

Hi @bakerface, as i told you i'm trying your module for node.js and i've a problem using
hostapd.enable() function.
I'm using your sample code:

var hostapd = require('wireless-tools/hostapd');

var options = {
  channel: 6,
  driver: 'rtl871xdrv',
  hw_mode: 'g',
  interface: 'wlan0',
  ssid: 'RaspberryPi',
  wpa: 2,
  wpa_passphrase: 'raspberry'
};

hostapd.enable(options, function(err) {
  // the access point was created
  if(err){
      console.log("HOSTAPD ERR:"+err);
      }
});

And using it i'm receiveing this error:

HOSTAPD ERR:Error: Command failed: /bin/sh -c cat <<EOF >wlan0-hostapd.conf && hostapd -B wlan0-hostapd.conf && rm -f wlan0-hostapd.conf
channel=6
driver=rtl871xdrv
hw_mode=g
interface=wlan0
ssid=RaspberryPi
wpa=2
wpa_passphrase=raspberry

I'm working on Rapsbery Pi 2 and i've hostapd installed but maybe i'm forgetting something, Can you help me and suggest me something?
Thanks in advance.
Simone

wpa_cli list_networks not available

The wpa_cli module can select a network with the select_network but how to get the list of networks with ids

If i'm correct select_network should set a network id. how to get the list of available network ids ?

How To check these functionalities for hotspot?

Hi!
Actually I created a hotspot manually!
So I want to test all these functionalities with that access point (hot-spot).
I want to enable and disable the hotspot using first two function.
hostapd.enable(interface,callback)
hostapd.disable(interface, callback)

could you please help me with this.
I tried but they are not working.

OS: ubuntu16.04
node -v:6.10.2,
npm -v: 3.10.10

Thanks,
Praveen

ifconfig.status doesn't work

Hi, im using from documentation:

var ifconfig = require("wireless-tools/ifconfig");

ifconfig.status(function(err, status) {
  console.log(err);
});

And what i have:
Error: Command failed: iwconfig
'iwconfig' is not recognized as an internal or external command,
operable program or batch file.

at ChildProcess.exithandler (child_process.js:291:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5) killed: false, code: 1, signal: null, cmd: 'iwconfig' }

Whats wrong with this?

ifconfig only grabs 4 attributes

Hi, on my system (kali / debian), ifconfig only gets 5 attributes:

  • interface
  • broadcast
  • multicast
  • running
  • up

I'd like to submit a pull request to fix them, but I wanted to know if you would consider it and if you're looking for help. For example, on your match for ipv4_address, you use inet addr. For this release and ifconfig, it uses simply inet for ipv4 and inet6 for ipv6.

For MAC address, it uses ether (I know it kind of seems unrelated) instead of HWaddr. Right now in my app I'm using other modules and joining the objects together, but I'd like to simplify. Plus Kali linux is a great use for your module, the control would be great!

If you're looking for help, I could probably either modify the regexp or throw a couple 'or's in there

Forgot to mention, AWESOME module!

When attempting to thunkify for use in a generator based flow control I receive this.exec is not a function

When using thunkify to wrap a wireless-tools function to become a yieldable thunk for co, this.exec is reported as not being a function.

I'm able to resolve this by changing this.exec to reference the module itself rather than using this.

For example:
var scan = thunkify(wpa_cli.scan_results);
raises the exception 'this.exec is not a function' - wpa_cli.js:407

If I modify line 407 of wpa_cli.js to return wpa_cli.exec rather than this.exec, thunkify works without a problem.

Could not kill wpa_supplicant process

I started wpa_supplicant with wpa_supplicant.enable method. And then, I tried to stop that with wpa_supplicant.disable but it failed. The error message had shown as follows.

[Error: Command failed: /bin/sh -c kill pgrep -f "wpa_supplicant .* -i wlan0" || true]

I think this error is caused by a change in "commit cc99531".

The process started by wpa_supplicant.enable is below,

"wpa_supplicant -i wlan0 -B -D wext -c wlan0-wpa_supplicant.conf"

I think pgrep called by wpa_supplicant.disable methid can not find this process.

Open WiFi nw

In order to join open wifi networks I added a bit of code to your 'wpa_supplicant.js' file, changes are the following:

enable function is for me:

function enable(options, callback) {
  var file = options.interface + '-wpa_supplicant.conf';

    if (options.passphrase) {

        var command = 'wpa_passphrase "' + options.ssid + '" "' + options.passphrase
            + '" > ' + file + ' && wpa_supplicant -i ' + options.interface + ' -B -D '
            + options.driver + ' -c ' + file + ' && rm -f ' + file;

    } else {

        fs.writeFileSync(file, 'network={ \n' +
            '\tssid="'+ options.ssid + '"\n' + '\tkey_mgmt=NONE\n'
            + '}\n');

        var command = 'wpa_supplicant -i ' + options.interface + ' -B -D '
            + options.driver + ' -c ' + file + ' && rm -f ' + file;
    }

  return this.exec(command, callback);  
}

As you will notice, there is a new dependency in the code, the native 'fs' module. I wasn't able to print the double quotes surrounding the ssid value with echo utility, so to me it is enough, I hope it helps!

szz.

TypeScript Compiler Error (TS2304) - Cannot find name 'TypeOrPromise'

Hello together,

I would like to use the libary in my NodeJS (TypeScript) project, however my compilation process is completing with errors.

My SourceCode

`
import {hostapd, ifconfig, iwconfig, udhcpd} from "@loofkid/wireless-tools";

export class ApService {

private options = {
    channel: 6,
    driver: 'rtl871xdrv',
    hw_mode: 'g',
    interface: 'wlan0',
    ssid: 'XXX',
    wpa: 2,
    wpa_passphrase: 'XXX'
};

private ifConfigOptions = {
    interface: 'wlan0',
    ipv4_address: '192.168.10.1',
    ipv4_broadcast: '192.168.10.255',
    ipv4_subnet_mask: '255.255.255.0'
};

private dhcpOptions = {
    interface: 'wlan0',
    start: '192.168.10.100',
    end: '192.168.10.200',
    option: {
        router: '192.168.10.1',
        subnet: '255.255.255.0',
        dns: ['1.1.1.1', '1.0.0.1']
    }
};

enable() {

    ifconfig.up(this.ifConfigOptions, (err: any) => {
        //
    });

    udhcpd.enable(this.dhcpOptions, (err: any) => {
        //
    });

    hostapd.enable(this.options, (err: any) => {
        //
    });
}

}

Compiler Output

`node_modules/@loofkid/wireless-tools/hostapd.d.ts:18:121 - error TS2304: Cannot find name 'TypeOrPromise'.

18 export const disable: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, import("child_process").ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/hostapd.d.ts:19:117 - error TS2304: Cannot find name 'TypeOrPromise'.

19 export const enable: <T extends ((err: Error) => any) | undefined = undefined>(interface: Options, callback?: T) => TypeOrPromise<T, void, import("child_process").ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/ifconfig.d.ts:31:134 - error TS2304: Cannot find name 'TypeOrPromise'.

31 export const status: <T extends ((err: Error, data: Status) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, Status, void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/ifconfig.d.ts:32:116 - error TS2304: Cannot find name 'TypeOrPromise'.

32 export const statusAll: <T extends ((err: Error, data: Status[]) => any) | undefined = undefined>(callback?: T) => TypeOrPromise<T, Status[], void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/ifconfig.d.ts:33:118 - error TS2304: Cannot find name 'TypeOrPromise'.

33 export const down: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/ifconfig.d.ts:34:111 - error TS2304: Cannot find name 'TypeOrPromise'.

34 export const up: <T extends ((err: Error) => any) | undefined = undefined>(options: Options, callback?: T) => TypeOrPromise<T, void, void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/iw.d.ts:22:143 - error TS2304: Cannot find name 'TypeOrPromise'.

22 export const scan: <T extends ((err: Error, networks: Network[]) => any) | undefined = undefined>(options: string | Options, callback?: T) => TypeOrPromise<T, Network[], void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/iwconfig.d.ts:24:134 - error TS2304: Cannot find name 'TypeOrPromise'.

24 export const status: <T extends ((err: Error, data: Status) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, Status, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/iwconfig.d.ts:25:116 - error TS2304: Cannot find name 'TypeOrPromise'.

25 export const statusAll: <T extends ((err: Error, data: Status[]) => any) | undefined = undefined>(callback?: T) => TypeOrPromise<T, Status[], ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/iwlist.d.ts:24:143 - error TS2304: Cannot find name 'TypeOrPromise'.

24 export const scan: <T extends ((err: Error, networks: Network[]) => any) | undefined = undefined>(options: Options | string, callback?: T) => TypeOrPromise<T, Network[], void>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/udhcpc.d.ts:14:121 - error TS2304: Cannot find name 'TypeOrPromise'.

14 export const disable: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/udhcpc.d.ts:15:115 - error TS2304: Cannot find name 'TypeOrPromise'.

15 export const enable: <T extends ((err: Error) => any) | undefined = undefined>(options: Options, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/udhcpd.d.ts:21:115 - error TS2304: Cannot find name 'TypeOrPromise'.

21 export const enable: <T extends ((err: Error) => any) | undefined = undefined>(options: Options, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/udhcpd.d.ts:22:121 - error TS2304: Cannot find name 'TypeOrPromise'.

22 export const disable: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:45:136 - error TS2304: Cannot find name 'TypeOrPromise'.

45 export const status: <T extends ((err: Error, status: Status) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, Status, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:46:160 - error TS2304: Cannot find name 'TypeOrPromise'.

46 export const bssid: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, ap: string, ssid: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:47:140 - error TS2304: Cannot find name 'TypeOrPromise'.

47 export const reassociate: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:48:165 - error TS2304: Cannot find name 'TypeOrPromise'.

48 export const set: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, variable: string, value: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:49:148 - error TS2304: Cannot find name 'TypeOrPromise'.

49 export const list_networks: <T extends ((err: Error, networks: Network[]) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, Network[], ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:50:140 - error TS2304: Cannot find name 'TypeOrPromise'.

50 export const add_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:51:185 - error TS2304: Cannot find name 'TypeOrPromise'.

51 export const set_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, id: string, variable: string, value: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:52:155 - error TS2304: Cannot find name 'TypeOrPromise'.

52 export const enable_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, id: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:53:156 - error TS2304: Cannot find name 'TypeOrPromise'.

53 export const disable_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, id: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:54:155 - error TS2304: Cannot find name 'TypeOrPromise'.

54 export const remove_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, id: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:55:155 - error TS2304: Cannot find name 'TypeOrPromise'.

55 export const select_network: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, id: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:56:133 - error TS2304: Cannot find name 'TypeOrPromise'.

56 export const scan: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:57:141 - error TS2304: Cannot find name 'TypeOrPromise'.

57 export const scan_results: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_cli.d.ts:58:140 - error TS2304: Cannot find name 'TypeOrPromise'.

58 export const save_config: <T extends ((err: Error, data: unknown) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, unknown, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_supplicant.d.ts:23:121 - error TS2304: Cannot find name 'TypeOrPromise'.

23 export const disable: <T extends ((err: Error) => any) | undefined = undefined>(interfaceName: string, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_supplicant.d.ts:24:121 - error TS2304: Cannot find name 'TypeOrPromise'.

24 export const enable: <T extends ((err: Error) => any) | undefined = undefined>(options: EnableOptions, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

node_modules/@loofkid/wireless-tools/wpa_supplicant.d.ts:25:121 - error TS2304: Cannot find name 'TypeOrPromise'.

25 export const manual: <T extends ((err: Error) => any) | undefined = undefined>(options: ManualOptions, callback?: T) => TypeOrPromise<T, void, ChildProcess>;
~~~~~~~~~~~~~

[12:47:26 PM] Found 31 errors. Watching for file changes.

I am glad about your answers!

Many greetings
Malte

Check if it Is Connected; Connect and check if successful

Good Evening,
I'm in an IoT project where our project uses WiFi to comunicate with its controller (an App).
For this, we're using this library to broadcast the network, but:

  • Is there any way to check if the device (Raspberry Pi, probably)?? If yes, How??
  • When connecting to a network, can we check if it was successful???
  • Also, how do we use hostapd to create a network without internet access, just to host a single express app?? And is there any Connected or Disconnected event??

Thank you,
Gabriel

WPA types support for Access point ??

Hello I see that Access point has WPA2-PSK security and I want to know that does Access point supports other security types like WPA2 + AES,WPA + AES,WPA + TKIP/AES (TKIP is there as a fallback method),WEP,Open Network ???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.