Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Bluetooth reconnect timer not stopped after connection, causing unnecessary reconnect cycle

Đang mở Phù hợp với người mới
#4,741 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu trong bluetoothpositionprovider.cpp và đọc socketStateChanged(), đặc biệt là nhánh ConnectedState, cùng với phần xử lý bộ hẹn giờ hiện có trong reconnect() và closeProvider(). Xác minh rằng bộ hẹn giờ được dừng khi socket kết nối, sau đó kiểm tra các tiêu chí chấp nhận: một receiver đã kết nối không nên kích hoạt thêm lần reconnect nào, trong khi kết nối bị mất vẫn phải reconnect.

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

Mô tả

bluetooth bug
Context

When the app resumes and reconnects to an external Bluetooth GNSS receiver, mReconnectTimer keeps running after the socket reaches ConnectedState. When the timer fires, reconnect() closes the healthy socket and starts over, adding a 10–15 s delay before position data is available again.

The timer is stopped in reconnect() and closeProvider(), but not in the ConnectedState branch of socketStateChanged() in bluetoothpositionprovider.cpp.

Log pattern from the user: Connected → "Reconnecting" ~4 s later → Connected again ~13 s after that.

Support ticket: https://support.merginmaps.com/odoo/all-tickets/17049
Related: #2259, #3893, #4588

Solution

Stop mReconnectTimer when the socket reaches ConnectedState.

Acceptance Criteria
  • Once the Bluetooth receiver is connected, no further reconnect attempts are triggered
  • After resuming the app, the receiver connects once and stays connected
  • Reconnection still works when the connection is actually lost
Ngôn ngữ chính
C++
Star
390
Fork
89
Merge trung bình
5 ngày 59 phút
Pull request đã merge (30 ngày)
13

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

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 MerginMaps/mobile

Tất cả issue của MerginMaps/mobile

Issue tương tự

Thêm issue về C++

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.