mirror of
https://github.com/4IceG/luci-app-3ginfo-lite.git
synced 2026-04-25 11:25:50 +03:00
[GH-ISSUE #121] 3ginfo.sh returning malformed JSON on 1.0.75 #95
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/luci-app-3ginfo-lite#95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raenye on GitHub (May 11, 2025).
Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/121
Please note the SINR parameter, it became unterminated and the JSON is invalid.
(modem is Sierra Wireless MC7430).
Please advise, thanks.
1.0.74
1.0.75
@4IceG commented on GitHub (May 12, 2025):
Hi,
Show me debugging result, I don't know what the script shows. Writing that there is an error doesn't help, I don't have a crystal ball.
@raenye commented on GitHub (Jun 5, 2025):
OK, I found the problem.
TL;DR
Suggestion for fix:
Long version
In version 1.0.74 the last few lines of
/usr/share/3ginfo-lite/3ginfo.share:while version 1.0.75 adds sanitization:
But there is something missing for
sinr: the removal of'\r'.Indeed, see the CR (
0x0d) between"-4.4and the closing":Maybe the correct approach is to make sure the script in
/usr/share/3ginfo-lite/modem/usb/does not output a malformed number, and in particular have/usr/share/3ginfo-lite/modem/usb/11999071strip correctly the carriage return.This is what the TL;DR code above implements.