Unable to receive payload data from end-device in TTN Console!

Hello!

I’ve used this tutorial to connect a hardware device (RPi 4 - 64 bytes based) to TTN Console. I have WM1302 LoRaWAN gateway module with USB version and EU868 frequency bands.

This is a sample from RPi output console:

~/sx1302_hal/packet_forwarder $ **sudo ./lora_pkt_fwd -c global_conf.json.sx1250.EU868.USB**
*** Packet Forwarder ***
Version: 2.1.0
*** SX1302 HAL library version info ***
Version: 2.1.0;
***
INFO: Little endian host
INFO: found configuration file global_conf.json.sx1250.EU868.USB, parsing it
INFO: global_conf.json.sx1250.EU868.USB does contain a JSON object named SX130x_conf, parsing SX1302 parameters
INFO: com_type USB, com_path /dev/ttyACM0, lorawan_public 1, clksrc 0, full_duplex 0
INFO: antenna_gain 0 dBi
INFO: Configuring legacy timestamp
INFO: SX1261 spi_path is not configured in global_conf.json.sx1250.EU868.USB
INFO: Configuring Tx Gain LUT for rf_chain 0 with 16 indexes for sx1250
INFO: radio 0 enabled (type SX1250), center frequency 867500000, RSSI offset -215.399994, tx enabled 1, single input mode 0
INFO: radio 1 enabled (type SX1250), center frequency 868500000, RSSI offset -215.399994, tx enabled 0, single input mode 0
INFO: Lora multi-SF channel 0>  radio 1, IF -400000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 1>  radio 1, IF -200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 2>  radio 1, IF 0 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 3>  radio 0, IF -400000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 4>  radio 0, IF -200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 5>  radio 0, IF 0 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 6>  radio 0, IF 200000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora multi-SF channel 7>  radio 0, IF 400000 Hz, 125 kHz bw, SF 5 to 12
INFO: Lora std channel> radio 1, IF -200000 Hz, 250000 Hz bw, SF 7, Explicit header
INFO: FSK channel> radio 1, IF 300000 Hz, 125000 Hz bw, 50000 bps datarate
INFO: global_conf.json.sx1250.EU868.USB does contain a JSON object named gateway_conf, parsing gateway parameters
INFO: gateway MAC address is configured to 00000000000268
INFO: server hostname or IP address is configured to "eu1.cloud.thethings.network"
INFO: upstream port is configured to "1700"
INFO: downstream port is configured to "1700"
INFO: downstream keep-alive interval is configured to 10 seconds
INFO: statistics display interval is configured to 30 seconds
INFO: upstream PUSH_DATA time-out is configured to 100 ms
INFO: packets received with a valid CRC will be forwarded
INFO: packets received with a CRC error will NOT be forwarded
INFO: packets received with no CRC will NOT be forwarded
INFO: GPS serial port path is configured to "/dev/ttyS0"
INFO: Reference latitude is configured to 0.000000 deg
INFO: Reference longitude is configured to 0.000000 deg
INFO: Reference altitude is configured to 0 meters
INFO: Beaconing period is configured to 0 seconds
INFO: Beaconing signal will be emitted at 869525000 Hz
INFO: Beaconing datarate is set to SF9
INFO: Beaconing modulation bandwidth is set to 125000Hz
INFO: Beaconing TX power is set to 14dBm
INFO: Beaconing information descriptor is set to 0
INFO: global_conf.json.sx1250.EU868.USB does contain a JSON object named debug_conf, parsing debug parameters
INFO: got 2 debug reference payload
INFO: reference payload ID 0 is 0xCAFE1234
INFO: reference payload ID 1 is 0xCAFE2345
INFO: setting debug log file name to loragw_hal.log
WARNING: [main] impossible to open /dev/ttyS0 for GPS sync (check permissions)
Opening USB communication interface
INFO: Configuring TTY
INFO: Flushing TTY
INFO: Setting TTY in blocking mode
INFO: Connect to MCU
INFO: Concentrator MCU version is V01.00.00
INFO: MCU status: sys_time:26230680 temperature:33.4oC
Note: chip version is 0x10 (v1.0)
INFO: using legacy timestamp
INFO: LoRa Service modem: configuring preamble size to 8 symbols
ARB: dual demodulation disabled for all SF
INFO: [main] concentrator started, packet can now be received
INFO: concentrator EUI: 0x000000000000268
INFO: [down] PULL_ACK received in 61 ms

***INFO: Received pkt from mote: 260B285F (fcnt=48)***

JSON up: {"rxpk":[{"jver":1,"tmst":3423876,"chan":5,"rfch":0,"freq":867.500000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF9BW125","codr":"4/5","rssis":-46,"lsnr":8.8,"foff":2260,"rssi":-46,"size":15,"data":"QF8oCyYAMAABLtKHVlik"}]}
INFO: [up] PUSH_ACK received in 64 ms
INFO: [down] PULL_ACK received in 60 ms
^C
#### 2023-11-06 13:53:53 GMT ####
## [UPSTREAM] ##
# RF packets received by concentrator: 2
# CRC_OK: 50.00%, CRC_FAIL: 50.00%, NO_CRC: 0.00%
# RF packets forwarded: 1 (15 bytes)
# PUSH_DATA datagrams sent: 1 (233 bytes)
# PUSH_DATA acknowledged: 100.00%
### [DOWNSTREAM] ###
# PULL_DATA sent: 2 (100.00% acknowledged)
# PULL_RESP(onse) datagrams received: 0 (0 bytes)
# RF packets sent to concentrator: 0 (0 bytes)
# TX errors: 0
### SX1302 Status ###
# SX1302 counter (INST): 15426094
# SX1302 counter (PPS):  0
# BEACON queued: 0
# BEACON sent so far: 0
# BEACON rejected: 0
### [JIT] ###
src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
#--------
src/jitqueue.c:440:jit_print_queue(): INFO: [jit] queue is empty
### [GPS] ###
# GPS sync is disabled

INFO: End of upstream thread

INFO: End of JIT thread
### Concentrator temperature: 33 C ###
##### END #####

INFO: End of downstream thread
Closing USB communication interface
INFO: concentrator stopped successfully
INFO: Exiting packet forwarder program

As you can see above, in output log, I’ve manage to receive from end node upstream data ( INFO: Received pkt from mote: 260B285F (fcnt=48)) and seems to be forwarded to TTN Console, see image below:

Unfortunately, I don’t know why, after I registered successfully a new end device, I can’t receive nothing in live data visualizer, see image below:

Can you provide me some suggestions?

Is that device switched on? And at at least a couple of meters from the (running) gateway? The gateway output (after I editted your message for readability, please do so yourself next time) looks fine. However your end device should transmit a join request which I do not see in the TTN gateway console.

Or even better, what is it?

Some devices don’t like all 00’s for the Join EUI. And before embarking on an adventure of Yes But The Console - do a a forum search to see reality.

Thank you for your help with editing! The end device is ON and is in the same office as gateway.

If you read the forum you will notice a pattern when people ask about non connecting devices:
Move it at least 5 meters and one RF absorber (wall) away from the gateway. LoRaWAN is for long distance and if your device is too close to the gateway it will be like someone shouting in your ear. A lot of noise but nothing recognizable.

i don’t know what you are using your node to measure

do you need a measurement every 10s

your rssi are -40 to -50 i normally try for -80 otherwise you have issues called channel bleed

The volunteers answering here tend to lose the will to help if they don’t get useful information like:

An RPi based device, with HAT shield from Dragino, see this link.

I moved at least 5 meters, as you told me, one device from another, but still doesn’t work as I expect to do it…still not data from end device

What firmware are you using?

I’ve change JoinEUI and it’s not work…Did I make a mistake when I registered a new end device? see image below:

$uname -a
Linux rpi-devel-loraHat 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux

Without knowing what firmware you are using it’s going to be impossible to say - it’s all interconnected - like which LoRaWAN version you are using - unlikely to be 1.1

Close, understandable answer, but for us firmware is the software we use to drive the embedded MCU - which isn’t an MCU in this case as it’s a Pi …

So, which software are you using on the this Dragino board?

I ve use this C library:
LMiC-v1.5.pdf (817.9 KB)

Uploading a PDF is not as helpful as linking to the actual software - that document exists in several places on the internet.

Can you provide a link to where you downloaded the software from please. Do not include the software as a zip file or anything else - if you look round the posts on the forum as I’m sure you’ll have done a search for Pi & LMIC you’ll see how we roll here.

LMiC library was already installed on RPi when I bought it… but it looks like this one: LMiC lib

So where did this come from?

as

doesn’t have a version 1.5 pdf. Is this on the Pi - is there a readme that may tell us where the code is from?


In the meanwhile, can you copy & paste your main.c file - redact (remove) the AppKey which should be kept secret, the rest we need to check and is of public record on join anyway. Please ensure you use the </> tool to format the code please.

This is the README file from lib directory:

Raspberry Pi port LoRaMAC in C / LoRaWAN in C http://www.research.ibm.com/labs/zurich/ics/lrsc/lmic.html

This is a port of IBM's LMIC 1.5 to the Raspberry Pi using the wiringPi library for GPIO/SPI.
It is adapted for TTN (http://thethingsnetwork.org).

It has been tested with an HopeRF RFM95W chip, but should also work with a SX1272 or SX1276.

Some of the changes were taken from or inspired by the arduino-lmic-v1.5 port of tftelkamp (https://github.com/tftelkamp/arduino-lmic-v1.5.git) 

The connections of the pins are defined in the main programs in the examples directory.
Standard connections are:
  WiringPi 6  == nss
  
  not connected == rxtx: not used for RFM95
  
  WiringPi 0 == reset (needed for RFM92/RFM95)
  
  WiringPi 7,4,5 == dio0, dio1, dio2
  
  WiringPi 12 == MOSI
  
  WiringPi 13 == MISO
  
  WiringPi 14 == SCK
  
  GND  == GND
  
  3.3V  == +3.3V
  
The only examples currently implemented are hello (which does nothing) and thethingsnetwork-send-v1 which sends test strings to the TTN network (if a gateway is in reach).
Do not forget to put your own device number in thethingsnetwork-send-v1.cpp!!

I ve used this exexample: thethingsnetwork-send-v1.cpp from source

We are close to the 20 post limit - then it descends in to chaos …

How? That’s for an Arduino!