@@ -38,7 +38,7 @@ typedef int sec_tag_t;
3838
3939#if CONFIG_MODEM
4040#include <zephyr/drivers/modem/murata-1sc.h>
41- #include "modem_sms.h"
41+ #include <zephyr/drivers/modem/sms.h>
4242#endif
4343
4444#include "tmo_http_request.h"
@@ -1102,7 +1102,7 @@ int sock_close(const struct shell *shell, size_t argc, char **argv)
11021102 return stat ;
11031103}
11041104
1105- #if CONFIG_MODEM
1105+ #if CONFIG_MODEM && CONFIG_MODEM_SMS
11061106int sock_sendsms (const struct shell * shell , size_t argc , char * * argv )
11071107{
11081108 int ret ;
@@ -1132,7 +1132,6 @@ int sock_sendsms(const struct shell *shell, size_t argc, char **argv)
11321132 strncpy (sms .phone , argv [2 ], SMS_PHONE_MAX_LEN );
11331133 strncpy (sms .msg , argv [3 ], CONFIG_MODEM_SMS_OUT_MSG_MAX_LEN + 1 );
11341134 ret = fcntl_ptr (sock_idx , SMS_SEND , & sms );
1135-
11361135 return ret ;
11371136}
11381137
@@ -1169,7 +1168,8 @@ int sock_recvsms(const struct shell *shell, size_t argc, char **argv)
11691168 shell_print (shell , "No SMS received!" );
11701169 return ret ;
11711170}
1172- #endif /* CONFIG_MODEM */
1171+ #endif /* CONFIG_MODEM && CONFIG_MODEM_SMS */
1172+
11731173int cmd_list_socks (const struct shell * shell , size_t argc , char * * argv )
11741174{
11751175 enum proto_idx {
@@ -1342,9 +1342,9 @@ SHELL_STATIC_SUBCMD_SET_CREATE(tmo_tcp_sub,
13421342#endif
13431343 SHELL_CMD (recv , NULL , "<socket>" , tcp_rcv ),
13441344 SHELL_CMD (recvb , NULL , "<socket> <size>" , tcp_recvb ),
1345- #if CONFIG_MODEM
1345+ #if CONFIG_MODEM && CONFIG_MODEM_SMS
13461346 SHELL_CMD (recvsms , NULL , "<socket> <wait time (seconds)>" , sock_recvsms ),
1347- #endif /* CONFIG_MODEM */
1347+ #endif /* CONFIG_MODEM && CONFIG_MODEM_SMS */
13481348#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS )
13491349 SHELL_CMD (secure_create , NULL , "<iface>" , tcp_create_tls ),
13501350#if IS_ENABLED (CONFIG_NET_IPV6 )
@@ -1353,9 +1353,9 @@ SHELL_STATIC_SUBCMD_SET_CREATE(tmo_tcp_sub,
13531353#endif
13541354 SHELL_CMD (send , NULL , "<socket> <payload>" , tcp_send ),
13551355 SHELL_CMD (sendb , NULL , "<socket> <size>" , tcp_sendb ),
1356- #if CONFIG_MODEM
1356+ #if CONFIG_MODEM && CONFIG_MODEM_SMS
13571357 SHELL_CMD (sendsms , NULL , "<socket> <phone number> <message>" , sock_sendsms ),
1358- #endif /* CONFIG_MODEM */
1358+ #endif /* CONFIG_MODEM && CONFIG_MODEM_SMS */
13591359 SHELL_CMD (xfersz , NULL , "[size]" , sock_mxfragment ),
13601360 SHELL_SUBCMD_SET_END
13611361 );
0 commit comments