Advertisement
Guest User

Untitled

a guest
Jul 12th, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. Okay, so it sounds like the serial problem is solved, but something else is wrong (more on that below).
  2.  
  3. strace is a program to trace system-calls, you run ‘strace node-red’ and it logs all the operating system access that the application makes. We’re looking for calls to “open” and “ioctl” on /dev/ttyUSB0. This could tell us whether node-red is using the special io-control operations to set the terminal flags.
  4.  
  5. You can also use stty to view, the port settings while node-red is using the port.
  6.  
  7. # stty -a </dev/ttyUSB0
  8.  
  9. The above will show the port settings. You're looking for two flags "clocal" which means ignore the DSR/DTR pins, and "-rtscts" which means ignore the RTS/CTS pins. Properly configured software can avoid the need for hardware loopbacks, but if the loopbacks
  10.  
  11. So now onto your crashing1:
  12.  
  13. I've been using node red, firmata and FTDI-based arduino with no random crashes, so that's one (anec)data point.
  14.  
  15.  
  16. There are two things to check.
  17.  
  18. 1. You might be running out of memory, and triggering the out-of-memory killer (aka oomkiller).
  19.  
  20. Try this:
  21.  
  22. # grep Out.of.memory /var/log/kern.log
  23.  
  24. I *am* running out of memory from time to time, as I have some first-generation 256M and 512M pis, and the kernel kills the fattest process when this happens, often node-red, eg from my own log:
  25.  
  26. Jul 12 20:51:34 tweety kernel: [209492.223315] Out of memory: Kill process 408 (node-red) score 212 or sacrifice child
  27.  
  28. 2. is node-red telling you why it crashes, or what it was doing right before it crashed? Try this:
  29.  
  30. # grep Node-RED /var/log/daemon.log | tail -100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement