Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"reinstall": "npm run clean && rm -rf ./node_modules && npm i"
},
"dependencies": {
"@particle/device-os-protobuf": "^2.8.0",
"@particle/device-os-protobuf": "^2.10.1",
"ip-address": "^9.0.5",
"protobufjs": "^6.11.4",
"usb": "^2.11.0"
Expand Down
16 changes: 16 additions & 0 deletions src/cellular-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,22 @@ const CellularDevice = base => class extends base {
return r.iccid;
}

/**
* Send a command APDU to the UICC and receive a response.
*
* Supported platforms:
* - Gen 3 (since Device OS 6.4.1)
* - Gen 4 (since Device OS 6.4.1)
*
* @param {Buffer} cmd Command APDU.
* @param {Object} [opts] Options (see `sendControlRequest()`).
* @returns {Promise<Buffer>} Response APDU.
*/
async sendApdu(cmd, opts) {
const { data } = await this.sendProtobufRequest('cellular.ApduRequest', { data: cmd }, opts);
return data;
}

/**
* Set to `true` if this is a cellular device.
*/
Expand Down
Loading