This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52840 gsm modem sim800 tcp client socket send error

Hi,

I created an example using gsm_modem application, after network connected, I create tcp client socket then send data to the server. After several sendings, I got the packet allocation failed.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
char buff[10] = "abcdef\n";
int len = sizeof(buff);
// ... after network connected in main function
int sockfd, connfd;
struct sockaddr_in servaddr, cli;
// socket create and varification
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd == -1) {
printk("socket creation failed...\n");
return;
}
printk("Socket successfully created..\n");
int IP = 104*256*256*256 + 168*256*256 + 98*256 + 15; // 104.168.98.15
// assign IP, PORT
servaddr.sin_family = AF_INET;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Error log:
[00:00:29.692,749] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:29.892,944] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:30.093,139] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:30.293,334] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:30.493,530] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:30.693,725] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:30.893,920] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:31.094,116] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:31.294,311] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:31.494,506] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m
[00:00:31.694,702] [1;31m<err> net_tcp: conn: 0x200133c0 packet allocation failed, len=10[0m

Do you know how to fix this issue?
Thanks.