| | 1 | = USB = |
| | 2 | |
| | 3 | Fix port usb Digitemp read Temperature, find out where the link find to ttyUSB0 or ttyUSB1 |
| | 4 | {{{ |
| | 5 | [root@rock rules.d]# ls -l /dev/serial/by-id/ |
| | 6 | total 0 |
| | 7 | lrwxrwxrwx 1 root root 13 Jun 1 02:53 usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB1 |
| | 8 | lrwxrwxrwx 1 root root 13 Jun 1 02:53 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_2c67e783c72aea119cabbdfad0cd4f36-if00-port0 -> ../../ttyUSB0 |
| | 9 | }}} |
| | 10 | |
| | 11 | Then, we config /etc/digitemp.conf to point to softlink file ttyUSB1. In this case, point to usb-Prolific_Technology_Inc. |
| | 12 | {{{ |
| | 13 | [jpc@rock ~]$ cat /etc/digitemp.conf |
| | 14 | #TTY /dev/ttyUSB1 |
| | 15 | TTY /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 |
| | 16 | READ_TIME 1000 |
| | 17 | LOG_TYPE 1 |
| | 18 | LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F" |
| | 19 | CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C" |
| | 20 | HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%" |
| | 21 | SENSORS 1 |
| | 22 | ROM 0 0x28 0xFF 0x64 0x1E 0x39 0xE1 0x30 0x34 |
| | 23 | [jpc@rock ~]$ |
| | 24 | }}} |
| | 25 | |
| | 26 | We can read Temperatue with |
| | 27 | {{{ |
| | 28 | [jpc@rock ~]$ digitemp_DS9097 -a -q -c /etc/digitemp.conf |
| | 29 | Jun 01 21:04:18 Sensor 0 C: 28.00 F: 82.40 |
| | 30 | [jpc@rock ~]$ |
| | 31 | }}} |