Hi
I'm trying to send fixed AT commands to the modem using a code based on this code from Rallare: https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/simple_at
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <net/socket.h>
#include <stdio.h>
#include <string.h>
#include <uart.h>
#include <zephyr.h>
const char *at_commands[] = {
"AT+CGMM",
/* Add more here if needed */
};
void app_socket_start(void)
{
printk("Starting simple_at\n\r");
int at_socket_fd = socket(AF_LTE, 0, NPROTO_AT);
printk("Starting simple AT socket application\n\r");
if (at_socket_fd < 0) {
The problem is that the modem need to register on the network first, before giving any feedback on the AT command. When no network is available, the response is delayed until network timeout (~10s of minutes).
Is there another way to send AT commands to the modem for quicker response?