Second Init (0x31) packet variant is unrecognized and trips the 'Unexpected init packet' warning

Đang mở
#42 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Read crates/pod-proto/src/sensor/packet.rs around parse_init (lines 205–215) and inspect the captured frame in the TODO. Compare the 0x0b and 0x0c variants and trace how the Init body is parsed. Done means the discriminator is understood, both captured variants are handled without spurious warnings, and relevant tests cover them.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

parse_init (crates/pod-proto/src/sensor/packet.rs:207-215) hard-codes the expected body as 00 00 00 0b 00 00 and warns for anything else, but the // TODO FIXME at packet.rs:205 records a real captured frame 31 00 00 00 0c 00 00 1d 22 00 (byte differs: 0x0c vs 0x0b). That second Init subtype currently still parses (the check only warns, not errors) but logs a spurious warning on every occurrence and its differing field is not understood/decoded. Worth capturing what the 0x0b/0x0c discriminator means and widening the accepted structure so real Init frames stop warning.


Filed from a repo-wide code audit (working tree at bcad746).

Ngôn ngữ chính
Rust
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GoogleBot42/podd

Tất cả issue của GoogleBot42/podd

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.