[GH-ISSUE #117] Error: JSON.parse: bad escaped character at line 14 column 33 of the JSON data #92

Open
opened 2026-03-04 11:58:34 +03:00 by kerem · 1 comment
Owner

Originally created by @DummyPayload on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/117

Bananapi BPI-R4 with Quecktel RM520N-GL (mbim)
Cannot show any info in luci app, only shows mentioned error.
Error line points into operator name, maybe those "\0D\0A" are doing something nasty here?

partial sh -x /usr/share/3ginfo-lite/3ginfo.sh output:

{
"conn_time":"0d, 00:02:59",
"conn_time_sec":"179",
"conn_time_since":"20250417182906",
"rx":"21.9 MiB",
"tx":"6.6 MiB",
"modem":"Quectel RM520N-GL",
"mtemp":"47 °C",
"firmware":"RM520NGLAAR03A04M4G",
"cport":"/dev/ttyUSB3",
"protocol":"mbim",
"csq":"21",
"signal":"67",
"operator_name":"Mobile Vikings\0D\0A",
"operator_mcc":"260",
"operator_mnc":"06",
"location":"Poland",
"mode":"LTE-A B3 (1800 MHz) + B1 (2100 MHz) / B20 (800 MHz)",
"registration":"1",
"simslot":"1",

Originally created by @DummyPayload on GitHub (Apr 17, 2025). Original GitHub issue: https://github.com/4IceG/luci-app-3ginfo-lite/issues/117 Bananapi BPI-R4 with Quecktel RM520N-GL (mbim) Cannot show any info in luci app, only shows mentioned error. Error line points into operator name, maybe those "\0D\0A" are doing something nasty here? partial sh -x /usr/share/3ginfo-lite/3ginfo.sh output: ``` { "conn_time":"0d, 00:02:59", "conn_time_sec":"179", "conn_time_since":"20250417182906", "rx":"21.9 MiB", "tx":"6.6 MiB", "modem":"Quectel RM520N-GL", "mtemp":"47 °C", "firmware":"RM520NGLAAR03A04M4G", "cport":"/dev/ttyUSB3", "protocol":"mbim", "csq":"21", "signal":"67", "operator_name":"Mobile Vikings\0D\0A", "operator_mcc":"260", "operator_mnc":"06", "location":"Poland", "mode":"LTE-A B3 (1800 MHz) + B1 (2100 MHz) / B20 (800 MHz)", "registration":"1", "simslot":"1", ```
Author
Owner

@DummyPayload commented on GitHub (Apr 18, 2025):

following issue #102 advise:
"operator_name":"${COPS%'\0D\0A'}",
seems to do the trick - maybe will propose MR later with fix

<!-- gh-comment-id:2814594775 --> @DummyPayload commented on GitHub (Apr 18, 2025): following issue #102 advise: "operator_name":"${COPS%'\0D\0A'}", seems to do the trick - maybe will propose MR later with fix
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/luci-app-3ginfo-lite#92
No description provided.