# Suspected serial port problem -- how to view logs?

**URL:** <https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073>\
**Category:** General\
**Created:** [22 September 2022 10:04 UTC](https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073 "2022-09-22T10:04:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [22 September 2022 10:04 UTC](https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073/1 "2022-09-22T10:04:06Z")

</div>

I have two flows, where each one runs independently of the other. Each flow has a serial input node that receives the value from a [Rice Lake weigh indicator](https://www.ricelake.com/products/sct-20-signal-conditioning-transmitter/) via RS232. I am using [this RS232-to-USB cable](https://a.co/d/68k9zdl) to convert from the signal wires to USB. The program runs fine so long as the weights keep flowing. However, each flow will unexplicably stop after any number of minutes or hours (sometimes it runs 30 minutes, sometimes 15+ hours), and I suspect the serial cables, the Rice Lake units, or even something in the Pi.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c8b6f6684b65e57c3b6d3947fe4f2c5200d99576.jpeg)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/01dc87fc9f061f3703f533c1e8cf38a650a9b02c.jpeg)

The two extra boards you see connected to the Pi above are [these](https://widgetlords.com/collections/pi-spi-series/products/pi-spi-2a0-raspberry-pi-analog-output-ma-vdc-interface). I have them sending 0 to 10 volt signals out based on the weight received from the serial input.

I originally thought I could get at the problem by checking the logs (which is admittedly something I have never done when using Node-RED). I changed my settings.js file as shown to have the level `debug`:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/6/e60a5ce3d149672757660a30f6990155d2e17e71.png)

but when I run node-red-log, I still get just the `info` type logs:

```auto
21 Sep 13:29:59 - [info] [function:scale weight in] switch= true
21 Sep 13:29:59 - [info] [function:scale weight in] switch= true
21 Sep 13:29:59 - [info] [function:scale weight in] switch= true
21 Sep 13:30:00 - [info] [function:scale weight in] switch= true
21 Sep 13:30:00 - [info] [function:scale weight in] switch= true
21 Sep 13:30:00 - [info] [function:scale weight in] switch= true

```

Can anyone suggest a way to try to log / view what might be happening at the serial port level, just to see if that is indeed the source of the problem?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 September 2022 10:37 UTC](https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073/2 "2022-09-22T10:37:37Z")

</div>

> [@grant1](#):
>
> However, each flow will unexplicably stop

What does "stop" mean?  
Data stops arriving but node-red is still running? Node-red crashes / exits? Something else?

---

<div class="post-metadata">

**Author:** ![grant1](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/grant1/32/49890_2.png) [@grant1](https://discourse.nodered.org/u/grant1)\
**Post date:** [22 September 2022 10:48 UTC](https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073/3 "2022-09-22T10:48:44Z")

</div>

Data stops arriving, but node-red is still running (and node-red shows no error messages that I can find).

I have placed a debug node after each serial node and when the next stop happens, I will see what is displayed.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/ddb22e4563e239b25aeefb444c8a963f3960fecb.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 November 2022 10:48 UTC](https://discourse.nodered.org/t/suspected-serial-port-problem-how-to-view-logs/68073/4 "2022-11-21T10:48:48Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
