Changes between Initial Version and Version 1 of USB


Ignore:
Timestamp:
06/01/21 14:05:57 (3 years ago)
Author:
krit
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • USB

    v1 v1  
     1= USB =
     2
     3Fix 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/
     6total 0
     7lrwxrwxrwx 1 root root 13 Jun  1 02:53 usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB1
     8lrwxrwxrwx 1 root root 13 Jun  1 02:53 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_2c67e783c72aea119cabbdfad0cd4f36-if00-port0 -> ../../ttyUSB0
     9}}}
     10
     11Then, 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
     15TTY /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0
     16READ_TIME 1000
     17LOG_TYPE 1
     18LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
     19CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
     20HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
     21SENSORS 1
     22ROM 0 0x28 0xFF 0x64 0x1E 0x39 0xE1 0x30 0x34
     23[jpc@rock ~]$
     24}}}
     25
     26We can read Temperatue with
     27{{{
     28[jpc@rock ~]$ digitemp_DS9097 -a -q -c /etc/digitemp.conf
     29Jun 01 21:04:18 Sensor 0 C: 28.00 F: 82.40
     30[jpc@rock ~]$
     31}}}