[GLLUG] Reading USB serial port broken

Dimitrios Siganos dimitris at siganos.org
Fri Sep 20 14:25:45 UTC 2019


In that case, your problem is likely to be with the DSR pin handling.
Experiment with dsrdtr flow control and with toggling the dsr pin manually.


On Fri, 20 Sep 2019 at 14:40, Henrik Morsing via GLLUG <
gllug at mailman.lug.org.uk> wrote:

> On Fri, Sep 20, 2019 at 01:23:44PM +0100, Adrian McMenamin via GLLUG wrote:
> >Did permissions change on your script or on the python exec on an update?
> >Sorry, just a guess but if an ordinary user can see what's crossing the
> >port but your code can't that would seem like something to check.
>
> Hi,
>
> Munin runs as root:
>
> root      1386  0.0  0.0  24212  3560 ?        Ss   Aug31   1:26
> /usr/bin/perl -wT /usr/sbin/munin-node
>
> Device is set as per recommendation:
>
> root at albert:/dev# ls -l ttyACM0
> crw-rw---- 1 root dialout 166, 0 Sep 20 14:32 ttyACM0
>
> Python script as follows:
>
> root at albert:/dev# ls -l /etc/munin/plugins/mvhr_temp
> lrwxrwxrwx 1 root root 41 Dec 23  2018 /etc/munin/plugins/mvhr_temp ->
> /usr/local/munin/lib/plugins/mvhr_temp.py
> root at albert:/dev# ls -l /usr/local/munin/lib/plugins/mvhr_temp.py
> -rwxr-xr-x 1 root staff 1085 Sep 20 11:51
> /usr/local/munin/lib/plugins/mvhr_temp.py
>
> And python:
>
> root at albert:/dev# ls -l $(which python2.7)
> -rwxr-xr-x 1 root root 3685224 Apr  6 02:42 /usr/bin/python2.7
>
> I run tail as root, haven't tried anything else. And the python/munin
> module can open the device, it just gets no output unless tail reads it as
> well.
>
> TBH, Arduinos reboot when something opens the port, and that is how my
> Arduino code works.
>
> I think the problem is not so much that python/munin can't read the output
> but that the Arduino doesn't output anything because it no longer gets the
> signal to reset when python opens it.
>
> Thanks
>
>
> --
> GLLUG mailing list
> GLLUG at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/gllug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20190920/fcf8f5ee/attachment.html>


More information about the GLLUG mailing list