[riot-users] Fwd: Problem with GNRC functions

Raul Fuentes ra.fuentess.sam+riot at gmail.com
Thu Aug 11 12:20:32 CEST 2016


TL;DR: Can someone review my function at [1] and told me if I screwed
something ? (was based on the TFTP example)


I have been working on an implementation of TinyDTLS for RIOT. It is
working fine in native. But,  in the FIT-LAB (m3) is dying with the
following error:

Stack pointer corrupted, reset to top of stack
 CFSR: 0x00008600
 HFSR: 0x40000000
 DFSR: 0x00000000
 AFSR: 0x00000000
 BFAR: 0x003731e2
EXC_RET: 0xfffffff1

After speaking with  KyC0 at the RIOT summit,   I  begin to inspect  the
chaos at deep  and  I noticed two things:

1)  The client dies before sending the second part of a handshake process.
It is not TinyDTLS what is killing it, but the line
gnrc_netapi_dispatch_send () in my function at [1].
However, I'm not sure if is dying at the moment of trying to send the
second message or because at the same time is receiving messages from the
server (this leads to point 2).

2) The server transmits 4 times each message in the handshake process,
which provoke that in one single second the client gets 8 messages (instead
of 2 according to the handshake).

Eintopf already helped to catch an issue: By some strange reason, the ACK
request in the 802.15.4 is set to true when I'm sending my UDP datagrams
(this doesn't happen to ICMPv6 messages).which  could explain the point 2.
I followed [2], trying to add similar lines to my function, forcing to turn
off the ACK, but then, I got the same stack pointer error  as soon the code
reached the gnrc_netif_get line.

This is what makes me wonder, if  I screwed something in the GNRC routines,
but if it is the case, I don't know why didn't appear any indicator when I
was testing with the native "board".

Any help will be highly appreciated.

P.d. I merged my  local branch  with the master branch of RIOT-OS/RIOT
today, so I'm using the last version.

[1] https://github.com/rfuentess/RIOT/blob/IoT-LAB/examples/dtls

[2] https://lists.riot-os.org/pipermail/devel/2016-August/004398.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20160811/904d784e/attachment.html>

More information about the users mailing list