MBED mbed-os-example-lorawan with an SX1272

Anyone had recent success with MBED’s LoRaWAN stack?

I’m trying to get mbed-os-example-lorawan going with a NUCLEO_F091RC board and a Libelium SX1272 based module.
I have connected the 4 SPI lines and am feeding the Libelium module from the 3v3 pin on the NUCLEO_F091RC.

I see both OTAA Join requests and Join Accepts in the TTN console so at least I know the setup can transmit.

But the board never receives the Join Accept, so the demo code tries over and over again.

On the serial debug console I see:

[DBG ][LSTK]: Initializing MAC layer

 Mbed LoRaWANStack initialized 

 CONFIRMED message retries : 0 

 Adaptive data  rate (ADR) - Enabled 
[DBG ][LSTK]: Initiating OTAA
[DBG ][LSTK]: Sending Join Request ...
[DBG ][LMAC]: Frame prepared to send at port 0
[DBG ][LMAC]: TX: Channel=1, TX DR=5, RX1 DR=5

 Connection - In Progress ...
[DBG ][LSTK]: TX Timeout
[ERR ][LSTK]: Joining abandoned: Radio failed to transmit

 Transmission Error - EventCode = 3 

Apparently the program think it has a problem transmitting, and the rest of the join procedure probably fails from that point on.

What can cause a TX Timeout?
Suggestions on how to proceed from here?

1 Like

Hello,

I’m using an mbed LPC1768 & a Hope RFM95W. I’m in pretty much the same position as you with the same error message.

I’m still working through the issue but I’ve noticed that the exact same console output occurs even if the RFM95W module is not connected. I might try & check if the SPI interface is working (not sure how), failing that will see if I can see any details on the gateways I’m running. Will let u know if I get any further

Looks like I’ve cracked it on my side…

I experimented with the connections & found that leaving the RESET line unconnected on the RFM95W resulted in successful transmissions. This is what I get on the console now:

Mbed LoRaWANStack initialized 

CONFIRMED message retries : 3

Adaptive data rate (ADR) - Enabled
[DBG ][LSTK]: Initiating OTAA
[DBG ][LSTK]: Sending Join Request …
[DBG ][LMAC]: Frame prepared to send at port 0
[DBG ][LMAC]: TX: Channel=2, TX DR=5, RX1 DR=5

Connection - In Progress …
[DBG ][LSTK]: Transmission completed
[DBG ][LMAC]: RX1 slot open, Freq = 868500000
[DBG ][LMAC]: RX2 slot open, Freq = 869525000
[DBG ][LMAC]: Frame prepared to send at port 0
[DBG ][LMAC]: TX: Channel=2, TX DR=4, RX1 DR=4
[DBG ][LSTK]: Transmission completed
[DBG ][LMAC]: RX1 slot open, Freq = 868500000
[DBG ][LMAC]: RX2 slot open, Freq = 869525000
[DBG ][LMAC]: Frame prepared to send at port 0
[DBG ][LMAC]: DC enforced: Transmitting in 5538 ms
[DBG ][LMAC]: TX: Channel=0, TX DR=3, RX1 DR=3
[DBG ][LSTK]: Transmission completed
[DBG ][LMAC]: RX1 slot open, Freq = 868100000
[DBG ][LSTK]: OTAA Connection OK!

Connection - Successful

Dummy Sensor Value = 3
[INFO][LMAC]: RTS = 23 bytes, PEND = 0, Port: 15
[DBG ][LMAC]: Frame prepared to send at port 15
[DBG ][LMAC]: TX: Channel=3, TX DR=3, RX1 DR=3

23 bytes scheduled for transmission
[DBG ][LSTK]: Transmission completed
[DBG ][LMAC]: RX1 slot open, Freq = 867100000
[DBG ][LMAC]: RX2 slot open, Freq = 869525000

Message Sent to Network Server

Dummy Sensor Value = 5
[INFO][LMAC]: RTS = 23 bytes, PEND = 0, Port: 15
[DBG ][LMAC]: Frame prepared to send at port 15
[DBG ][LMAC]: DC enforced: Transmitting in 12807 ms

23 bytes scheduled for transmission

My mbed_app.json setup:

{
    "config": {
        "lora-radio": {
            "help": "Which radio to use (options: SX126X, SX1272, SX1276) -- See config/ dir for example configs",
            "value": "SX1276"
    },
    "main_stack_size":     { "value": 4096 },
        
        "lora-spi-mosi":       { "value": "p5" },
        "lora-spi-miso":       { "value": "p6" },
        "lora-spi-sclk":       { "value": "p7" },
        "lora-cs":             { "value": "p8" },
        "lora-reset":          { "value": "p11" },
        "lora-dio0":           { "value": "p28" },
        "lora-dio1":           { "value": "p27" },
        "lora-dio2":           { "value": "p26" },
        "lora-dio3":           { "value": "p30" },
        "lora-dio4":           { "value": "p29" },
        "lora-dio5":           { "value": "p12" },
        "lora-rf-switch-ctl1": { "value": "NC" },
        "lora-rf-switch-ctl2": { "value": "NC" },
        "lora-txctl":          { "value": "NC" },
        "lora-rxctl":          { "value": "NC" },
        "lora-ant-switch":     { "value": "NC" },
        "lora-pwr-amp-ctl":    { "value": "NC" },
        "lora-tcxo":           { "value": "NC" }
    },
    "target_overrides": {
        "*": {
            "mbed-trace.enable": 1,
            "platform.stdio-convert-newlines": true,
            "platform.stdio-baud-rate": 115200,
            "platform.default-serial-baud-rate": 115200,
            "lora.over-the-air-activation": true,
            "lora.duty-cycle-on": true,
            "lora.phy": "EU868",
            "lora.device-eui": "{ 0x00, etc..................

Hope this helps & best of luck!

The reset line on an SX1272 is active high for reset, on an SX1276\8 its active low.

There are other differences in some of the register settings too.

Thanks for the info…

From what I read I thought the RFM95W was similar/ based on the SX1276 (which was the config file I was using).

I’ll have to look again at the config I was using