<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Relavak Labs</title>
	<atom:link href="http://relavak.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://relavak.wordpress.com</link>
	<description>Hardware and Software Projects</description>
	<lastBuildDate>Mon, 21 Dec 2009 03:14:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by Peter Barker</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-42</link>
		<dc:creator>Peter Barker</dc:creator>
		<pubDate>Mon, 21 Dec 2009 03:14:05 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-42</guid>
		<description>Works like a charm, thanks.</description>
		<content:encoded><![CDATA[<p>Works like a charm, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by RBJensen</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-41</link>
		<dc:creator>RBJensen</dc:creator>
		<pubDate>Sat, 19 Dec 2009 10:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-41</guid>
		<description>Thanks, Relavak.

The log I pasted doesn&#039;t make much sense, I agree.  I only logged a  short time, until the application had updated both sensors, to hopefully make it easier to understand.
However, something is wrong right now, the application does not work anymore when I enable logging - the tray icon shows up, but the main form never does.
And I can&#039;t kill the application - neither task manager or taskkill/F works, only a reboot.
Somehow the snoop filter seems to block the (inbound?) communication, so I&#039;ll try to on another PC shortly.
I did get the &quot;usb_control_msg&quot; working in my own application, using the same values as the HID TEMPer in your code, and I *think* the internal sensor is being read exactly the same way in my HID temperNTC as the &quot;standard&quot; HID TEMPer:
The result from reading the temperature is a 256-byte array with the values &quot;24 32 49 0 0 0 0 0 &quot; repeated.
24 + 32/256 = 24.125 degrees C - and that value changes to something like 28-30 degrees C when I hold the device in my hand.
So that is half the way to understanding the TEMPerNTC.
I&#039;ve also used Reflector on the TemperNTC application, trying to get some hints, but unfortunately the actual readings from the device is handled by a non-DOT.NET dll, which Reflector cannot disassemble. I saw that the internal temperature is read by only one method call in the dll, so it makes sense that your code also does it in only one method call.
Getting the external temperature is quite more complicated - it seems like the application uses the DLL to read a voltage, dynamically adjusts some sort of gain, and finally uses a lookup table to find the current temperature based on the voltage/resistance characteristics of the NTC. So although it should be possible to snoop the USB communication, making sense of it will probably require tracing the execution of the application simultaneously...</description>
		<content:encoded><![CDATA[<p>Thanks, Relavak.</p>
<p>The log I pasted doesn&#8217;t make much sense, I agree.  I only logged a  short time, until the application had updated both sensors, to hopefully make it easier to understand.<br />
However, something is wrong right now, the application does not work anymore when I enable logging &#8211; the tray icon shows up, but the main form never does.<br />
And I can&#8217;t kill the application &#8211; neither task manager or taskkill/F works, only a reboot.<br />
Somehow the snoop filter seems to block the (inbound?) communication, so I&#8217;ll try to on another PC shortly.<br />
I did get the &#8220;usb_control_msg&#8221; working in my own application, using the same values as the HID TEMPer in your code, and I *think* the internal sensor is being read exactly the same way in my HID temperNTC as the &#8220;standard&#8221; HID TEMPer:<br />
The result from reading the temperature is a 256-byte array with the values &#8220;24 32 49 0 0 0 0 0 &#8221; repeated.<br />
24 + 32/256 = 24.125 degrees C &#8211; and that value changes to something like 28-30 degrees C when I hold the device in my hand.<br />
So that is half the way to understanding the TEMPerNTC.<br />
I&#8217;ve also used Reflector on the TemperNTC application, trying to get some hints, but unfortunately the actual readings from the device is handled by a non-DOT.NET dll, which Reflector cannot disassemble. I saw that the internal temperature is read by only one method call in the dll, so it makes sense that your code also does it in only one method call.<br />
Getting the external temperature is quite more complicated &#8211; it seems like the application uses the DLL to read a voltage, dynamically adjusts some sort of gain, and finally uses a lookup table to find the current temperature based on the voltage/resistance characteristics of the NTC. So although it should be possible to snoop the USB communication, making sense of it will probably require tracing the execution of the application simultaneously&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by relavak</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-40</link>
		<dc:creator>relavak</dc:creator>
		<pubDate>Sat, 19 Dec 2009 05:35:13 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-40</guid>
		<description>The usb_control_msg calls can be found by looking for SetupPacket in the snoop log. The bytes array is then found above the SetupPacket after TransferBufferMDL. The SetupPacket is coded as: byte requesttype, byte request, word value, word index, word size. All words are 2 bytes in little endian order (i.e. lsb first). It looks like the transactions for your device are very different than those of the HID TEMPer device. You are getting 42 bytes of data for each transaction. I have no idea how it is coded. Try changing the temperature and see what changes in those 42 bytes - that might help figure out what in there is temperature and what is other stuff.</description>
		<content:encoded><![CDATA[<p>The usb_control_msg calls can be found by looking for SetupPacket in the snoop log. The bytes array is then found above the SetupPacket after TransferBufferMDL. The SetupPacket is coded as: byte requesttype, byte request, word value, word index, word size. All words are 2 bytes in little endian order (i.e. lsb first). It looks like the transactions for your device are very different than those of the HID TEMPer device. You are getting 42 bytes of data for each transaction. I have no idea how it is coded. Try changing the temperature and see what changes in those 42 bytes &#8211; that might help figure out what in there is temperature and what is other stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by Valarie Moore</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-39</link>
		<dc:creator>Valarie Moore</dc:creator>
		<pubDate>Thu, 17 Dec 2009 17:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-39</guid>
		<description>To help decipher the snooped USB data, it may help if you also provide information on the temperature data logged by the Windows software provided by RDing/PCsensor that corresponds to the USB dump.

Is the device you have this one: http://www.pcsensor.com/Thermometer/1-outer-NTC-sensor-thermometer/prod_27.html ?

Based on the software listing at http://www.pcsensor.com/software/info_5.html it looks like there&#039;s a TEMPerNTC and an HID TEMPerNTC. Do you know which you have?</description>
		<content:encoded><![CDATA[<p>To help decipher the snooped USB data, it may help if you also provide information on the temperature data logged by the Windows software provided by RDing/PCsensor that corresponds to the USB dump.</p>
<p>Is the device you have this one: <a href="http://www.pcsensor.com/Thermometer/1-outer-NTC-sensor-thermometer/prod_27.html" rel="nofollow">http://www.pcsensor.com/Thermometer/1-outer-NTC-sensor-thermometer/prod_27.html</a> ?</p>
<p>Based on the software listing at <a href="http://www.pcsensor.com/software/info_5.html" rel="nofollow">http://www.pcsensor.com/software/info_5.html</a> it looks like there&#8217;s a TEMPerNTC and an HID TEMPerNTC. Do you know which you have?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by RBJensen</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-38</link>
		<dc:creator>RBJensen</dc:creator>
		<pubDate>Wed, 16 Dec 2009 23:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-38</guid>
		<description>Ah, sorry - I had also found the correct &quot;8-parameter&quot; usb_control_msg from a libusb reference page, but since I could not see any references to libusb in the source code I assumed it was using something else. As usual, after making a fool of myself I now see that libusb was mentioned in the main description on the top of this page...Sorry...
Well, I have another request for help. My device is a &quot;temperntc&quot;, which is a dual temperature device, and so none of the code here works right off the bat. Could I ask one of you to help me figuring out which parameters to use? I&#039;ve created a log using UsbSnoop, but I am unable to &#039;decode&#039; it.
Link: http://dora2.drunkardswalk.dk/UsbSnoop.log.txt
Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Ah, sorry &#8211; I had also found the correct &#8220;8-parameter&#8221; usb_control_msg from a libusb reference page, but since I could not see any references to libusb in the source code I assumed it was using something else. As usual, after making a fool of myself I now see that libusb was mentioned in the main description on the top of this page&#8230;Sorry&#8230;<br />
Well, I have another request for help. My device is a &#8220;temperntc&#8221;, which is a dual temperature device, and so none of the code here works right off the bat. Could I ask one of you to help me figuring out which parameters to use? I&#8217;ve created a log using UsbSnoop, but I am unable to &#8216;decode&#8217; it.<br />
Link: <a href="http://dora2.drunkardswalk.dk/UsbSnoop.log.txt" rel="nofollow">http://dora2.drunkardswalk.dk/UsbSnoop.log.txt</a><br />
Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by Valarie Moore</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-37</link>
		<dc:creator>Valarie Moore</dc:creator>
		<pubDate>Wed, 16 Dec 2009 16:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-37</guid>
		<description>I think usb_control_msg exists in two unrelated places. libusb, hosted at www.libusb.org is used with relavak&#039;s software. For usb_control_msg, for example, see http://libusb.sourceforge.net/doc/function.usbcontrolmsg.html The documentation RBJensen found, for the Linux kernel API is probably completely unrelated.</description>
		<content:encoded><![CDATA[<p>I think usb_control_msg exists in two unrelated places. libusb, hosted at <a href="http://www.libusb.org" rel="nofollow">http://www.libusb.org</a> is used with relavak&#8217;s software. For usb_control_msg, for example, see <a href="http://libusb.sourceforge.net/doc/function.usbcontrolmsg.html" rel="nofollow">http://libusb.sourceforge.net/doc/function.usbcontrolmsg.html</a> The documentation RBJensen found, for the Linux kernel API is probably completely unrelated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by relavak</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-36</link>
		<dc:creator>relavak</dc:creator>
		<pubDate>Wed, 16 Dec 2009 04:26:55 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-36</guid>
		<description>According to the usb.h header file in libusb, the calling sequence is:

&lt;blockquote&gt;int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,
        int value, int index, char *bytes, int size, int timeout);
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>According to the usb.h header file in libusb, the calling sequence is:</p>
<blockquote><p>int usb_control_msg(usb_dev_handle *dev, int requesttype, int request,<br />
        int value, int index, char *bytes, int size, int timeout);
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by RBJensen</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-35</link>
		<dc:creator>RBJensen</dc:creator>
		<pubDate>Wed, 16 Dec 2009 00:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-35</guid>
		<description>Hi.

I am trying to convert the code to work on Windows, using LibUsbDotNet, but I am having difficulties figuring out the parameters used in usb_control_msg.

Using google I can only find calls to usb_control_msg with 9 parameters (eg. http://people.nl.linux.org/ftp/pub/anoncvs/kernelnewbies/documents/kdoc/kernel-api/r11386.html ), but your C-code has 8?
Could I kindly ask you to explain what the parameters mean - or perhaps provide me with a link?

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi.</p>
<p>I am trying to convert the code to work on Windows, using LibUsbDotNet, but I am having difficulties figuring out the parameters used in usb_control_msg.</p>
<p>Using google I can only find calls to usb_control_msg with 9 parameters (eg. <a href="http://people.nl.linux.org/ftp/pub/anoncvs/kernelnewbies/documents/kdoc/kernel-api/r11386.html" rel="nofollow">http://people.nl.linux.org/ftp/pub/anoncvs/kernelnewbies/documents/kdoc/kernel-api/r11386.html</a> ), but your C-code has 8?<br />
Could I kindly ask you to explain what the parameters mean &#8211; or perhaps provide me with a link?</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by AssfaceJackson</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-34</link>
		<dc:creator>AssfaceJackson</dc:creator>
		<pubDate>Sun, 13 Dec 2009 16:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-34</guid>
		<description>My TEMPer just showed up in the mail from Hong Kong today! This works for me on Ubuntu Karmic 64-bit. Thanks!</description>
		<content:encoded><![CDATA[<p>My TEMPer just showed up in the mail from Hong Kong today! This works for me on Ubuntu Karmic 64-bit. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on TEMPer Temperature Sensor Linux Driver by kovzol</title>
		<link>http://relavak.wordpress.com/2009/10/17/temper-temperature-sensor-linux-driver/#comment-33</link>
		<dc:creator>kovzol</dc:creator>
		<pubDate>Thu, 10 Dec 2009 16:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://relavak.wordpress.com/?p=17#comment-33</guid>
		<description>I successfully installed your driver. I also modified it a bit for a once only output. Nice code! Thanks!</description>
		<content:encoded><![CDATA[<p>I successfully installed your driver. I also modified it a bit for a once only output. Nice code! Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
