I am trying to set up a USB test using an FTDI chip UMFT234XD-WE,
Using node-serialport I'm simply trying to open the port in a test script and write an array of data through the chip to another device. But, I can't get that far.
For example, using the known COM port I try and make the obj and open as follows:
(This example I disabled autoOpen in case the comPort is already opened elsewhere to see any difference)
const usbDevice = new SerialPort({
path: port, //"COM1"
baudRate: baudRate, //230400
autoOpen: false,
});
if (!usbDevice.isOpen) {
usbDevice.open(function (err) {
if (err) {
issue = true;
return console.log('Error opening port: ', err.message)
}
});
}
The error will always return here with:
'Open (SetCommState): The parameter is incorrect', I have no further information as of yet.
I have used FT-Prog to see the chip and see no issues there. I have also tried accessing with node-usb to check the deviceDescriptors and obtain comPort in the same script beforehand, but removing this step makes no difference to the error
Cheers!