Consortium
Activities
Projects
Forge
Events
Log-in
Register
Aspire :: OSGi Bundles :: TEMPerProducer
Space Menu
Consortium
|
Solutions
|
Middleware
|
Forge
|
MyObjectWeb
|
PDF
|
History
|
More Actions
View
Code
|
XML
|
Help
Documentation
|
XWiki Syntax
|
1 Aspire :: OSGi Bundles :: TEMPerProducer ---- #toc("" "" "true") ---- This section describes the bundle for TEMPer sensor 1.1 Context The TEMPer is a USB-to-serial low-cost thermometer. It can be ordered from many websites. One of the cheapest is http://www.dealextreme.com/details.dx/sku.7003 . The TEMPerProducer bundle registers one Producer service producing Measurement, Double or String objects (unit is K). *WARNING:*\\ as seen on the Internet, there are two versions of this stick. The current bundle has been tested with the gray version (old one apparently). A blue version exists, with a different data transmission protocol. 1.1 Dependencies This bundle requires : * OSGi R4 Compendium, available from OBR in Felix Shell * RXTX, available from Aspire SVN Repository/archive/rfidsuite/rfidsuite/bundles/rxtx/ 1.1 Build 1.1.1 Sources * trunk/bundles/sensors/temperproducer/ 1.1.1 Device installation Under Windows # you must install the USB-to-Serial driver on your host with the CD provided with the USB stick (USB Driver/setup.exe). # you may install the demonstration application (CD > TEMPer V8.1/setup.exe) to test the thermometer. # inspect the serial COM port from "System Properties > Hardware > Device Management > Ports (COM and LPT) > USB-SERIAL (COMxx)" Under Linux # put the device on a USB port # In dmesg, you should see a line like : ~~usb 7-2: ch341-uart converter now attached to *ttyUSB0*~~ # In this case, *ttyUSB0* is the serial port to use to read data from the stick. *WARNING:*\\ Reading serial ports through /dev requires root rights.\\ Some hints to bypass that problem may be given here later. Then # cd trunk/bundles/sensors/temperproducer # configure the serial port in src/main/java/org/ow2/aspirerfid/sensor/temperproducer/TEMPerProducer.java # mvn clean install 1.1 Configuration You must configure the properties for your dongle in the source (currently).\\ The default values are a COM14 port and a poll each 2 seconds. See org/ow2/aspirerfid/sensor/temperproducer/TEMPerProducer.java * Hard coded COM port : ** Default Value : ~~String portName = "COM14";~~ ** Under Linux, you should use : ~~String portName = "/dev/ttyUSB0";~~ * Poll delay : ** Default value : ~~int POLLDELAY = 2000;~~ 1.1 Artifacts The artifact to deploy is * org.ow2.aspirerfid:org.ow2.aspirerfid.temperproducer 1. Tests 1.1 Under Linux Tested under Fedora 13 (64 bits), kernel 2.6.33, with included driver It seems that there is an alternance between a correct value and a constant value.\\ All the results looked like : <pre> 529.0875 K 305.15 K 529.0875 K 305.65 K 529.0875 K 308.15 K 529.0875 K </pre> Where 305 K is a correct value (around 30°C), and 529.0875 (around 255.9°C) seems to be a control value. 1.1 Under Windows Tested under Windows 7 Professional (32 bits), with the provided driver (on the CD-Rom). Works fine, no problem found.