Nrf52840 (FEATHER) + SX1276

Sir, good day!

I am compiling the gnrc_lorawan project to use the NRF52840 (FEATHER M4) to program the SX1276 to access LoRaWAN

its compiling 100% Sem tĂ­tulo

Can you help wich files must i config to choose wich NRF52840 GPIO to access CLK,MISO,MOSI, CS and RST ?

Thank you!

Miguel Wisintainer

Hi and welcome! I’m a bit confused by which board you are using. The Feather nRF52840 Express does not come with a LoRa module and neither does the Feather M4.

Did you connect the LoRa module yourself? Or are you using the Feather M0 with RFM95 LoRa Radio?

Hello! Thanks to the feedback! Thanks to the welcome! I connected myself!

Board is an Ublox Nina B302, core in NRF52840.

See if you can help me!

Btw, look

For the GPIOs you can use any pin, just make sure to tell the sx127x driver which is which. You can find the defaults in sx127x_params.h, you can overwrite them in your board.h.

For SPI, you’ll need to configure the SPI device in your board’s periph_conf.h. Then make sure to add USEMODULE += sx1276 to your Makefile to select the right driver.

Benjamin Valentin Looks that is running on NRF52840 (UBLOX-NINA-B302) Sem tĂ­tulo :grinning: :grinning:

Is there some option to 915AU

That should be acvievable by setting SX127X_CHANNEL_DEFAULT/SX127X_HF_CHANNEL_DEFAULT, possibly some other values there.

Ideally, we’d have a database with channel / settings combinations for different regions, but this has not been implemented yet.

@benpicco

yes, i see that

I am waiting in other group a update to AU915. We are discussing!

Hey. I hope you have managed to make LoRa work, as discussed here.

If you have another device that can do LoRa/LoRaWAN, you should be able to listen to packets now.

Just curious, what’s your use case? Do you plan to use a LoRaWAN infrastructure (e.g TTN, where nodes send frames to a centralized Network Server via gateways) or you simply want to send frames between LoRa nodes?

For the latter you don’t need the LoRaWAN stack. You could simply use tests/driver_sx127x to send frames. You could already use the AU915 bands there.

Hello, I want to use to LoRaWAN. The LoraWAN RIOT example still not ported to 915AU

Hey. You can use Semtech_LoRaWAN package for the time being. An example is available in examples/lorawan. Use this branch , change the board name in makefile to the one you configured and use

make menuconfig

command while inside the example folder to configure the channel plan as well as other parameters.

Do you mean 915AU ? Will I find it ?

Can you send the picture on the menuconfig where i config the Region

looks that only EU868 is in the config

  ifconfig <if_id> set <key> <value>
  Sets an hardware specific specific value
  <key> may be one of the following
   * "addr" - sets (short) address
   * "addr_long" - sets long address
   * "addr_short" - alias for "addr"
   * "cca_threshold" - set ED threshold during CCA in dBm
   * "freq" - sets the "channel" center frequency
   * "channel" - sets the frequency channel
   * "chan" - alias for "channel"
   * "checksum" - set checksumming on-off
   * "csma_retries" - set max. number of channel access attempts
   * "encrypt" - set the encryption on-off
   * "hop_limit" - set hop limit
   * "hl" - alias for "hop_limit"
   * "key" - set the encryption key in hexadecimal format
   * "mtu" - IPv6 maximum transition unit
   * "nid" - sets the network identifier (or the PAN ID)
   * "page" - set the channel page (IEEE 802.15.4)
   * "pan" - alias for "nid"
   * "pan_id" - alias for "nid"
   * "phy_busy" - set busy mode on-off
   * "bw" - alias for channel bandwidth
   * "sf" - alias for spreading factor
   * "cr" - alias for coding rate
   * "appeui" - sets Application EUI
   * "appkey" - sets Application key
   * "appskey" - sets Application session key
   * "deveui" - sets Device EUI
   * "dr" - sets datarate
   * "rx2_dr" - sets datarate of RX2 (lorawan)
   * "nwkskey" - sets Network Session Key
   * "power" - TX power in dBm
   * "retrans" - max. number of retransmissions
   * "src_len" - sets the source address length in byte
   * "state" - set the device state

hi @tcpipchip

as suggested by @akshaim, you can use in the meantime the Semtech pkg. This should work:

LORA_REGION=AU915 BOARD=<your_board> make -C examples/lorawan flash term

You can also try test application for the Semtech pkg:

LORA_REGION=AU915 BOARD=<your_board> make -C -C tests/pkg_semtech-loramac flash term

Let me know if this work for you

Hello big Team LORA_REGION=AU915 BOARD=<your_board> make -C -C tests/pkg_semtech-loramac flash example looks much better! No crash on NRF52840 + SX1276 I cant now to continue the test because here there is not LoRaWAN coverage! Thanks so much!

1 Like

No success using the LIB no join did you get success in your side ?

i tried with my local gateway Dragino too…no JOIN

Some tips friend ? i am using 915AU

Coincidentally, I’ve also been working on experimenting with RIOT on a lorawan node this week, in combination with a dragino Pi hat as a lorawan gateway.

I too am having difficulties getting a successful join. I noticed that my Join Request is being received by both the gateway and the TTN network console. I’m also seeing a Join Accept being sent out by TTN (in the console), and on the device-console it marks it as “seen”. But still the join fails…

My current hypothesis is that the join accept is never received by the Gateway, so it cannot send it to the node. This might be because my firewall is blocking incoming UDP traffic from TTN.

I’m not sure if your issue is the same as mine, but you might want to try opening up UDP port 1700 on your router.

hi @Wosym

how are you ?

are you using 915AU ?

And wich RIOT lib, pkg_semtech-loramac example ?

I dont belive that is a firewall problem there, because i got success with LoRaWAN SX1276 join using ARDUINO, MICROPYTHON and CIRCUITPYTHON )

Using NRF52840+SX1276

Wich is your sequence of LORAMAC commands that you use ?

I’m not using 915AU, but I don’t think that should make a difference.

I’m using the lorawan example out of the box, on the esp32-heltech-lorawan board.

If you can receive the joins on your other devices, then it can’t be a firewall problem indeed (unless those connect through other gateways than your own ofcourse)