ButtonSizedNode with LMIC

Hi all,

I’m pretty new to LORA and all and I’m trying the following:

When I press the reset button on the board, I can see a “Accept join-request” and 2 seconds after that a “Forward join-accept message”. Nothing happens after this.

What can I expect to happen next? What message is next in the chain?

Somethings I think I may have done wrong:

Can anyone push me in the right direction? If someone need more information, I’m happy to share!

Thanks!

Hi,
The Tindie page you linked only mentions RFM95 but gives no further details about it whatsoever.

The schematic diagram only lists RFM69 but provides no RFM95 information whatsoever.
If you check the RFM95 pinout you can see that it has 16 pins instead of the 14 RFM69 pins shown in the schematic diagram.
The RFM69 pin numbers in the schematic diagram do also not match the layout of the RFM95 module pins.

If your board truly has a RFM95 module then you will need to know to wich MCU pins the following pins of the RFM95 module are connected:
SCK
MOSI
MISO
NSS (aka CS)
RESET
DIO0
DIO1

I do not see this information, not on the Tindie page and not in the schematic diagram. Without this information you will not be able to properly configure the software.

Best to contact the board’s designer on Tindie for these missing details.

Do you mean you have flashed exactly the following example application: LMIC-node
to the board or do you mean something else?

Did you read the LMIC-node documentation?
What have you done exactly?

How about showing us your output?

Thanks for your kind reaction!

I have reached out to the Tindie-store about this. We will see what he has. I’m glad this was not my fault, so I feel less stupid that I couldn’t figure the pin-mapping out :^)

I put my Lorawan-keys in the Lorawan-keys.h and build the pro8mhzatmega328, after this I uploaded it to the board. I carefully read the LMIC-node documentation, 'cause I was getting frustrated that it didn’t work for weeks now.

What output do you want to see? From the monitor of the board; it is here:

LMIC-node

Device-id:     pro-mini
LMIC library:  Classic [Deprecated]
Activation:    OTAA
Interval:      60 seconds

Clock Error:   30000 ppm (1965)
000000000763:  Event: EV_JOINING

000000000829:  doWork job started

000003750836:  doWork job started

Do you know what is meant to happen after this? Can I also assume I’m looking the right way, because it could “talk” to TTN? >>

(I replied to the wrong answer >.>)

Note: be aware that for ATmega328 because of limited available memory LMIC-node uses the Classic LMIC library instead of the MCCI LMIC library.

When using MCCI LMIC you should first see an EV_TXSTART. Classic LMIC does not generate that event.

And then one of these two events:

  • EV_JOINED (join succeeded) like shown here, or
  • EV_JOIN_TXCOMPLETE (join request sent, but no join accept received).

FYI: The above linked (here) example shows output when MCCI LMIC is used. This also contains network id, device address and keys. Classic LMIC will not provide that information.

The reason you can’t find a DIO mapping probably has to do with the fact that the board’s schematic ButtonSizeNode3/BS3_schematic.pdf at master · EasySensors/ButtonSizeNode3 · GitHub shows it to be missing a connection critically needed for the operation of usual LoRaWAN firmwares.

DIO0 is connected to a signal called RFM_INT which appears to run to Arduino Digital Pin 2. This would be the first element of your LMiC pin mapping, and is used to detect the end of a transmission against which the receive windows are scheduled, and also to detect the end of a successful downlink (including join accept) reception.

The problem is that DIO1 is unconnected. On the sx127x radio (aka RFM95/96) DIO1 is used to indicate that the receiver has timed out and not received a signal in the configured listening period or “window” - and since LoRaWAN is “uplink mostly” apart from join accepts and initial configuration, that would be the case the majority of the time. The popular “Feather M0 LoRA” board is also missing this signal, but happens to run the radio pin to a board header, where users can easily double it back to an MCU GPIO pin that they enter in the pinmap.

Your board doesn’t appear to run the radio pin to a header, but the connections on the radio module itself are reasonably sized (2mm pitch I believe) so you can probably with some care solder a wire from the DIO1 pin to an unused digital pin you enter in your pinmap - D4 would be a logical choice but actually any pin will work.

If you can’t add the wire, things get more complicated. In theory one can rework LMiC so that instead of relying on the signal, the processor uses the SPI to poll the radio status. The radio can either still be programmed with a finite listen window and polling used to see if has timed out. Or the radio can be put in eternal receiver mode, software can wait an appropriate window time and check the radio status. Since the window time is only the battery to be spent seeing if a packet begins, in purely software timed mode, software would have to distinguish between the case where the radio has found nothing, in which case it can be put back into the lowest power mode, or the case where it has started receiving a packet and will need hundreds of milliseconds more operating time to receive the entirety of it before the end is signaled by the DIO0 pin or status register change. Even with a full pin mapping, I think it’s arguably worth giving the radio code an ultimate software time limit. Also it would be nice if LMiC complained about ineffective pin maps, but that would run counter to the need to keep things small for an ATmega328p - especially the space taken by the strings to be printed!

So the summary here is that this board was not designed by someone with a lot of familiarity actually using LoRaWAN in accordance with the spec. The example code is incomplete, and appears even with the missing pieces to be doing point-to-point LoRa rather than LoRaWAN. You can make it work for LoRaWAN, by using an optimal build of the latest LMiC that will fit in the chip resources, and adding the missing DIO1 connection. Or at a more advanced level, reworking the radio management code in LMiC. But overall, this is not a friendly platform or a very straightforward place to be starting your exploration of LoRaWAN. For that something like the traditional Adafruit Feather M0 with the frequency appropriate LoRa radio (not the FSK-only RFM69!), or low power sleep complications aside, an ESP32, probably make more sense especially as there are far more people working with them.

1 Like

Holy, thanks for your reaction!
I think this is what I needed to hear. I’m glad the wrong is in the board and that there are things missing.

I’m going to try this, I think I’m most familiar to try this instead of reworking LMIC :^)

If this all doesn’t work out, I will buy a more noob-friendly board like the Dragino End-nodes. I picked this Tindie device because it was really small.

Again, thank you all for the reactions and thinking with me! Love the community here.

Good choice as pre-made end node but not really very programmable. If you want to program your firmware, then start with an Adafruit Feather M0 with RFM95

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.