Lines Matching full:modem

18 #include <zephyr/drivers/modem/gsm_ppp.h>
53 /* Modem network registration state */
120 } modem; variable
138 return k_work_reschedule_for_queue(&modem.workq, dwork, delay); in gsm_work_reschedule()
188 k_sem_give(&modem.sem_response); in MODEM_CMD_DEFINE()
196 k_sem_give(&modem.sem_response); in MODEM_CMD_DEFINE()
205 k_sem_give(&modem.sem_response); in MODEM_CMD_DEFINE()
233 modem.context.data_operator = unquoted_atoi(argv[2], 10); in MODEM_CMD_DEFINE()
235 modem.context.data_operator); in MODEM_CMD_DEFINE()
239 modem.context.is_automatic_oper = true; in MODEM_CMD_DEFINE()
241 modem.context.is_automatic_oper = false; in MODEM_CMD_DEFINE()
249 * Provide modem info if modem shell is enabled. This can be shown with
250 * "modem list" shell command.
258 out_len = net_buf_linearize(modem.minfo.mdm_manufacturer, in MODEM_CMD_DEFINE()
259 sizeof(modem.minfo.mdm_manufacturer) - 1, in MODEM_CMD_DEFINE()
261 modem.minfo.mdm_manufacturer[out_len] = '\0'; in MODEM_CMD_DEFINE()
262 LOG_INF("Manufacturer: %s", modem.minfo.mdm_manufacturer); in MODEM_CMD_DEFINE()
272 out_len = net_buf_linearize(modem.minfo.mdm_model, in MODEM_CMD_DEFINE()
273 sizeof(modem.minfo.mdm_model) - 1, in MODEM_CMD_DEFINE()
275 modem.minfo.mdm_model[out_len] = '\0'; in MODEM_CMD_DEFINE()
276 LOG_INF("Model: %s", modem.minfo.mdm_model); in MODEM_CMD_DEFINE()
286 out_len = net_buf_linearize(modem.minfo.mdm_revision, in MODEM_CMD_DEFINE()
287 sizeof(modem.minfo.mdm_revision) - 1, in MODEM_CMD_DEFINE()
289 modem.minfo.mdm_revision[out_len] = '\0'; in MODEM_CMD_DEFINE()
290 LOG_INF("Revision: %s", modem.minfo.mdm_revision); in MODEM_CMD_DEFINE()
300 out_len = net_buf_linearize(modem.minfo.mdm_imei, sizeof(modem.minfo.mdm_imei) - 1, in MODEM_CMD_DEFINE()
302 modem.minfo.mdm_imei[out_len] = '\0'; in MODEM_CMD_DEFINE()
303 LOG_INF("IMEI: %s", modem.minfo.mdm_imei); in MODEM_CMD_DEFINE()
314 out_len = net_buf_linearize(modem.minfo.mdm_imsi, sizeof(modem.minfo.mdm_imsi) - 1, in MODEM_CMD_DEFINE()
316 modem.minfo.mdm_imsi[out_len] = '\0'; in MODEM_CMD_DEFINE()
317 LOG_INF("IMSI: %s", modem.minfo.mdm_imsi); in MODEM_CMD_DEFINE()
327 out_len = net_buf_linearize(modem.minfo.mdm_iccid, sizeof(modem.minfo.mdm_iccid) - 1, in MODEM_CMD_DEFINE()
329 modem.minfo.mdm_iccid[out_len] = '\0'; in MODEM_CMD_DEFINE()
330 if (modem.minfo.mdm_iccid[0] == '+') { in MODEM_CMD_DEFINE()
334 char *p = strchr(modem.minfo.mdm_iccid, ' '); in MODEM_CMD_DEFINE()
339 (void)memmove(modem.minfo.mdm_iccid, p+1, iccid_len+1); in MODEM_CMD_DEFINE()
342 LOG_INF("ICCID: %s", modem.minfo.mdm_iccid); in MODEM_CMD_DEFINE()
350 modem.net_state = (enum network_state)atoi(argv[1]); in MODEM_CMD_DEFINE()
352 switch (modem.net_state) { in MODEM_CMD_DEFINE()
386 modem.context.data_lac = unquoted_atoi(argv[2], 16); in MODEM_CMD_DEFINE()
387 modem.context.data_cellid = unquoted_atoi(argv[3], 16); in MODEM_CMD_DEFINE()
389 modem.context.data_lac, in MODEM_CMD_DEFINE()
390 modem.context.data_cellid); in MODEM_CMD_DEFINE()
394 modem.context.data_act = unquoted_atoi(argv[4], 10); in MODEM_CMD_DEFINE()
395 LOG_INF("act: %u", modem.context.data_act); in MODEM_CMD_DEFINE()
419 LOG_WRN("modem query for cell info returned %d", ret); in gsm_query_cellinfo()
439 modem.minfo.mdm_rssi = -140 + (rsrp - 1); in MODEM_CMD_DEFINE()
440 LOG_DBG("RSRP: %d", modem.minfo.mdm_rssi); in MODEM_CMD_DEFINE()
442 modem.minfo.mdm_rssi = -120 + (rscp - 1); in MODEM_CMD_DEFINE()
443 LOG_DBG("RSCP: %d", modem.minfo.mdm_rssi); in MODEM_CMD_DEFINE()
445 modem.minfo.mdm_rssi = -110 + (rxlev - 1); in MODEM_CMD_DEFINE()
446 LOG_DBG("RSSI: %d", modem.minfo.mdm_rssi); in MODEM_CMD_DEFINE()
448 modem.minfo.mdm_rssi = GSM_RSSI_INVALID; in MODEM_CMD_DEFINE()
468 modem.minfo.mdm_rssi = rssi; in MODEM_CMD_DEFINE()
485 /* query modem info */
691 /* If modem is searching for network, we should skip the setup step */ in gsm_finalize_connection()
743 LOG_DBG("Unable to query modem information %d", ret); in gsm_finalize_connection()
802 LOG_DBG("modem attach returned %d, %s", ret, "read RSSI"); in gsm_finalize_connection()
827 LOG_DBG("modem RSSI: %d, %s", gsm->minfo.mdm_rssi, "enable PPP"); in gsm_finalize_connection()
852 /* Do a test and try to send AT command to modem */ in gsm_finalize_connection()
922 /* Generic GSM modem */ in mux_enable()
1045 /* At least the SIMCOM modem expects that the Internet in mux_setup()
1049 * to the modem. in mux_setup()
1090 LOG_DBG("Starting modem %p configuration", gsm); in gsm_configure()
1107 LOG_DBG("modem not ready %d", ret); in gsm_configure()
1193 LOG_WRN("Failed locking modem cmds!"); in gsm_ppp_stop()
1237 if (iface != modem.iface) { in gsm_mgmt_event_handler()
1244 k_sem_give(&modem.sem_if_down); in gsm_mgmt_event_handler()
1254 LOG_DBG("Generic GSM modem (%p)", gsm); in gsm_init()
1283 /* modem information storage */ in gsm_init()
1357 DEVICE_DT_DEFINE(DT_DRV_INST(0), gsm_init, NULL, &modem, NULL,