
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
rpi-wifi-connection
Advanced tools
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
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.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.