
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
@mnlphlp/plugin-blec
Advanced tools
A BLE-Client plugin based on btlelug.
The main difference to using btleplug directly is that this uses the tauri plugin system for android. All other platforms use the btleplug implementation.
cargo add tauri-plugin-blec
Or manually add it to the src-tauri/Cargo.toml
[dependencies]
tauri-plugin-blec = "0.1"
use your preferred JavaScript package manager to add @mnlphlp/plugin-blec:
yarn add @mnlphlp/plugin-blec
npm add @mnlphlp/plugin-blec
src-tauri/src/lib.rs
tauri::Builder::default()
.plugin(tauri_plugin_blec::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
Add an entry to the info.plist of your app:
<key>NSBluetoothAlwaysUsageDescription</key>
<string>The App uses Bluetooth to communicate with BLE devices</string>
Add the CoreBluetooth Framework in your xcode procjet:
tauri ios dev --openSee examples/plugin-blec-example for a full working example that scans for devices, connects and sends/receives data.
In order to use it run examples/test-server on another device and connect to that server.
Short example:
import { connect, sendString } from '@mnlphlp/plugin-blec'
// get address by scanning for devices and selecting the desired one
let address = ...
// connect and run a callback on disconnect
await connect(address, () => console.log('disconnected'))
// send some text to a characteristic
const CHARACTERISTIC_UUID = '51FF12BB-3ED8-46E5-B4F9-D64E2FEC021B'
await sendString(CHARACTERISTIC_UUID, 'Test')
The plugin can also be used from the rust backend.
The handler returned by get_handler() is the same that is used by the frontend commands.
This means if you connect from the frontend you can send data from rust without having to call connect on the backend.
use uuid::{uuid, Uuid};
const CHARACTERISTIC_UUID: Uuid = uuid!("51FF12BB-3ED8-46E5-B4F9-D64E2FEC021B");
const DATA: [u8; 500] = [0; 500];
let handler = tauri_plugin_blec::get_handler().unwrap();
handler
.lock()
.await
.send_data(CHARACTERISTIC_UUID, &DATA)
.await
.unwrap();
FAQs
JS Bindings for BLE-Client plugin for Tauri
The npm package @mnlphlp/plugin-blec receives a total of 125 weekly downloads. As such, @mnlphlp/plugin-blec popularity was classified as not popular.
We found that @mnlphlp/plugin-blec demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.