/kernel_reloaded/

Author:

Other contacts

Novi članci

Flickr Goodness

Categories

June 19, 2013 @ 21:14

Reading temperature with WR703N and DS18B20 on OpenWrt

temp_sensor

 
You can easily get temperature readings from external Dallas DS18S20 sensors (1-wire protocol) on your TP-Link WR703N.
 
First things first, grab your credit card and order few Dallas DS18S20 sensors and usb to serial adapters. Now you need to connect Dallas DS18S20 sensor to USB to serial adapter.
 
After you got hardware part sorted now you need to setup software part. Main tool for reading temperature from 1-wire sensors is digitemp. Digitemp uses bit-banging to emulate 1-wire protocol over serial port.
 
opkg install digitemp
 
You also need usb to serial kernel module (driver) so install that also:
 
opkg install kmod-usb-serial-cp210x
 
After digitemp is installed you need to search 1-wire bus for all connected sensors, each sensor has it’s unique address so is has to be discovered and added to config file with this command:
 
digitemp_DS9097 -s /dev/ttyUSB0 -i
 
Now you can read temperature from your sensor:
 
digitemp_DS9097 -a -q
 

Filed under diy, english, gadgets, wireless

  •  Tomáš Pavel

    So I just solder it together and it works? That looks easy.

    Recent Comments

    •  Tomáš Pavel: So I just solder it together and it works? That looks easy.
    • Valent Turkovic: NetVideoHunter (plugin) NetVideoHunter is a Firefox add-on (extension), and you can easily download...
    • Valent Turkovic: Also interesting, Google+ Share – https://addons.mozilla.org/en- US/firefox/addon/google-sha...
    • sf_jeff: Did you look under the “View” tab under the computer on the left?
    • blahmer anagas: set get fans at full speed hp linux, how can i set my fans to full speed on my hp 6530b 6730b? ^ just...

    Archives

    del.icio.us

    Flickr photostream

    04-15-2014 20997
    IMG_8786.jpg
    IMG_4637
    Bastei Jack Slade 7 inside 1
    DSC0110.JPG
    image
    IMG_9544
    Gene Williams Retirement 2014 (43)
    T & J.

    Meta meta :)