bndw / wifi-card

📶 Print a QR code for connecting to your WiFi (wificard.io)

Home Page:https://wificard.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Auto Identify wifi

rpradosilva opened this issue · comments

Hi everyone,

The app is really cool!!!

I suggest improving the experience by automating wi-fi identification via browser permissions, but manual configuration is still an alternative.

Example: https://www.speedtest.net/

What do you think?

Is it possible? The informations on speedtest.net are non-local network information.

I researching npm libs, this is an initial idea:

const wifiscanner = require("wifiscanner");
const wifiName = require("wifi-name");
const scanner = wifiscanner();
const wifiPassword = require("wifi-password");

let networkName = wifiName.sync();

scanner.scan((error, networks) => {
  if (error) {
    console.error(error);
  } else {
    for (const network of networks) {
      if (network.ssid == networkName) {
        console.info(
          `------------------------------------\nWifi Name: ${network.ssid}\nSecurity: ${network.security}`
        );
      }
    }
  }
});

wifiPassword().then(function (password) {
  return console.log(`Password: ${password}`);
});

What do you think?

What is the effect of this?

Automatically identify the wi-fi name, security type and password, the main information to create the wi-fi card...

Test the suggestion:

  1. Create folder
  2. Start node npm init
  3. Install these dependencies: npm i wifiscanner wifi-name wifi-password
  4. Create file index.js and paste this code:
const wifiscanner = require("wifiscanner");
const wifiName = require("wifi-name");
const scanner = wifiscanner();
const wifiPassword = require("wifi-password");

let networkName = wifiName.sync();

scanner.scan((error, networks) => {
  if (error) {
    console.error(error);
  } else {
    for (const network of networks) {
      if (network.ssid == networkName) {
        console.info(
          `------------------------------------\nWifi Name: ${network.ssid}\nSecurity: ${network.security}`
        );
      }
    }
  }
});

wifiPassword().then(function (password) {
  return console.log(`Password: ${password}`);
});
  1. Run node index.js

It's a convenient solution. The user can click the button/checkbox to automatically complete the data about the network to which he is currently connected. This saves time and the possibility of mistakes. A very good idea for me.

This is a cool idea, but I don't think it's a good fit for this project. I want to keep the experience simple and expected. If a website like wificard.io automatically displayed my home wifi network details, I'd be caught off guard.

Again, I think this is a really cool idea but not a good fit for this project.