Commit Graph
11 Commits
Author SHA1 Message Date
Andrey Skvortsov 37f73c7b6b cli, location: Fix typo in error message
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-09-21 15:32:10 +03:00
Andrey Skvortsov 0e1bfdb5b6 shared-qmi: fix setting URL to supl server
Function mm_parse_suple_address returns TRUE on valid input data
regardless of its type (URL or IP). As a result
qmi_message_loc_set_server_input_set_ipv4 was always called on valid
data. If URL was provided, then 0.0.0.0 ip address was sent to the
modem instead of provided URL.

Fixes: 6e84f3d459 ("iface-modem-location: validate SUPL server address")

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-08-16 21:02:14 +00:00
Andrey Skvortsov f51cc9488b shared-qmi: fix byteorder for supl server IP
It was noted, that when supl server is set using IP address. Modem
doesn't connect to the SUPL server anymore. When IP address is inverted,
then modem connects to SUPL server successfuly.

IP address is stored as uint32_t. According to Telit's documentation [1]
numeric values are encoded in little-endian format in QMI.

After converting IP address from string to binary using inet_pton
IP address is stored in network byte order (big-endian). Therefore it's
needed another convertion from big-endian to host endianness. Final
conversion from host endianness to endianness needed for QMI will be
done in generated
qmi_message_pds_set_agps_config_input_set_location_server_address.

Vendor's Android GNSS hal uses htonl() to convert from struct in_addr
(already in big-endian) before sending QMI request as well [2].

Tested on Quectel EG25-G and SDM845 (OnePlus 6T).

1. FN980 Family Telit Proprietary QMI Command Reference Guide. 4.1.3.1 Byte Ordering
2. https://github.com/ugly-kid-af/device_xiaomi_violet/blob/snow/gps/gnss/GnssAdapter.cpp#L1110

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-08-10 21:05:13 +00:00
Andrey Skvortsov 07aca09af2 polkit,conf: give access to Signal.SetupThresholds() the same way as for Signal.Setup()
Otherwise only Setup() method for suboptimal polling is available to
non-privileged users.

Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-07-30 12:15:53 -05:00
Andrey Skvortsov f0a9aba63b libmm-glib,cell-info: fix documentation for some functions
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-07-30 11:25:07 -05:00
Andrey Skvortsov 7ff47d795c cli,signal: fix typo in debug message for async operations
Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com>
2025-07-30 17:28:45 +03:00
Andrey Skvortsov 4174575d5d quectel: fix debug output if QGPS isn't supported
FEATURE_NOT_SUPPORTED is equal 1 in the enum FeatureSupport, as a
result even if QGPS isn't supported by modem debug message printed
available support.
2023-07-13 08:15:10 +00:00
Andrey Skvortsov 5eb3acee0a shared-qmi: fix memory leak in set_supl_server command
ctx->supl is allocated in mm_shared_qmi_location_set_supl_server
using g_strdup. g_strdup requires to free string when unneeded.

The problem could be reproduced using following commands
```
 while true; do
       mmcli -m any --location-set-supl-server="supl.google.com:7276";
       mem=$(cat /proc/$(pgrep ModemManager)/statm | awk '{print $6}')
       echo $(date +"%s"), $mem | tee -a mm-leak.log;
 done;
```
2023-06-23 23:19:53 +03:00
Andrey Skvortsov 22ba849724 charsets: Add test_text_split_two_pdu_gsm7_extended_chars to use extended character 2022-09-13 20:49:01 +00:00
Andrey Skvortsov 4ebf8ca4e0 sms: fix spliting messages into chunks in gsm7 encoding
1) Not every allowed GSM7 character in UTF-8 incoding takes one
byte. Some (for example, 'à') take several bytes in input string, but
signle byte in GSM7.
2) Extended characters in GSM7 encoding take two bytes.

Otherwise for example sending following SMS fails:

```
 mmcli -m a --messaging-create-sms="text='[wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww',number='+XXXXXXXXXXX'"
Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/99
 mmcli --send -s 99
error: couldn't send the SMS: 'GDBus.Error:org.freedesktop.libqmi.Error.Protocol.WmsEncoding: Couldn't write SMS part: QMI protocol error (58): 'WmsEncoding''
```

```
mmcli -m a --messaging-create-sms="text='|àààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààààà',number='+XXXXXXXXXXX'"
Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/72
mmcli --send -s 72
error: couldn't send the SMS: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.InvalidArgs: Couldn't convert UTF-8 to GSM: input UTF-8 validation failed'
```
2022-09-13 20:49:01 +00:00
Andrey Skvortsov 2ece78c80f charsets: move mm_sms_part_3gpp_util_split_text to mm_charset_util_split_text 2022-09-13 20:49:01 +00:00