From fbd2f733a73ffda6545705098b28684b16d4675e Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 2 May 2023 13:47:51 +0200 Subject: layer23: modem: Delay GPRS attach at startup until modem is ready Wait until SIM is ready, network system information ws obtained and it announced the MS is able to use GPRS against it. Change-Id: I5029d9e8a47b8544b3b803c4db6352269bac3c0e --- src/host/layer23/include/osmocom/bb/modem/modem.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/host/layer23/include/osmocom/bb/modem/modem.h') diff --git a/src/host/layer23/include/osmocom/bb/modem/modem.h b/src/host/layer23/include/osmocom/bb/modem/modem.h index 3945804d..29d2571a 100644 --- a/src/host/layer23/include/osmocom/bb/modem/modem.h +++ b/src/host/layer23/include/osmocom/bb/modem/modem.h @@ -3,4 +3,16 @@ #include int modem_start(void); +int modem_gprs_attach_if_needed(struct osmocom_ms *ms); +enum modem_state { + MODEM_ST_IDLE, + MODEM_ST_ATTACHING, + MODEM_ST_ATTACHED +}; + +struct modem_app { + struct osmocom_ms *ms; + enum modem_state modem_state; +}; +extern struct modem_app app_data; -- cgit v1.2.3