Warning
End-of-life: modemtalk is no longer maintained.
Library to interface with the nRF9160 modem.
This is a stand-alone publication of the modemtalk
folder from https://github.com/NordicSemiconductor/pc-nrfconnect-linkmonitor/.
Install it as a dependency in your project:
npm i --save modemtalk
Then use ModemPort
to communicate with the device:
const { ModemPort } = require('modemtalk')
const turnOffModem = async () => {
const device = new ModemPort('/dev/ttyACM0', {
writeCallback: data => {
console.log(data.trim())
}
})
await device.open()
await device.writeAT('+CFUN=4', {
timeout: 2000
})
await device.close()
}
turnOffModem()
- see usage in the Link Monitor
- a script to write TLS credentials