Building a driver for the Tenma 77-7712 / uni-trend UT322:
This is a log of my efforts to utilize the Tenma 77-7712 thermometer to take kiln readings and use that information under OSX to control the power cycles of my older model kiln with my computer.
There is nice review of the 77-7712 here: http://www.overclockers.com/testing-heatsink-temperatures-tenma-727712-d...
This first post is to present the raw information available from the osx "System profiler, and USB prober:
<>System profiler says:
USB to Serial:
Product ID: 0x2490
Vendor ID: 0x04fa
Version: 0.00
Speed: Up to 1.5 Mb/sec
Manufacturer: Hoitek Semiconductor
Location ID: 0x1d100000
Current Available (mA): 500
Current Required (mA): 100
<>USB probe:
Low Speed device @ 2 (0x1D100000): ............................................. Composite device: "USB to Serial"
Port Information: 0x001a
Not Captive
Attached to Root Hub
External Device
Connected
Enabled
Device Descriptor
Descriptor Version Number: 0x0100
Device Class: 0 (Composite)
Device Subclass: 0
Device Protocol: 0
Device MaxPacketSize: 8
Device VendorID/ProductID: 0x04FA/0x2490 (Dallas Semiconductor)
Device Version Number: 0x0000
Number of Configurations: 1
Manufacturer String: 1 "Hoitek Semiconductor"
Product String: 2 "USB to Serial"
Serial Number String: 0 (none)
Configuration Descriptor: ....................................... "Sample HID"
Length (and contents): 41
Raw Descriptor (hex) 0000: 09 02 29 00 01 01 04 80 32 09 04 00 00 02 03 00
Raw Descriptor (hex) 0010: 00 00 09 21 00 01 00 01 22 25 00 07 05 81 03 08
Raw Descriptor (hex) 0020: 00 0A 07 05 02 03 08 00 0A
Number of Interfaces: 1
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 100 ma
Interface #0 - HID
Alternate Setting 0
Number of Endpoints 2
Interface Class: 3 (HID)
Interface Subclass; 0
Interface Protocol: 0
HID Descriptor
Descriptor Version Number: 0x0100
Country Code: 0
Descriptor Count: 1
Descriptor 1
Type: 0x22 (Report Descriptor)
Length (and contents): 37
Raw Descriptor (hex) 0000: 06 A0 FF 09 01 A1 01 09 01 15 00 26 FF 00 75 08
Raw Descriptor (hex) 0010: 95 08 81 02 09 02 75 08 95 08 91 02 09 03 75 08
Raw Descriptor (hex) 0020: 95 05 B1 02 C0
Parsed Report Descriptor:
Usage Page (65440)
Usage 1 (0x1)
Collection (Application)
Usage 1 (0x1)
Logical Minimum......... (0)
Logical Maximum......... (255)
Report Size............. (8)
Report Count............ (8)
Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield)
Usage 2 (0x2)
Report Size............. (8)
Report Count............ (8)
Output.................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield)
Usage 3 (0x3)
Report Size............. (8)
Report Count............ (5)
Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield)
End Collection
Endpoint 0x81 - Interrupt Input
Address: 0x81 (IN)
Attributes: 0x03 (Interrupt no synchronization data endpoint)
Max Packet Size: 8
Polling Interval: 10 ms
Endpoint 0x02 - Interrupt Output
Address: 0x02 (OUT)
Attributes: 0x03 (Interrupt no synchronization data endpoint)
Max Packet Size: 8
Polling Interval: 10 ms
Current situation: Trying to
Current situation:
Trying to talk to the HID device Tenma 77-7712 from Ubuntu 10 (moved over from osx), using PERL
I can see it in the file structure here:
/dev/usb/hiddev0
I have tested a USB probe against the windows software released by Tenma for monitoring the device, and have a record of that behavior viewable here:
General information:
http://icodemonkey.com/node/37
Specific log files:
http://icodemonkey.com/files/data_connect_capture.pdf
My current dilemma is that I cannot get the thermometer to begin sending data (I think I would be able to read it, if I could start the data)
The behavior with the windows machine is that data doesn't begin to send until you select the connect button. However it doesn't stop flowing when you close the program, so I think if I can just get it started in linux, I can sit back and read the data.
I think I understand how to send hex data to the device, simulating the data viewed from the probe. But for several types of data, the hex data isn't coming through.
It looks a little something like this (the first 17 packets seem to only relate to the OS detecting the device):
Packet view (u - up d - down. up to computer , down to device) - from usb studio
up/down - packet number: info hex if available
d 000018: get descriptor request - type: string - index 0x2 buffer size 0x1fe bytes: language 0x409
u 000019: response: "USB to Serial"
"1c 03 55 00 53 00 42 00 20 00 74 00 6f 00 20 00"
"53 00 65 00 72 00 69 00 61 00 6c 00"
d 000020: get descriptor request - type: string - index 0x0 buffer size 0x1fe bytes: language 0x409
u 000021: response: 04 03 09 04 (setup package 80 06 00 03 09 04 FE 01)
d 000022: get descriptor request - type: string - index 0x0 buffer size 0x1fe bytes: language 0x409
u 000023: response: 04 03 09 04 (setup package 80 06 00 03 09 04 FE 01)
d 000024: 60 09 00 00 03 (hid view report view shows 96 9 0 0 3 - but it is unclear what that means)
u 000025: control transfer up: 60 09 00 00 03 (setup 21 09 00 03 00 00 05 00)
d 000026 bulk or interrupt transfer : setup packet (02 5a 00 00 00 00 00 00)
u 000027: 00 00 00 00 00 00 00 00
u 000029: F0 00 00 00 00 00 00 00
d 000032: 01 01 00 00 00 00 00 00
---- THE PROBLEM ---
I don't know how to send a "get descriptor request" or "bulk or interrupt transfer" from PERL
Capture of temp data flow,
Capture of temp data flow, note the temp is coming across as straight temp, but only for one probe (no data for the other):
Monitor data sketch (roughly 67 degrees F sub 20 C):
(17)60 09 00 00 03
(18)60 09 00 00 03
(22o)02 5A 00 00 00 00 00 00 (first seven in 22, last one in 23 - offset seven)
(32o) 01 01 00 00 00 00 00 00
(35i) F0 00 00 00 00 00 00 00
(40i) F0 00 00 00 00 00 00 00
(44i)F0 00 00 00 00 00 00 00
(48i)F0 00 00 00 00 00 00 00
(52i)F2 32 3A 00 00 00 00 00
(56i)F3 36 37 31 00 00 00 00
(60i)F2 32 30 00 00 00 00 00
(64i)F2 30 30 00 00 00 00 00
(68i)F1 31 00 00 00 00 00 00
(72i) F2 30 30 00 00 00 00 00
(76i)F4 36 30 26 43 00 00 00
(80i) F3 30 0D 0A 00 00 00 00(0)
(84i)F0 00 00 00 00 00 00 00
(88i) F0 00 00 00 00 00 00 00
(92i) F0 00 00 00 00 00 00 00
(96i) F0 00 00 00 00 00 00 00
(100i) F0 00 00 00 00 00 00 00
(102i)F0 00 00 00 00 00 00 00
(108i)F2 32 3A 00 00 00 00 00(2:)
(112i)F3 36 37 31 00 00 00 00(671)
(116i) F4 32 30 30 30 00 00 00(2000)
(120i) F3 31 30 30 00 00 00 00 (100)
(124i)F4 36 30 26 43 00 00 00 (60&C)
(128i) F3 31 0D 0A 00 00 00 00 (1)
8 empty - F0 00 00 00 00 00 00 00
(164i) F2 32 3A 00 00 00 00 00(2:)
(168i)F2 36 37 00 00 00 00 00(67)
(172i)F2 31 32 00 00 00 00 00(12)
(176i) F1 30 00 00 00 00 00 00(0)
(180i)F4 30 30 31 30 00 00 00(0010)
(184i)F3 30 36 30 00 00 00 00(060)
(188i)F4 26 43 31 0D 00 00 00(&C1)
(192i)F1 0A 00 00 00 00 00 00
7 empty
(224i)F4 32 3A 36 37 00 00 00(2:67)
(228i)F3 31 32 30 00 00 00 00(120)
(232i) F4 30 30 31 30 00 00 00(0010)
(236i)F3 30 36 30 00 00 00 00(060)
(240i)F4 26 43 31 0D 00 00 00(&C1)
(244i)F1 0A 00 00 00 00 00 00
10 empty
(288i)F2 32 3A 00 00 00 00 00(2)
(292i)F2 36 37 00 00 00 00 00(67)
(296i) F2 31 32 00 00 00 00 00(12)
(300i)F1 30 00 00 00 00 00 00(0)
(304i)F2 30 30 00 00 00 00 00(00)
(308i)F2 31 30 00 00 00 00 00(10)
(312i)F2 30 36 00 00 00 00 00(06)
(316i)F1 30 00 00 00 00 00 00(0)
(320i)F2 26 43 00 00 00 00 00(&C)
(324i)F2 31 0D 00 00 00 00 00(1)
(328i)F1 0A 00 00 00 00 00 00
9 empty
(368i)F1 32 00 00 00 00 00 00
snip to last in batch:
(904i)F2 32 3A 00 00 00 00 00 (2)
(908i) F1 36 00 00 00 00 00 00 (8)
(908i)F2 36 39 00 00 00 00 00 (69)
(916i)F2 32 30 00 00 00 00 00 (20)
(920i)F1 30 00 00 00 00 00 00 (0)
(924i)F2 30 31 00 00 00 00 00 (01)
(928i)F2 31 30 00 00 00 00 00 (10)
(932i)F2 36 30 00 00 00 00 00 (60)
(936ii)F1 26 00 00 00 00 00 00 (&)
(940i)F2 43 31 00 00 00 00 00 (C1)
(944i)F2 0D 0A 00 00 00 00 00
(begin empty)
----------------
Next batch at high temp (107.9):
Starting after a set of zeros:
(43i)F1 36 00 00 00 00 00 00 (6)
(47i)F2 31 30 00 00 00 00 00 (10)
(51i)F2 37 37 00 00 00 00 00(77)
(55i)F1 32 00 00 00 00 00 00 (2)
59 F2 30 30 00 00 00 00 00 (00)
63 F2 30 30 00 00 00 00 00 (00)
67F1 31 00 00 00 00 00 00 (1)
71F2 31 30 00 00 00 00 00(10)
75F2 30 26 00 00 00 00 00(0&)
79F2 43 31 00 00 00 00 00 (C1)
begin empty
---- again at 111.3
61
11
02
0
00
01
15
0
&C
1
Ran 42.something C
6
4
26
10
0
00
11
80
&C1
ran 290.5 K
6
29
09
3
00
00
12
0
0&
C1
Here is a datalog of usb
Here is a datalog of usb traffic during connection:
http://icodemonkey.com/files/data_connect_capture.pdf