Skip to content

CO2 Monitor Sample. ZyAura ZG-01 sensor based modules.

License

Notifications You must be signed in to change notification settings

nikvoronin/Co2.Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Co2.Monitor

ZyAura ZG-01 sensor based modules.

Generic Device Look

  • Product: USB-zyTemp
  • Manufacturer: Holtek Semiconductor, Inc.
  • SerialNumber: 2.00
  • VID: 0x04D9
  • PID: 0xA052

Programming with HidSharp

Console Application Log

Find and try to get a device with pair of vid/pid:

HidDevice? hid =
    DeviceList.Local
    .GetHidDevices( VID, PID )
    .FirstOrDefault();

Open hid stream, then set feature flags with zero filled array magic_table:

using var hidStream = hid.Open();

byte[] magic_table = new byte[9];
hidStream.SetFeature( magic_table );

We are ready to read (poll) data packets:

var raw = hidStream.Read()[1..];

Related Projects

Additional Reading List

Protocol Analysis

Unique Packet Ids

  • Communication: 6D, 6E, 71, 50, 57, 56, 41, 43, 42, 4F, 52
  • Startup: 63, 64, 28, 29, 26, 25, 71, 45, 79, 75, 2E, 41, 47, 49, 72, 69, 4B, 51, 6F, 6C, 76, 77, 7A, 78, 53, 3D, 60, 54, 7B, 55, 4E, 3A, 58, 70, 73, 68, 2F, 4C, 3B, 5D, 5E, 66, 4D, 5B, 59, 65, 6E, 5C, 74

Startup Data Snapshot

281563A00D000000        5475
291649880D000000        5705
261CD7190D000000        7383
252990DE0D000000        10640
710000710D000000        0
457FFFC30D000000        32767
79FEE75E0D000000        65255
751220A70D000000        4640
2E04B0E20D000000        1200
414380040D000000        17280
470376C00D000000        886
490A6ABD0D000000        2666
724C26E40D000000        19494
6919AA2C0D000000        6570
4B4DF78F0D000000        19959
510201540D000000        513
6FC350820D000000        50000
6C0835A90D000000        2101
766014EA0D000000        24596
77128E170D000000        4750
7A0FD55E0D000000        4053
780000780D000000        0
532666DF0D000000        9830
3D8000BD0D000000        32768
603DF3900D000000        15859
54224DC30D000000        8781
7B0A3DC20D000000        2621
5500BE130D000000        190
4E0D87E20D000000        3463
3A04013F0D000000        1025
58635F1A0D000000        25439
700BB8330D000000        3000
730A05820D000000        2565
6803208B0D000000        800
2F1333750D000000        4915
4C00004C0D000000        0
3B0190CC0D000000        400
5D00005D0D000000        0
5EFFF3500D000000        65523
660000660D000000        0
4D0064B10D000000        100
5B0190EC0D000000        400
5901F24C0D000000        498
650190F60D000000        400
6E001E8C0D000000        30
5C07D0330D000000        2000
749EFF110D000000        40703