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 http://hintshop.ludvig.co.nz/ 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.
Thursday, March 24, 2016
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.
Environment:
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/check_mk_base.py: 'frozenset' object is not callable
Environment:
- 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/check_mk_base.py: 'frozenset' object is not callable
My solution was:
cp /omd/versions/1.20/lib/python/hashlib.py /omd/versions/1.20/lib/python/hashlib.py.OLD
cp /usr/lib64/python2.7/hashlib.py /omd/versions/1.20/lib/python/hashlib.py
Thursday, March 10, 2016
Subscribe to:
Posts (Atom)