Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@connectedyard/node-jlink
Advanced tools
NodeJS driver for the Segger JLink command line tool, jlinkexe, including conveniences found in nrfjprog (Nordic's commandline tool for the NRF series of micro-controllers).
Calls the jlinkexe cli tool for maximum compatibility. Tested on Windows, MacOSX and Raspberry Pi.
All commands return promises.
var jlink = require("node-jlink");
jlink.reset(); // resets the device attached to the jlink programmer
var readMyMemCommands = ["h", "mem 0x10001004, 0x20"];
jlink.executeCommands( readMyMemCommands )
.then( function( results ){
console.log( result.stdout );
});
The following nrfjprog commands are implemented as follows.
These commands return a Promise, resolve( true ) on success, reject( error ) on failure.
jlink.reset(); // nrfjprog --reset
jlink.pinReset(); // nrfjprog --pinreset
jlink.eraseAll(); // nrfjprog --eraseAll
jlink.program( firmwareFilePath ); // nrfjprog --program <firmwareFilePath>
Flash memory is returned in a buffer.
jlink.readmem( address, numBytes) // nrfjprog --memrd <address> --w 32 --n <numBytes>
.then( function( buffer ){
})
.catch( function( error ){
});
Arbitrary JLinkEXE scripts can be executed by passing an array of commands into jlink.executeCommands( commands )
. An Promise is returned, and on resolve the Result be as follows:
{
stdout: String, captured from jlinkexe stdout stream, or empty string
stderr: String, captured from jlinkexe stdout stream, or empty string
code: Integer, captured from jlinkexe exit code, or 0
error: Error, from jlinkexe or internal error, or null
}
A complete list of JLinkEXE commands are available at https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf
By default, the JLinkEXE command is expected to be found on the path as jlinkexe
. The default commandline options to jlinkexe are "-device nrf51822 -if swd -speed 4000"
.
To change these values, set jlink.JLinkExe
and jlink.JLinkExeOptions
.
FAQs
jLinkexe driver for nodejs
The npm package @connectedyard/node-jlink receives a total of 62 weekly downloads. As such, @connectedyard/node-jlink popularity was classified as not popular.
We found that @connectedyard/node-jlink demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.