This is an automated email from the ASF dual-hosted git repository.

lupyuen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 80907e514 lte: make lte_initialize() build without the ALT1250 daemon
80907e514 is described below

commit 80907e514c414d4fd8d91d079d87df5bffb8f4fe
Author: raiden00pl <[email protected]>
AuthorDate: Fri Jun 5 11:55:15 2026 +0200

    lte: make lte_initialize() build without the ALT1250 daemon
    
    Guard the daemon path (and is_daemon_running()) with CONFIG_MODEM_ALT1250 
and
    return OK from lte_initialize() when it is not set, so lapi builds and works
    for kernel-resident LTE modems.
    
    Signed-off-by: raiden00pl <[email protected]>
---
 lte/lapi/src/lapi_power.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lte/lapi/src/lapi_power.c b/lte/lapi/src/lapi_power.c
index 31ae86df0..8f5ea6c14 100644
--- a/lte/lapi/src/lapi_power.c
+++ b/lte/lapi/src/lapi_power.c
@@ -102,6 +102,7 @@ static inline void lapi_unlock(FAR sem_t *lock)
  * Name: is_daemon_running
  ****************************************************************************/
 
+#ifdef CONFIG_MODEM_ALT1250
 static bool is_daemon_running(void)
 {
   int sock;
@@ -127,6 +128,7 @@ static bool is_daemon_running(void)
 
   return is_run;
 }
+#endif /* CONFIG_MODEM_ALT1250 */
 
 /****************************************************************************
  * Public Functions
@@ -140,6 +142,15 @@ int lte_initialize(void)
 {
   int ret = 0;
 
+#ifndef CONFIG_MODEM_ALT1250
+  /* The modem backend can be kernel-resident (e.g. a built-in modem
+   * served by kernel side usrsock handler, such as the nRF91). LTE
+   * commands reach the modem directly via the SIOCLTECMD socket ioctl.
+   */
+
+  UNUSED(ret);
+  return OK;
+#else
   lapi_lock(&g_lock);
 
   if (!is_daemon_running())
@@ -178,6 +189,7 @@ int lte_initialize(void)
   lapi_unlock(&g_lock);
 
   return ret;
+#endif
 }
 
 /****************************************************************************

Reply via email to