Skip to content

Packet reporting date and time to MCU causes exception #2

Description

@dreamlayers

Any one of these packets causes an exception:

55 AA 00 06 00 08 01 17 09 09 13 09 39 06 92
55 AA 00 06 00 08 01 17 09 09 13 0A 0B 06 65
55 AA 00 06 00 08 01 17 09 09 13 0C 36 06 92
55 AA 00 06 00 08 01 17 09 09 13 0D 2E 06 8B

They are logged from an Inkbird IBS-TH3-WIFI temperature and humidity sensor, sent from the BK7231N based CBU module to the HC32L110C6UA MCU. It contains date, time and day of the week. This is documented at https://developer.tuya.com/en/docs/iot/tuyacloudlowpoweruniversalserialaccessprotocol?id=K95afs9h4tjjh#title-13-Obtain%20the%20local%20time

This is from the backtrace:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at TuyaMCUAnalyzer.FormTuyaMCUAnalyzer.parseDPData(List`1 p, Int32 ofs)
   at TuyaMCUAnalyzer.FormTuyaMCUAnalyzer.displayPacket(List`1 p)
   at TuyaMCUAnalyzer.FormTuyaMCUAnalyzer.refresh()

It is possible to continue using the application after this, though the list of decoded packets gets truncated. As a workaround you can strip these packets out of the file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions