Page 1 of 1

How to debug serial port sensors

Posted: Saturday 03 June 2017 21:31
by Cyberwizzard
I'm trying to debug my custom MySensors gateway and a standard RFLink gateway, both of which connect via serial port to my Synology NAS running Domoticz.

I read every now and then in topic on this forum that people log the traffic on the serial port: how is that enabled? I only found the standard Domoticz log in the web GUI but that one does not show serial traffic.

Re: How to debug serial port sensors

Posted: Monday 05 June 2017 21:28
by RidingTheFlow
Try strace, e.g.:

Code: Select all

sudo strace -s 1000 -e trace=writev,readv -fp "`pidof domoticz`"
You will see serial calls among others and can narrow down to specific file descriptor that corresponds to interested serial port device.

That if you want to debug with Domoticz running.

Or you can stop domoticz and do "screen /dev/name-of-your-RFLink-tty"

Re: How to debug serial port sensors

Posted: Monday 05 June 2017 22:56
by Cyberwizzard
Thanks!

I think I narrowed down the issue to the serial port driver: the cdc-acm driver seems to hang on my Synology; on any other system the serial communications works fine, just on my NAS it stalls.