You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I tried to compile Blocklino with Windows 10, but the version of SerialPort 7.1.4 is too old and I couldn't complete the installation. I therefore used the latest version 9.0.6 which however does not see the serial ports.
In serialport@8 and @serialport/bindings@3 we renamed PortInfo.comName to PortInfo.path. If you use comName you'll get a warning until the next major release.
In serialport@8 and @serialport/bindings@3 we removed the optional callback to list(). You now have to use the promise it returns and if you provide a callback you will get an error.
This is probably due to the use of port.comName in the index.js file.
Is it possible to modify the index.js file to make it compatible with the new version of SerialPort?
Thank you.
The text was updated successfully, but these errors were encountered:
Hi,
Yes you can modify everything in index.js it's free !
all is here : sp.list(function(err,ports){ var opt = document.createElement('option') opt.value = "com" opt.text = Blockly.Msg.com1 portserie.appendChild(opt) ports.forEach(function(port) { if (port.vendorId){ var opt = document.createElement('option') opt.value = port.comName opt.text = port.comName portserie.appendChild(opt) } }) localStorage.setItem("nb_com",ports.length) if (portserie.options.length > 1) { portserie.selectedIndex = 1 localStorage.setItem("com",portserie.options[1].value) } else { localStorage.setItem("com","com") } }) sp.list(function(err,ports){ var messageUSB = document.getElementById('usb') if (ports.length === 0) { messageUSB.innerHTML = "Aucun port n'est disponible" // port not available } else { tableHTML = tableify(ports) messageUSB.innerHTML = tableHTML } }) $('#portserie').mouseover(function(){ sp.list(function(err,ports) { var nb_com = localStorage.getItem("nb_com"), menu_opt = portserie.getElementsByTagName('option') if(ports.length > nb_com){ ports.forEach(function(port){ if (port.vendorId){ var opt = document.createElement('option') opt.value = port.comName opt.text = port.comName portserie.appendChild(opt) localStorage.setItem("com",port.comName) } }) localStorage.setItem("nb_com",ports.length) localStorage.setItem("com",portserie.options[1].value) } if(ports.length < nb_com){ while(menu_opt[1]) { portserie.removeChild(menu_opt[1]) } localStorage.setItem("com","com") localStorage.setItem("nb_com",ports.length) } }) })
But i think it's possible to install a specific version with : npm install serialport@7.1.4`
Presently i have no time to update all modules, this summer will be probably the good time.
Bye
Hi,
I tried to compile Blocklino with Windows 10, but the version of SerialPort 7.1.4 is too old and I couldn't complete the installation. I therefore used the latest version 9.0.6 which however does not see the serial ports.
In the documentation of "https://serialport.io/docs/api-stream" I found these notes:
This is probably due to the use of port.comName in the index.js file.
Is it possible to modify the index.js file to make it compatible with the new version of SerialPort?
Thank you.
The text was updated successfully, but these errors were encountered: