Help with Adafruit m0 lora feather and GNRC: "Cannot send packet"

Hey!

I’m trying to get two Adafruit m0 lora feathers to ping each other. No LoraWAN involved, just Lora modulation.

I’m able to run the /tests/drivers/sx127x app and get them to talk successfully.

But once I add GNRC to that same app’s Makefile:

USEMODULE += netdev_default
USEMODULE += auto_init_gnrc_netif
USEMODULE += gnrc_ipv6_router_default
USEMODULE += gnrc_icmpv6_echo
USEMODULE += gnrc_icmpv6_error
USEMODULE += gnrc_netif_single
USEMODULE += gnrc_udp
USEMODULE += shell_cmd_gnrc_udp
USEMODULE += gnrc_sock_udp
USEMODULE += netstats_l2
USEMODULE += netstats_ipv6

and try to ping, I get the following error from the radio driver: Cannot send packet: radio already in transmitting state.

Any pointers, thoughts before I take the deep dive and try to learn how GNRC works and interacts with the drivers to debug this further?

for reference, here is the chatter from the radio driver using the test app’s send command, this works:

> send asf
sending "asf" payload (4 bytes)
[sx127x] Sending packet now.
[sx127x] Modem option is LoRa.
[sx127x] Waiting for chip to wake up.
[sx127x] Wrote to payload buffer.

calling this repeatedly works every time.

as soon as ping is attempted, here is what I get:

> ping ff02::1
[sx127x] Sending packet now.
[sx127x] Modem option is LoRa.
[sx127x] Waiting for chip to wake up.
[sx127x] Wrote to payload buffer.
[sx127x] Wrote to payload buffer.
[sx127x] netdev: sx127x_on_dio0: IDLE state
[sx127x] Sending packet now.
[sx127x] Cannot send packet: radio already in transmitting state.
[sx127x] Sending packet now.
[sx127x] Cannot send packet: radio already in transmitting state.

--- ff02::1 PING statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

Hi ximus,

welcome to the RIOT community!

AFAIK there is no MAC layer implementation for LoRa in the current version of RIOT, so also no glue code between LoRa radios and GNRC.

Maybe @jia200x knows more?

1 Like