Raspberry Pi node with LMIC - Unable to receive downlinks

Hi, did you try to perform a LoRaWAN node downlink with Rpi 3B+ with LMiC 1.6 for a Dragino Lora/GPS HAT (SX1276) ?
I’m trying since many days but I can only join TTN in OTAA and transmit an uplink message.
TTN end device is set up on LoRaWAN version MAC V1.0 with frequency plan Europe 863-870 MHz (SF9 for RX2-recommended).

Like you, I’ve modified the loggers in hal.c to see precise time of RX1 & RX2 start time after LMIC.txend.

// switch between radio RX/TX
void hal_pin_rxtx (u1_t val) {
#ifdef DEBUG_HAL
   val > 0 ? fprintf(stdout, "%09d HAL: Sending ...\n", osticks2ms(hal_ticks()))
   : fprintf(stdout, "%09d HAL: Receiving ... delay between txend & rx start %09d ms \n",osticks2ms(hal_ticks()), osticks2ms(hal_ticks()-LMIC.txend));
#endif

void hal_waitUntil (u4_t target_ticks) {
#ifdef DEBUG_HAL
   int attente=target_ticks-LMIC.txend;
   fprintf(stdout, "%09d HAL: Wait until %09d ms, delay between txend & RX end target %09d ms\n", osticks2ms(hal_ticks()), osticks2ms(target_ticks),osticks2ms(attente));
#endif

My RX1 window starts exactly at 1000 ms after LMIC.txend but as you can see ends only 1ms after the starts (RX1 delay seems too short).
My RX2 window seems to start too late at 2047 ms after LMIC.txend. (47 ms later than the 2s ).
I’ve tried to change the targets for the end of RX1 and RX2 but I can’t find how to do it it in the LMiC library.

Do you have any recommendation?
Regards,
David From Noumea New Caledonia (South Pacific Island)

000000000 HAL: Initializing ...
000000003 HAL: Detected SX1276 radio module.
000000004 HAL: Set radio RST pin to 0x00
000000004 HAL: Wait until 000000005 ms, delay between txend & RX end target 000000005 ms
000000005 HAL: Set radio RST pin to 0x02
000000006 HAL: Wait until 000000011 ms, delay between txend & RX end target 000000011 ms
000000014 HAL: Receiving ...delay between txend & rx start 000000014 ms
000000029 Debug: Initializing
000000029 Debug: JOINING
000003952 Debug: EV_TXSTART
000003952 HAL: Sending ...
000004014 RADIO : LMIC.txend.
000009014 HAL: Receiving ...delay between txend & rx start 000005000 ms
000009014 HAL: Wait until 000009016 ms, delay between txend & RX end target 000005001 ms
000009087 Debug: JOINED
000009087 Debug: Label 'netid = ' value 0x13
000009088 Debug: EV_TXSTART
000009088 HAL: Sending ...
000009160 RADIO : LMIC.txend.
**/RX1 Downlink Window/**
000010160 HAL: Receiving ...**delay between txend & rx start 000001000 ms**
000010160 HAL: Wait until 000010162 ms,**delay between txend & RX end target 000001001 ms**
**/RX2 Downlink Window/**
000011208 HAL: Receiving ...**delay between txend & rx start 000002047 ms**
000011208 HAL: Wait until 000011209 ms,**delay between txend & RX end target 000002049 ms**
000015516 Debug: TXCOMPLETE
000015516 INFO main: Size Of LMIC.dataLen (downlink message): 0

You posted above in a 3 year old STM32 related topic.

Is your node a Raspberry Pi 3B+ with Dragino SX1276 hat using LMIC?
If so which library exactly? What is the URL to its repository?

If your node is a STM32 (or other) based end device and your ‘gateway’ is a Raspberry Pi 3B+ with Dragino SX1276 hat then latter is not a LoRaWAN gateway but a single channel packet forwarder (SCPF) which are deprecated and not supported.

Hi,

I don’t use any STM32.

My LoRaWAN node is done with a Raspberry Pi 3B+ and a Dragino LoRa/GPS (SX1276) with LMiC v1.6 from this repository:

My Gateway is a Ursalink UG85-W-G-P-EU868 with those settings :

  • Packet Forwarder only,
  • Type : Semtech,
  • Server : eu1.cloud.thethings.network,
  • Port up 1700,
  • Port down 1700.

NB. I’ve also tested this repository:

as linked in: Lora/GPS HAT - Wiki for Dragino Project

Regards,
David

I have no recent experience with Raspberry Pi based LoRaWAN nodes.
While possible and used in the past a Raspberry Pi is not a first choice for implementing a LoRaWAN node with a SPI LoRaWAN module. Microcontrollers are preferred here, which don’t have the timing (and cost) overhead of a board that runs a full (Linux) operating system.

The referred LMiC 1.6 based libraries are 4 to 6 years old and have since not been maintained. This means that all new LoRaWAN developments and requirements since will not have been implemented, which may be more important for TTN V3.

Be aware that for TTN V3 (TTS CE V3) the RX2 window has been set to 5 seconds.
Several LoRaWAN related end device parameters can be specified in the console when adding the device and/or changed with the CLI tool afterwards.
Use search to find other topics where this is further discussed.
It is possible to configure the RX2 window shorter than 5 seconds, but the 5 seconds was explicitly set for V3 for reasons of Packet Broker. If you set it shorter it may (sometimes) work but proper operation is not guaranteed.

A common cause for failing downlinks (and failing OTAA) with LMIC libraries is that DIO1 is not properly connected/configured.

For OTAA (joins) it is required that downlinks work, otherwise the join accept is never received.
So if you were able to make a successful join this also implies that the join accept downlink was succesfully received (and hence DI01 is probably correctly configured).
It seems that in your situation some downlinks succeed while others do not

Using ABP should be possible on V3 but requires certain parameters to be set correctly for the end device (e.g. addition of 5 frequencies). This is discussed and documented elsewhere on the forum (search for V3 and ABP).

1 Like

This is the third Pi + Dragino HAT in ten days on the forum - so you may want to use search to see how well other people are getting on.

Thanks for your answer Bluejedi :wink:
I will try to move RX2 window to 5 seconds after TX end instead of 2 seconds with the Dragino Hat & LMIC library.
I’m now using Raspberry Pi 3B+ with RAK811 breakout (LoRaWAN is already implemented so it’s easier).
Have a nice day!
David

1 Like