Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
rpi-wifi-connection
Advanced tools
Readme
Module to connect a Raspberry Pi to Wi-Fi
$ npm install rpi-wifi-connection --save
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
Constructs a new wifi connection object.
Connects to the specified network.
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
wifi.connect({ssid:'my-network', psk:'raspberry'}).then(() => {
console.log('Connected to network.');
})
.catch((error) => {
console.log(error);
});
Return a promise containing the available networks
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
wifi.scan().then((ssids) => {
console.log(ssids);
})
.catch((error) => {
console.log(error);
});
// [ { bssid: 'f4:ca:e5:e7:de:58', signalLevel: -72, frequency: 2467, ssid: 'homo' },
{ bssid: 'f4:ca:e5:e7:de:5a', signalLevel: -72, frequency: 2467, ssid: 'deus' } ]
Returns a promise containing the network status.
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
wifi.getStatus().then((status) => {
console.log(status);
})
.catch((error) => {
console.log(error);
});
// { ssid: 'Julia', ip_address: '10.0.1.189' }
Returns a promise containing the connection state. Please note that this only returns the connection state of your Raspberry Pi for any network. To see if you are connected to a specific network, use getStatus().
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
wifi.getState().then((connected) => {
if (connected)
console.log('Connected to network.');
else
console.log('Not connected to network.');
})
.catch((error) => {
console.log(error);
});
Returns a promise containing a list of Wi-Fi networks.
var Wifi = require('rpi-wifi-connection');
var wifi = new Wifi();
wifi.getNetworks().then((networks) => {
console.log(networks);
});
// [ { id: 0, ssid: 'Julia' } ]
FAQs
Module to connect a Raspberry Pi to Wi-Fi
The npm package rpi-wifi-connection receives a total of 42 weekly downloads. As such, rpi-wifi-connection popularity was classified as not popular.
We found that rpi-wifi-connection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.