
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
mbed-js-st-ble
Advanced tools
This library exposes the mbed BLE API to JerryScript targets forked from mbed-js-ble
The following objects are exposed:
// instantiate BLEDevice, only do this once
var ble = BLEDevice();
// takes in: characteristic UUID (16 bit only), array of properties (r/w/n), data size
var characteristic = BLECharacteristic('9101', ['read', 'write', 'notify'], 1);
// takes in: service UUID (16 bit only), array of BLECharacteristic objects
var service = BLEService('9100', [ characteristic ]);
// ready callback, wait before interacting with the API
ble.ready(function() {
print("ble is ready");
// takes in an array of BLEService objects
ble.addServices([
service
]);
// takes: name to advertise, array of UUIDs (strings), advertisement interval (default: 1000)
ble.startAdvertising("YOUR_NAME", [
service.getUUID()
], 1000);
});
// connection callback
ble.onConnection(function() {
print("GATT connection established");
});
// disconnection callback
ble.onDisconnection(function() {
print("GATT disconnected, restarting advertisements");
// call without parameters to use the last used set
ble.startAdvertising();
});
// is connected? returns Boolean
print("BLE is connected? " + ble.isConnected());
// write to a characteristic
characteristic.write([ 0x98, 0x37 ]);
// reading a characteristic (returns an array)
var arr = characteristic.read();
print("Length is " + arr.length + ", first element is " + arr[0]);
// receiving updates when written over GATT
characteristic.onUpdate(function (newValue) {
// newValue is an array (same value as read() returns)
print("Updated! New value is " + newValue.length + ", first element is " + newValue[0]);
});
Implememted support for 128-bit UUIDs
Examples:
// BLECharacteristic
// takes in: characteristic UUID (16 bit or 128 bit), array of properties (r/w/n), data size
characteristic = BLECharacteristic('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', ['read', 'write', 'notify'], 1);
characteristic = BLECharacteristic('9100', ['read', 'write', 'notify'], 1);
// BLEService
// takes in: characteristic UUID (16 bit or 128 bit), array of characteristics
service = BLEService('9100', [ characteristic ]);
service = BLEService('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', [ characteristic ]);
Implemented Long UUID support in BLEService.GetUUID()
uuid = service.GetUUID()
Added Manufacturer info in the startAdveritising method:
// Valid methods
// takes: name to advertise, array of UUIDs (strings)
BLE ble = BLEDevice();
ble.startAdvertising('advertisingName', [ service.getUUID() ]);
// takes: name to advertise, array of UUIDs (strings), advertisement interval (default: 1000),
ble.startAdvertising('advertisingName', [ service.getUUID() ], 100);
// takes: name to advertise, array of UUIDs (strings), advertisement interval (default: 1000), Manufacturer's info
ble.startAdvertising('advertisingName', [ service.getUUID() ], 100, '018000E00000');
// takes: name to advertise, array of UUIDs (strings), Manufacturer's info
ble.startAdvertising('advertisingName', [ service.getUUID() ], '018000E00000');
FAQs
JavaScript library for BLE on Mbed OS
The npm package mbed-js-st-ble receives a total of 2 weekly downloads. As such, mbed-js-st-ble popularity was classified as not popular.
We found that mbed-js-st-ble 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
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.