Skip to content

Gid parse fix#173

Merged
rslater-cs merged 3 commits intodevfrom
gid-parse-fix
Feb 23, 2026
Merged

Gid parse fix#173
rslater-cs merged 3 commits intodevfrom
gid-parse-fix

Conversation

@rslater-cs
Copy link
Contributor

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Description

A partner box was not able to connect to the internet via either modems. When the same sim was tried on an older box with older software both modems could connect.

After investigation it was found that the sim card had a GID1 of FF. The current code parsed GID1 as a hex string in the form HH:HH:HH:HH:... which was dependent on colons being present, this meant that the GID1 for this sim was never successfully parsed. GID1 is a requirement for APN selection so the absence of it stopped any connection requests from being made.

[ERROR 09:28:27] ./services/gsm.lua:339: GSM - Autoconnect (primary):  State function for state registered failed, reason: gid: deadline_exceeded, retrying after 20 seconds
[/dev/cdc-wdm1] Successfully read information from the UIM:
Card result:
        SW1: '0x90'
        SW2: '0x00'
Read result:
        FF

I have updated the GID parsing to no longer use the general purpose qmi to table converter as it does not catch this edge case and is not worth fixing while our fibers-next migration drops this utility. The new parsing is more robust for extracting GID.

Related Issues, Tickets & Documents

https://app.clickup.com/t/869c3r94g

Manual test

  • 👍 yes
  • 🙅 no

Manual test description

I have run this code on bb-ss, bb-v1 and the original box which presented the issue, all passed. scp the code over and rerun device code, make sure the modems connect

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

@rslater-cs rslater-cs requested review from corp0529 and cpunt February 18, 2026 16:09
@rslater-cs rslater-cs marked this pull request as ready for review February 23, 2026 16:19
@cpunt cpunt requested a review from Copilot February 23, 2026 16:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes GID1 parsing for QMI UIM reads so SIMs that return non-colon-delimited hex (e.g. FF) are parsed correctly and can be used for MVNO/APN selection.

Changes:

  • Replace GID1 parsing in the QMI modem mode driver with a simpler extraction that does not rely on the generic qmicli-to-table parser.
  • Add a new Lua test file covering simple/complex GID1 outputs and the qmicli command error path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/services/hal/drivers/modem/mode/qmi.lua Updates uim_get_gids() to parse GID1 directly from qmicli --uim-read-transparent output.
tests/test_hal_qmi.lua Adds tests for the updated GID1 parsing behavior and error handling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@cpunt cpunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rslater-cs rslater-cs merged commit 379c56f into dev Feb 23, 2026
@rslater-cs rslater-cs deleted the gid-parse-fix branch February 23, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants