Issue with serial node

Good morning everyone
I'm using node-red serial node to send a request to a GPS HAT on Raspberry Pi and get the location in response. The issue is that sometimes, seems after some reboot but not certain, it sends a few messages and then nothing until a reboot. It's like if the serial node stops working, if I open minicom I can't see the messages coming from node-red.
Anyone experienced something like this? Do i need to schedule something on the serial port like reactivating it after some time?
Thanks for your help!

p.s. nodes structure is pretty easy, crontinject with the command to send -> serial node -> work with the message that I receive

Are you using the serial request node?
Have you specified a timeout in the serial node so that if it does not receive a reply then it gives up rather than waiting for ever?
If you add debug nodes showing what is going into and out of the serial nodes, then what is the last thing that you see there when it hangs up?

Hi Colin, thanks for your help
I can't find where to set the timeout, could you help me? I'm using a serial request with this configuration
image

I'll try the debug nodes but it usually happen in the night so it's hard for me to get it

Scroll down further on the dialog you show.

Make sure those are the only debug nodes active and leave the browser on that page. Alternatively (or as well) set the debug nodes to output to the console, then they will output to the node-red log so you can analyse after the event.

Hi Colin
sorry I didn't see that, is set by default at 10k ms so it should work (when it stops working it stops for hours). I'll check with the debug nodes and let you know what it says, many thanks

In your start post you say it's a raspberry hat and most of the time hat's are using the serial port on the header of the pi and that's not something with usb in the name as you show on your screenshot from the serial node.
More something like /dev/ttyAMA*
Try ls -l /dev/tty* in your terminal to see what ports are available.

Hi edje
Thanks for the input, USB2 should be correct because it uses both GPIO and a USB cable

This is the HAT https://www.waveshare.com/wiki/SIM7600E-H_4G_HAT

Since it works initially the port assignment must be correct I think.

@pcnr are you using a recent version of node-red and is the serial node at the latest version?

I'm using node-red v3.0.2
node-red-node-serialport 1.0.3
I added the debug nodes, I'll update when it drops again

Thanks for clarifying the used uart and the link to the used product.
Is your power supply up to the extra load?

@pcnr did you mark my post as the solution? If so, why?

we are using default 5v 3A power

no idea how that happened, I removed it thanks

Waveshare generally share the step by step of activating the devices in RPi. Did you follow it?

yes, I'm also in contact with them.
The issue is 100% related to node-red, I just connected to one of the device that wasn't working to add a debug node, and just redeploying made everything work again. I'm pretty sure if I had opened minicom i would have seen the gps working correctly

Update:
this morning it happened again and I could login before it self fixed:

These are the nodes involved

[
    {
        "id": "40ab04d6ed0bd1b3",
        "type": "crontinject",
        "z": "3af70a9829406ec3",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "20",
        "crontab": "",
        "once": true,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "AT+CGPSINFO",
        "payloadType": "str",
        "crontiMethod": "",
        "crontiArgs": "[]",
        "inputs": 0,
        "hasButton": true,
        "x": 110,
        "y": 500,
        "wires": [
            [
                "e616f2b381346c0d",
                "eed8f2003f2c0527"
            ]
        ]
    },
    {
        "id": "eed8f2003f2c0527",
        "type": "debug",
        "z": "3af70a9829406ec3",
        "name": "debug 15",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 300,
        "y": 500,
        "wires": []
    },
    {
        "id": "e616f2b381346c0d",
        "type": "function",
        "z": "3af70a9829406ec3",
        "name": "\\n",
        "func": "msg.payload += Buffer.from(\"0D\", \"hex\");\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 210,
        "y": 560,
        "wires": [
            [
                "6b1048e7464ae4ff"
            ]
        ]
    },
    {
        "id": "6b1048e7464ae4ff",
        "type": "serial request",
        "z": "3af70a9829406ec3",
        "name": "GPS",
        "serial": "559c9135501b6255",
        "x": 310,
        "y": 620,
        "wires": [
            [
                "081ca93e1d816e41",
                "51079144ee837a40",
                "7a1aa1b679dff52f",
                "e5cfe237e68c93a6",
                "6c96a0f9e3a87196"
            ]
        ]
    },
    {
        "id": "6c96a0f9e3a87196",
        "type": "debug",
        "z": "3af70a9829406ec3",
        "name": "debug 4",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 540,
        "y": 620,
        "wires": []
    },
    {
        "id": "559c9135501b6255",
        "type": "serial-port",
        "serialport": "/dev/ttyUSB2",
        "serialbaud": "115200",
        "databits": "8",
        "parity": "none",
        "stopbits": "1",
        "waitfor": "",
        "dtr": "none",
        "rts": "none",
        "cts": "none",
        "dsr": "none",
        "newline": "/n",
        "bin": "false",
        "out": "char",
        "addchar": "",
        "responsetimeout": "10000"
    }
]

So the crontinject was spamming "AT+CGPSINFO" and I could see it in debug node, but from the other debug node I couldn't see anything, no error, nothing. Is just like if the serial node stops working. If I open minicom I don't see the commands from node-red appear (I usually do). Like always, I just deactivated and activated a debug node, deployed, and it started working.

@Colin @edje11 any ideas? I ran out of tests..

Edit: I suppose there are no answers, it's just not working. At the moment I fixed it with a python script that reads from the serial, so from node-red I just launch the script and read the output. I'll wait for updates on the serial node