Hello. I'm having trouble to use serialport in node red to connect with my GPT-9803. The connect I was using is rs232C ( using usb to rs232C with CH340 CHIP). I'm successfully connect it via tera-term and getting feedback from the machine, but when I tried to use node red serialport it always having this error:
"[serialconfig:58065d3ff9e25096] serial port COM3 error: Error: Open (SetCommState): Unknown error code 31"
This is the output from tera term, if I tried to send "idn?" command to the machine:
And this is node-red when I tried to connect it:
[
{
"id": "52d7084d2efd8fbc",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ea5031698f6e236f",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"disabled": false,
"hidden": false
},
{
"id": "1631f6c1af7f2963",
"type": "ui_base",
"theme": {
"name": "theme-light",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#0094CE",
"value": "#0094CE",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#0094CE",
"edited": false
},
"page-backgroundColor": {
"value": "#fafafa",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"group-textColor": {
"value": "#1bbfff",
"edited": false
},
"group-borderColor": {
"value": "#ffffff",
"edited": false
},
"group-backgroundColor": {
"value": "#ffffff",
"edited": false
},
"widget-textColor": {
"value": "#111111",
"edited": false
},
"widget-backgroundColor": {
"value": "#0094ce",
"edited": false
},
"widget-borderColor": {
"value": "#ffffff",
"edited": false
},
"base-font": {
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey",
"palette": "light"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "true",
"dateFormat": "DD/MM/YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
},
{
"id": "5ad7a3c2f4cb1f09",
"type": "ui_group",
"name": "Default",
"tab": "ea5031698f6e236f",
"order": 1,
"disp": false,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "a6e358b.672ffa8",
"type": "ui_group",
"name": "Demo",
"tab": "4e528085.a1bfa",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "4e528085.a1bfa",
"type": "ui_tab",
"name": "Demo",
"icon": "dashboard",
"order": 2,
"disabled": false,
"hidden": false
},
{
"id": "58065d3ff9e25096",
"type": "serial-port",
"name": "",
"serialport": "COM3",
"serialbaud": "9600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "\\n",
"bin": "false",
"out": "char",
"addchar": "",
"responsetimeout": "10000"
},
{
"id": "f57557155a8ddb6f",
"type": "serial in",
"z": "52d7084d2efd8fbc",
"name": "",
"serial": "58065d3ff9e25096",
"x": 490,
"y": 280,
"wires": [
[
"8fc2ed2bd72f2b24"
]
]
},
{
"id": "8fc2ed2bd72f2b24",
"type": "debug",
"z": "52d7084d2efd8fbc",
"name": "debug 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 320,
"wires": []
},
{
"id": "c15a8906993c6221",
"type": "inject",
"z": "52d7084d2efd8fbc",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "*idn?",
"payloadType": "str",
"x": 190,
"y": 400,
"wires": [
[
"34fcfe862721a4f3"
]
]
},
{
"id": "34fcfe862721a4f3",
"type": "serial out",
"z": "52d7084d2efd8fbc",
"name": "",
"serial": "58065d3ff9e25096",
"x": 350,
"y": 400,
"wires": []
}
]
I wonder what cause it? Using windows 10 pro. Thank you very much!