ali-f 4 weeks ago
parent bfc1eb8796
commit c22005c817
  1. 5
      services/serialPortService.js

@ -6,8 +6,9 @@ import { autoDetect } from '@serialport/bindings-cpp'
async function serialPortList(req, res) {
const data = autoDetect()
console.log('data', await data.open())
const portList = await SerialPort.list()
console.log(portList)
res.send(portList)
// .then((ports) => {
// console.log('Available serial ports:');
// ports.forEach((port) => {

Loading…
Cancel
Save