I encounter a problem after lot of transmission in UDP.
I use the SAMR21, example RPL_UDP + my application (3 boards send values from sensor to one board). The 3 boards works fine, the problem occurs on the board which gathers all the data.
It works for more or less 20 minutes and then I receive a:
It works for more or less 20 minutes and then I receive a:
printf("ERROR: recsize < 0!\n");
This comes from here:
if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket -
1].socket_id == 0)) {
return false;
}
When I break here, socket = 2, then 3, then 4 and then it blocks, not a
isr_hard_fault but I don't receive anything then.
Sounds like sockets where not freed after sending the UDP packet. If this
assumption is correct, the problem should not be dependent on the time, but on
the number of transmissions. Can you check?
You mean than I should slow down the number of transmission? I send a packet every second on three boards which means that the other board receives three packets a second.
How may I check apart from slowing down the rate of the transmission?
You mean than I should slow down the number of transmission? I send a
packet every second on three boards which means that the other board
receives three packets a second.
How may I check apart from slowing down the rate of the transmission?
Three packets every second shouldn't be a problem. Have you checked if same
(or similar code) works on native. That would be always the first indicator if
it's a general problem in - let's say the network stack - or if it's something
particular to this hardware.
bt
#0 isr_hard_fault () at RIOT/cpu/samd21/startup.c:104
#1#2 0x000006ec in clist_advance (list=0x20001c30 <sched_runqueues>) at RIOT/core/include/clist.h:80
#3 0x000008d4 in thread_yield () at RIOT/core/thread.c:99
#4 0x000167fe in isr_eic () at RIOT/cpu/samd21/periph/gpio.c:1027
#5#6 0x0000147a in ?? ()