[riot-users] Problem with GNRC functions

Raul Fuentes ra.fuentess.sam+riot at gmail.com
Thu Aug 11 15:13:00 CEST 2016


Hi people!

Seems I was able to catch the problem: IT  was indeed the
gnrc_netapi_dispatch_send() function.
I added  "xtimer_usleep(9000000)" before  the function and  now the program
works fine.

The UDP messages are still requesting the 802.15.4 ACK.  However, the issue
of the retransmission disappear completely

The 9 secs of waiting, was an arbitrary value, was my first try to give
enough time to the client to  for sending and receiving at least two
messages from the server. But, then I have a question, why was this
happening? is a limitation of RIOT?


Sincerely, Raul Fuentes


2016-08-11 12:20 GMT+02:00 Raul Fuentes <ra.fuentess.sam+riot at gmail.com>:

>
> Hello,
>
> 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
> FSR/FAR:
>  CFSR: 0x00008600
>  HFSR: 0x40000000
>  DFSR: 0x00000000
>  AFSR: 0x00000000
>  BFAR: 0x003731e2
> Misc
> 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
> -echo/dtls-client.c#L229
>
> [2] https://lists.riot-os.org/pipermail/devel/2016-August/004398.html
>
> --------------
> Ate. Raul FUENTES
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20160811/99f288ca/attachment.html>


More information about the users mailing list