thinkpad x230 i7 fan noise with Ubuntu 16.04-2

My thinkfan.conf is working but it still makes a lot of noise (and with Ubuntu 14 and Debian 8 it didn’t)

root@x230:/home/iker# cat /etc/thinkfan.conf

hwmon /sys/devices/virtual/hwmon/hwmon0/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input
hwmon /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input

(0, 0,  53)
(1, 53, 66)
(2, 64, 68)
(3, 66, 70)
(4, 68, 73)
(5, 71, 76)
(7, 74, 32767)

mushroom risotto

Ingredients for 2 people:

two small onions or one big onion
two hundred grams of mushrooms
180 gram of rice
two cloves of garlic
extra virgin olive oil
butter 10 grams
black pepper
parmesan cheese (optional)

1) cut onions in small pieces
2) put the onions in a pan and a little bit of watter on number 7/10 for 5 minutes.
check that they don’t burn.
3) Boil some water in the kettle
4) cut the mushrooms and the garlic
5) put the rice with the onions and add some water. mix every couple of minutes.
when the water is finished add more water
6) put the mushrooms and the garlic in a pan
7) mix every minute
8) grate the parmesan cheese
9) When the rice is ready [about 10 minutes] add pepper and parmesan cheese. mushrooms and a  bit of water.


I am doing some things with snmp and I will use this post as a pastebin.

pseudo switch

# apt-get install snmpd
# vim  /etc/snmp/snmpd.conf
agentAddress  udp:161
rocommunity   public

to use snmpwalk on another machine, in my case nagios:
# apt-get install snmp
$ snmpwalk -v 2c -c public


Usually nagios uses the NRPE client but for snmp it is not used.

root@nagios:/etc/nagios3/conf.d# vim services.cfg

define service {
name                                         switch_uptime
use                                             generic-service
service_description             switch_uptime
check_command                   snmp_UpTime!-C public
#   hostgroup_name                 all
host_name                             unswitch

define command{
command_name    snmp_UpTime
command_line    $USER1$/check_snmp -o -H $HOSTADDRESS$ $ARG1$

# iso. = 1.

root@nagios:/etc/nagios3/conf.d# vim hosts.cfg

define host {
use                        generic-host
host_name        unswitch

root@tt01:/etc/nagios3/conf.d# vim hostgroups.cfg

define hostgroup {
hostgroup_name     all
members                   unserver,unswitch


Test via command line without using the web server:

root@nagios:/etc/nagios3/conf.d# /usr/lib/nagios/plugins/check_snmp -o -C public




differences between for and while in C

They’re not equivalent. They differ in the use of continue;

If you use continue inside a while it does not increment “i” but if you use it inside a for loop it does increment “i” before going to the next cycle.


#include <stdio.h>
int main(){

int i=0,a=b=2;

     printf("%d ",i);
     if (a==b) continue;
     printf("never here");
 While (i!=3){ // infinite loop
    printf("%d ",i);
    if (a==b) continue;
    printf("never here");


senselock under linux

iker@L450:/etc/udev/rules.d$ dmesg|tail

[ 3991.672990] usb 1-1: new low-speed USB device number 20 using xhci_hcd
[ 3991.864469] usb 1-1: New USB device found, idVendor=0471, idProduct=485e
[ 3991.864472] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3991.864474] usb 1-1: Product: Elite4 2.x
[ 3991.864475] usb 1-1: Manufacturer: Senselock
[ 3991.864610] usb 1-1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[ 3991.905815] hid-generic 0003:0471:485E.0010: hiddev0,hidraw0: USB HID v1.10 Device [Senselock Elite4 2.x] on usb-0000:00:14.0-1/input0

but hiddev0 needs to have propper permissions.

iker@L450:/etc/udev/rules.d$ cat /etc/group|grep plugdev


iker@L450:/etc/udev/rules.d$ cat 99-senselock.rules

KERNEL=="hiddev*", ATTRS{idVendor}=="0471", MODE="0660", GROUP="plugdev"

iker@L450:/etc/udev/rules.d$ sudo udevadm trigger

PD: I don't like senselock and it is not secure, just annoying. I was asked to use it. Since the device can no longer use new versions of Keil people are using only 8052AH simple mode and the advanced functions senselock once had are unusable so the security it provides actually is silly. I DO NOT recommend Senselock.

Arduino nano and CJMCU board, 1 side PCB

Using only 1 side PCB, no wires and requiring minimum space.

Quadrature encoder pins go to Arduino Nano’s interrupt pins.

Digital side RST, A07, A04, A03 and A02 are not connected.

CJMCU motor board is the tipical ST VNH2SP30 chinese board (I’ve more posts about it)

I’ve put it vertically.