Thursday, March 24, 2016

Arduino IDE and persistent serial port (Linux)

In the development of a little project with Arduino, I have to plug and unplug the USB cable a lot of times.
And I have a big annoyance: every time I plug the USB cable again, the port name changes from /dev/ttyUSB0 to /dev/ttyUSB1 and vice versa. So, in the IDE I have to go in Tools -> Port menu and select the right serial port every time before uploading the new sketch.
What a bore!

I've found this post, but the Arduino IDE seems that doesn't detect fancy names like /dev/arduino, but only names starting with "tty".

So my solution, in order to get a persistent name, is based on the blog post, but using a different port name:

sudo vi /etc/udev/rules.d/98-usb-serial.rules

SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB10"

Reload udev rules with:

sudo udevadm control --reload-rules -R

Now in the IDE you can select this port and it never change every time you unplug and plug the USB cable.

Monday, March 14, 2016

OMD: python problem after CentOS yum update

After yum update I got a problem, related to python, with check_mk in the OMD implementation.


  • CentOS 7
  • check_mk 1.2.4p5
  • omd-1.20

In the check_mk web page you can see a lot of messages like this in each "Check_MK inventory" check.

(Return code of 5 is out of bounds)

and if you issue the check_mk command you get

Cannot read file /omd/sites/prod/share/check_mk/modules/ 'frozenset' object is not callable

My solution was:

cp /omd/versions/1.20/lib/python/ /omd/versions/1.20/lib/python/

cp /usr/lib64/python2.7/ /omd/versions/1.20/lib/python/