Issue with node-red-node-serialport and serial control Node: “TypeError: newline.substr is not a function” when Using Fixed Length Split Configuration
khalilddkhili opened this issue · 3 comments
Which node are you reporting an issue on?
I encountered an error with the node-red-node-serialport module while using the serial control node to open and close communication with a product.
What are the steps to reproduce?
- Initial Configuration
I configured the COM port as shown in the image above with the following settings:
Split input after a timeout of 200ms
Sequence
Close COM port (close com - works correctly)
Open COM port (open com - works correctly)
Send serial commands using the serial request node (send serial commands - works correctly)
Close COM port (close com - works correctly)
Open COM port (open com - works correctly)
2) Problem with New Configuration
When I used the following configuration:
Split input into fixed lengths of 30000 chars
and repeated the same steps, I encountered an error at step 5:
Close COM port (close com - works correctly)
Open COM port (open com - works correctly)
Send serial commands using the serial request node (send serial commands - works correctly)
Close COM port (close com - works correctly)
Open COM port (open com - error: "TypeError: newline.substr is not a function")
Lien Node-RED Forum : https://discourse.nodered.org/t/issue-with-node-red-node-serialport-and-serial-control-node-typeerror-newline-substr-is-not-a-function-when-using-fixed-length-split-configuration/88601
What happens?
error: "TypeError: newline.substr is not a function"
What do you expect to happen?
Close COM port (close com - works correctly)
Open COM port (open com - works correctly)
Send serial commands using the serial request node (send serial commands - works correctly)
Close COM port (close com - works correctly)
Open COM port (open com - works correctly)
Send serial commands using the serial request node (send serial commands - works correctly)
Close COM port (close com - works correctly)
- Node-RED version: 3.1.3
- node.js version:v18.12.1
- npm version:8.19.2
- Platform/OS: windows 10
- Browser: Microsoft Edge
What version of the node-red-node-serialport are you using?
node-red-node-serialpor v2.0.2