[riot-users] Send UDP packet by Xbee

Martine Lenders mail at martine-lenders.eu
Tue Feb 27 11:56:15 CET 2018


Hi Tiago,

2018-02-25 20:22 GMT+01:00 tiago carvalho <tiago_carvalho_1 at hotmail.com>:

> I noticed that the device sending the packet doesn’t use 6lowpan (*DEBUG("6lo:
> GNRC_NETDEV_MSG_TYPE_SND received\n")* doesn’t appear*) *but on the other
> device, when the message arrives and after decoding, the 6lo logic is
> called giving the following error:
>
>
>
>                 [xbee] isr: data available, waiting for read
>
>                 [xbee] recv: reading size without dropping: 69
>
>                 [xbee] recv: consuming packet: reading 69 byte
>
>                 [xbee-gnrc] recv: successfully parsed packet
>
>                 6lo: GNRC_NETDEV_MSG_TYPE_RCV received
>
>                 *6lo: dispatch 0hx ... is not supported*
>
>                 6lo: waiting for incoming message.
>

To reveal the output of the dispatch apply the attached patch, please (or
deactivate newlib-nano specs).

I’m trying to run 6lowpan but it seems that it is not executed on the
> sending side. Do I need extra configuration? I already have:
>
>
>
> USEMODULE += gnrc_netdev_default
>
> USEMODULE += auto_init_gnrc_netif
>
> USEMODULE += gnrc_ipv6
>
> USEMODULE += gnrc_sock_udp
>
> USEMODULE += gnrc_udp
>

Can you try `gnrc_ipv6_default` instead of `gnrc_ipv6`? Then 6LoWPAN will
be configured correctly. With that `xbee` is working for me on master (I
used the gcoap example to get a similar configuration as you did:

> coap get fe80::7b65:822:8693:9d5a 5683 /cli/stats
> 2018-02-27 11:54:20,071 - INFO # coap get fe80::7b65:822:8693:9d5a 5683
/cli/stats
> 2018-02-27 11:54:20,075 - INFO # gcoap_cli: sending msg ID 26888, 16 bytes
> 2018-02-27 11:54:20,078 - INFO # 6lo: GNRC_NETDEV_MSG_TYPE_SND received
> 2018-02-27 11:54:20,083 - INFO # 6lo: iface->sixlo.max_frag_size = 100
for interface 7
> 2018-02-27 11:54:20,087 - INFO # 6lo: Send SND command for 0x20001ff4 to 7
> 2018-02-27 11:54:20,132 - INFO # 6lo: waiting for incoming message.
> 2018-02-27 11:54:20,194 - INFO #  6lo: GNRC_NETDEV_MSG_TYPE_RCV received
> 2018-02-27 11:54:20,197 - INFO # 6lo: waiting for incoming message.
> 2018-02-27 11:54:20,201 - INFO # gcoap: response Success, code 2.05, 1
bytes
> 2018-02-27 11:54:20,201 - INFO # 0


Cheers,
Martine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20180227/c0d73d70/attachment.html>
-------------- next part --------------
diff --git a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
index 7b18bac..ede2879 100644
--- a/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
+++ b/sys/net/gnrc/network_layer/sixlowpan/gnrc_sixlowpan.c
@@ -158,7 +158,7 @@ static void _receive(gnrc_pktsnip_t *pkt)
     }
 #endif
     else {
-        DEBUG("6lo: dispatch %02" PRIx8 " ... is not supported\n",
+        DEBUG("6lo: dispatch %02x ... is not supported\n",
               dispatch[0]);
         gnrc_pktbuf_release(pkt);
         return;


More information about the users mailing list