Hi, I’m using a Adafruit Feather M0 Radio with LoRa Radio Module, and I’m trying to get it working with the matthijskooijman/arduino-lmic library (master branch). I have changed the SPI speed to 8E6 in hal.cpp, and connected DIO2 and DIO3 to available GPIO’s.
const lmic_pinmap lmic_pins = {
.nss = 8,
.rxtx = LMIC_UNUSED_PIN,
.rst = 4,
.dio = {3, 6, 11},
};
I started out with the ttn-otaa example, and updated the correct appeui, deveui, and appkey.
At this point, the RFM module is sending out some signals (I have checked with my SDR dongle). The TTN dashboard changes the state of the node to ‘activated’, so I know the signal was detected by the gateway and was being forwarded tot TTN. On my SDR, I can see the gateway responding after 5 seconds, but It seems the Feather is not picking it up.
When I check the serial console, I can see the code is stuck at:
Starting
Packet queued
2209: EV_JOINING
I have been trying several things, but none of them are making it better. I tried, adding the extra os_runloop_once(), different GPIO’s for DIO’s, ABP example (works only 1 time, then stalls).
I also tried to get the #debug working, but havn’t succeed on this for the M0 and the printf’s.
I have spent a lot of hours trying to figure this out, but I’m out of ideas.
Update:
It seems that the ‘joining’ succeeds in about 1 out of 5 times. Setup, range, position etc is not changing, just pressing the reset button.
If its successful, i get the following in the console.
Starting
Packet queued
463250: EV_JOINING
1195255: EV_JOINED
In the TTN Dashboard, I can see the correct payload (RSSI -44, 2m away with a wall from the gateway). It seems that joining the network works correctly, but the EV_TXCOMPLETE event is never called. (so no rescheduling of the next transmit).
I find it strange that sometimes it works, but most of the time it doesn’t. I have tried to make it deterministic, but the successful join comes at random. I don’t have the tools or environment to test and debug it more thoroughly. I have no idea if this could be software or hardware.