| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 2001, in the RIL repository[1], the SIM states were separated from
the radio states by the following commit:
2bc78d614e349574426d198c37e51ccb7455b5bb
2bc78d61 Separate SIM states from Radio States
Then in 2016 the SIM states were removed from the RADIO_STATES by the
following commit:
2baf72329c43d9e3f7850973f087176f535e31e8
2baf7232 Remove deprecated RADIO_STATES
So to be compatible with recent rild, we need to convert the code to
use separate SIM states.
This was tested on Replicant 4.2 with a Galaxy SIII (GT-I9300)
and a Nexus S (GT-I9023) and in both cases:
- It compiled fine
- Calling worked fine too: I called an invalid number I got an
automatic voice reply telling me that this number was invalid.
Similarly that was also tested on Replicant 6.0 0004 RC3 both
by compiling it and calling an invalid number, as this commit
was part of the Replicant 6.0 0004 RC3 release.
Since then only the commit message was modified to add information
about the tests as it didn't have them but had the following text
instead:
TODO:
- Test this code with Replicant 4.2!!!!
[1]https://android.googlesource.com/platform/hardware/ril
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 2001, in the RIL repository[1], the SIM states were separated from
the radio states by the following commit:
2bc78d614e349574426d198c37e51ccb7455b5bb
2bc78d61 Separate SIM states from Radio States
Then in 2016 the SIM states were removed from the RADIO_STATES by the
following commit:
2baf72329c43d9e3f7850973f087176f535e31e8
2baf7232 Remove deprecated RADIO_STATES
So to be compatible with recent rild, we need to convert the code to
use separate SIM states.
As at first a ril_sim_has_reached_state function will be introduced,
we can rename ril_has_reached_state to ril_radio_has_reached_state
in a separate patch (this patch) in order not to have too much
changes at once in the same patch.
[1]https://android.googlesource.com/platform/hardware/ril
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have the following with clang and
-Wimplicit-function-declaration when building with Guix:
network.c:219:2: warning: implicit declaration of function 'asprintf'
is invalid in C99 [-Wimplicit-function-declaration]
asprintf(®istration[0], "%d", status);
^
The definition of _GNU_SOURCE is required to remove the warning, and it is
also mentioned in the asprintf man in the SYNOPSIS:
SYNOPSIS
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <stdio.h>
int asprintf(char **strp, const char *fmt, ...);
[...]
With that fix, libsamsung-ril still compiles fine without any warnings
under Replicant 6.0.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
The card_status is not declared globally, so there is no point
in re-requesting the data and doing nothing with it.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the code in this function loops over the radio_states array to match
with RIL_RadioState argument, it is better to have variables names that
indicate if they comes from the function argument or the radio_states
array, instead of using generic names.
This improves clarity by requiring less context for humans to read and
understand that function.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
| |
The former name of the function doesn't convey what it's supposed to do.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
Since the whole content of the ril2ipc_net_mode_sel function is ifdefed,
it makes more sense to wrap the whole function with ifdefs instead, in
order to increase readability.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
srs.c uses functions like signal and define like SIGPIPE, which come from
the signal.h header from the C standard library.
While for some reason this didn't create compilation issues in Replicant 6,
compiling libsamsung-ril with Guix[1] fails because of that.
References:
-----------
[1]At the time of writing, the libsamsung-ril is not yet in Guix, however
an unofficial package does exist, and is being worked on[2].
If srs.c is patched to include signal.h, that unofficial libsamsung-ril
packages does compile successfully.
[2]https://git.replicant.us/contrib/GNUtoo/guix/log/?h=libsamsung-ril
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The includes were ordered alphabetically
- #include "" is prefered over #incude <> for files relative
to a given project[1] (here libsamsung-ril).
References:
-----------
[1]In the C standard[2], the difference of behavior of between #include <>
and #include "" is implementation-defined[2]. And The GCC
documentation[3] says that #include "" "is used for header files of your
own program.".
[2]The standard doesn't seem to be available for free, but the draft
can be downloaded from the following URL:
https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf
[3]https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libsamsung-ipc is already included as a dependency, and now the headers
should be correctly exported with LOCAL_EXPORT_C_INCLUDE_DIRS since the
following commit:
d4e2afc Android.mk: remove deprecated LOCAL_COPY_HEADERS
d4e2afc9735470c5b9553073a23e606b2fc5cf2c
This change was tested at build time with the patch mentioned above and
the following configurations:
- Replicant 6.0 with the i9300 target
- Replicant 4.2 with the galaxysmtd target
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libsamsung-ipc, ipc_sec_lock_infomation_setup was changed to
ipc_sec_lock_information_setup as the former seems to be a typo.
This change was made by the following libsamsung-ipc commit:
2a01d9f5af39e6cf093fc19fa1b2d7ba6849be06
2a01d9f Fix ipc_sec_lock_infomation_setup typo
As IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT was used in libsamsung-ril too,
we need to do the change here too, as otherwise we will end with
compilation errors like that while compiling Replicant 6.0:
hardware/replicant/libsamsung-ril/sim.c:395: error:
undefined reference to 'ipc_sec_lock_infomation_setup'
hardware/replicant/libsamsung-ril/sim.c:460: error:
undefined reference to 'ipc_sec_lock_infomation_setup'
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libsamsung-ipc, IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT was changed to
IPC_GPRS_FAIL_CAUSE_UNKNOWN_PDP_CONTEXT as the former seems to be a typo.
This change was made by the following libsamsung-ipc commit:
82c1658cf5e3daac8aae73776235c4ca91d2f0e4
82c1658 Fix IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT typo
As IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT was used in libsamsung-ril too,
we need to do the change here too, as otherwise we will end with
compilation errors like that while compiling Replicant 6.0:
target thumb C: libsamsung-ril <= hardware/replicant/libsamsung-ril/rfs.c
hardware/replicant/libsamsung-ril/data.c: In function 'ipc2ril_gprs_fail_cause':
hardware/replicant/libsamsung-ril/data.c:62:8: error:
'IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT' undeclared (first use in this function)
case IPC_GPRS_FAIL_CAUSE_UNKOWN_PDP_CONTEXT:
^
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libsamsung-ipc, ipc_sec_lock_infomation_response_data was changed to
ipc_sec_lock_information_response_data as the former seems to be a typo.
This change was made by the following libsamsung-ipc commit:
cae58ae626f4dad678567e03dcfa247e05f69ddc
cae58ae Fix ipc_sec_lock_infomation_response_data typo
As ipc_sec_lock_infomation_response_data was used in libsamsung-ril too, we
need to do the change here too, as otherwise we will end with compilation
errors like that while compiling Replicant 6.0:
hardware/replicant/libsamsung-ril/sim.c:
In function 'ipc_sec_lock_infomation':
hardware/replicant/libsamsung-ril/sim.c:1174:73:
error: invalid application of 'sizeof' to incomplete type
'struct ipc_sec_lock_infomation_response_data'
if (message == NULL || message->data == NULL || message->size <
sizeof(struct ipc_sec_lock_infomation_response_data))
^
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libsamsung-ipc, ipc_sec_lock_infomation_request_data was changed to
ipc_sec_lock_information_request_data as the former seems to be a typo.
This change was made by the following libsamsung-ipc commit:
b5c3a52dbabbb8a7bfda70b32378df68b83ce632
b5c3a52 Fix ipc_sec_lock_infomation_request_data typo
As ipc_sec_lock_infomation_request_data was used in libsamsung-ril too, we
need to do the change here too, as otherwise we will end with compilation
errors like that while compiling Replicant 6.0:
hardware/replicant/libsamsung-ril/sim.c: In function 'ipc_sec_callback':
hardware/replicant/libsamsung-ril/sim.c:371:46: error: storage size of
'request_data' isn't known
struct ipc_sec_lock_infomation_request_data request_data;
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In libsamsung-ipc, IPC_SEC_LOCK_INFOMATION was changed to
IPC_SEC_LOCK_INFORMATION as the former seems to be a typo.
This change was made by the following libsamsung-ipc commit:
8bd15e4e5bae4ffd6a164e7db719ebb308a9db60
8bd15e4 Fix IPC_SEC_LOCK_INFOMATION typo
As IPC_SEC_LOCK_INFOMATION was used in libsamsung-ril too, we need to do
the change here too, as otherwise we will end with compilation errors
like that while compiling Replicant 6.0:
target thumb C: libsamsung-ril <= hardware/replicant/libsamsung-ril/samsung-ril.c
hardware/replicant/libsamsung-ril/samsung-ril.c:124:14:
error: 'IPC_SEC_LOCK_INFOMATION' undeclared here (not in a function)
.command = IPC_SEC_LOCK_INFOMATION,
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
This problem prevented the SIM to be fully recognized and only incoming calls/messages worked.
The issue is the code assumes tag 0x88 exists, and then assumes that the TLV right before it is the size tag.
These two assumptions are sometimes wrong.
The solution is to send the data as-is to the java RIL because it can also parse TLVs.
Signed-off-by: Belgin Stirbu <belginstirbu@hotmail.com>
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, libsamsung-ril was using
libsamsung-ipc as a static library.
However, libsamsung-ipc is dynamically linked to
libcrypto.
Statically linking libsamsung-ril to libsamsung-ipc
results in the following errors, which disapear when
using dynamic linking:
rfs.c:50: error: undefined reference to 'MD5_Init'
rfs.c:51: error: undefined reference to 'MD5_Update'
rfs.c:52: error: undefined reference to 'MD5_Update'
rfs.c:53: error: undefined reference to 'MD5_Final'
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationale for using extern:
---------------------------
The ipv4NetmaskToPrefixLength function is implemnted
in libnetutils/ifc_utils.c inside the android_system_core
repository[1].
In the lineage-16.0 branch[2]:
- ipv4NetmaskToPrefixLength is not declared in any
headers in this repository.
- In the same repository, libnetutils/dhcpclient.c uses extern
for the declaration of ipv4NetmaskToPrefixLength.
References:
-----------
[1]https://github.com/LineageOS/android_system_core
[2]At the time of writing it was at the following commit:
e7f238619 healthd: make periodic battery status a debug message
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have:
client.c:32:6: error: comparison of array
'ril_clients' equal to a null pointer is always
false [-Werror,-Wtautological-pointer-compare]
if (ril_clients == NULL || ril_clients_count == 0)
^~~~~~~~~~~ ~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is based on the code for USSD support that was used
before the rewrite of Samsung-RIL.
USSD messages in GSM7 format are decoded to UTF8. The decoding code
was adapted from huaweigeneric-ril[1].
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
[1] https://github.com/DerArtem/huaweigeneric-ril
|
|
|
|
|
|
|
|
|
|
|
| |
Early during boot of the system, the modem answers with the string
"00000" to the OPERATOR request. Samsung-RIL currently drops this
response, while the proprietary RIL forwards it. Let's duplicate the
behaviour of the proprietary RIL here.
This seems to prevent that the RIL gets flooded with OPERATOR requests
during system boot.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
|
|
|
| |
Makes the OPERATOR request work in countries that use three-digit MNC
codes.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
|
|
| |
This hopefully finally fixes sending of longer SMS messages.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
|
|
|
|
| |
This fixes the issue when the PIN can't be entered successfully after
it was entered incorrectly once.
As a side-effect, the SIM lock screen shows much earlier.
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
| |
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
| |
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
| |
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|
|
|
|
| |
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
|