Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Uni-T UT61E+ USB Protocol

License

NotificationsYou must be signed in to change notification settings

mwuertinger/ut61ep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TheUni-T UT61E+digital multimeter can be connected to a PC through the built-in CP2110 UART-USB bridge. This repository contains aclient library for its proprietary protocol.

Using the library

Dependencies

The library is using the cross-platform HIDAPI to communicate with the device. On a Debian based system installing thefollowing packages should be sufficient:

sudo apt install libhidapi-dev libudev-dev

The library is also available for other operating systems but this is untested.

Example

dev,err:=ut61ep.Open("")iferr!=nil {log.Fatalf("open: %v",err)}message,err:=dev.ReadMessage()iferr!=nil {log.Fatalf("readMessage: %v",err)}log.Printf("%f %s",message.Value,message.Unit.String())

Protocol Description

Configuring CP2110

Before any communication with the multimeter can take place the CP2110 UART-USB bridge chip has to be configured by sending feature reports:

// Enable UART0x41, 0x01// Configure UART (9600 baud, parity=NONE, 8 Bit, hardware Flow Control disabled, stop bits short)0x50, 0x00, 0x00, 0x25, 0x80, 0x00, 0x00, 0x03, 0x00, 0x00

Requesting data from the device

Data can be requested by sending the following byte sequence:

0x06, 0xab, 0xcd, 0x03, 0x5e, 0x01, 0xd9

Reply from the device

The device always sends two bytes at a time, the first of which is always a 1 and the second one containing the actualdata byte. The following message description ignores the first byte and shows only the actual data bytes.

The device responds with a 19 byte long message. The first two bytes are constant, the following byte contains themessage length and the remainder is the actual data.

01 AB CD 10 00 00 30 20 30 2e 30 38 35 30 00 01 30 30 30 03-- ----- --    -- --    -----------------             -- |   |    |     |  |            |                      | |   |    |     |  |            |                      | |   |    |     |  |            |                      | |   |    |     |  |            |                       ------ sign / sub-mode |   |    |     |  |             ----------------------------- value |   |    |     |   ------------------------------------------ range |   |    |      --------------------------------------------- mode |   |     --------------------------------------------------- length of the following message |    -------------------------------------------------------- constant preamble  ------------------------------------------------------------ message type

For many of the bytes only the least significant 4-bits are relevant and the most significant 4-bits are 0x30.

References

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp