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

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!

It s inspired from arduino, it s specified even in README file.

This is my main.cpp file:

/*******************************************************************************
 * Copyright (c) 2015 Thomas Telkamp and Matthijs Kooijman
 *
 * Permission is hereby granted, free of charge, to anyone
 * obtaining a copy of this document and accompanying files,
 * to do whatever they want with them without any restriction,
 * including, but not limited to, copying, modification and redistribution.
 * NO WARRANTY OF ANY KIND IS PROVIDED.
 *
 * This example sends a valid LoRaWAN packet with payload "Hello, world!", that
 * will be processed by The Things Network server.
 *
 * Note: LoRaWAN per sub-band duty-cycle limitation is enforced (1% in g1, 
*  0.1% in g2). 
 *
 * Change DEVADDR to a unique address! 
 * See http://thethingsnetwork.org/wiki/AddressSpace
 *
 * Do not forget to define the radio type correctly in config.h, default is:
 *   #define CFG_sx1272_radio 1
 * for SX1272 and RFM92, but change to:
 *   #define CFG_sx1276_radio 1
 * for SX1276 and RFM95.
 *
 *******************************************************************************/

#include <stdio.h>
#include <time.h>
#include <wiringPi.h>
#include <lmic.h>
#include <hal.h>
#include <local_hal.h>

// LoRaWAN Application identifier (AppEUI)
// Not used in this example
static const u1_t APPEUI[8]  = {};

// LoRaWAN DevEUI, unique device ID (LSBF)
// Not used in this example
static const u1_t DEVEUI[8]  = {};

// LoRaWAN NwkSKey, network session key 
// Use this key for The Things Network
static const u1_t DEVKEY[16] = {};

// LoRaWAN AppSKey, application session key
// Use this key to get your data decrypted by The Things Network
static const u1_t ARTKEY[16] = {};//

// LoRaWAN end-device address (DevAddr)
// See http://thethingsnetwork.org/wiki/AddressSpace
static const u4_t DEVADDR = 0x260B285F;

//////////////////////////////////////////////////
// APPLICATION CALLBACKS
//////////////////////////////////////////////////

// provide application router ID (8 bytes, LSBF)
void os_getArtEui (u1_t* buf) {
    memcpy(buf, APPEUI, 8);
}

// provide device ID (8 bytes, LSBF)
void os_getDevEui (u1_t* buf) {
    memcpy(buf, DEVEUI, 8);
}

// provide device key (16 bytes)
void os_getDevKey (u1_t* buf) {
    memcpy(buf, DEVKEY, 16);
}

u4_t cntr=0;
u1_t mydata[] = {"Hello, world!                               "};
static osjob_t sendjob;

// Pin mapping
lmic_pinmap pins = {
  .nss = 6,
  .rxtx = UNUSED_PIN, // Not connected on RFM92/RFM95
  .rst = 0,  // Needed on RFM92/RFM95
  .dio = {7,4,5}
};

void onEvent (ev_t ev) {
    //debug_event(ev);

    switch(ev) {
      // scheduled data sent (optionally data received)
      // note: this includes the receive window!
      case EV_TXCOMPLETE:
          // use this event to keep track of actual transmissions
          fprintf(stdout, "Event EV_TXCOMPLETE, time: %d\n", millis() / 1000);
          if(LMIC.dataLen) { // data received in rx slot after tx
              //debug_buf(LMIC.frame+LMIC.dataBeg, LMIC.dataLen);
              fprintf(stdout, "Data Received!\n");
          }
          break;
       default:
          break;
    }
}

static void do_send(osjob_t* j){
      time_t t=time(NULL);
      fprintf(stdout, "[%x] (%ld) %s\n", hal_ticks(), t, ctime(&t));
      // Show TX channel (channel numbers are local to LMIC)
      // Check if there is not a current TX/RX job running
    if (LMIC.opmode & (1 << 7)) {
      fprintf(stdout, "OP_TXRXPEND, not sending");
    } else {
      // Prepare upstream data transmission at the next possible time.
      char buf[100];
      sprintf(buf, "%d", cntr++);
      int i=0;
      while(buf[i]) {
        mydata[i]=buf[i];
        i++;
      }
     mydata[i]='\0';
	 LMIC_setTxData2(1, mydata, strlen(buf), 0);
    }
    // Schedule a timed job to run at the given timestamp (absolute system time)
    os_setTimedCallback(j, os_getTime()+sec2osticks(10), do_send); //orig: 20s
         
}

void setup() {
  // LMIC init
  wiringPiSetup();

  os_init();
  // Reset the MAC state. Session and pending data transfers will be discarded.
  LMIC_reset();
  // Set static session parameters. Instead of dynamically establishing a session 
  // by joining the network, precomputed session parameters are be provided.
  LMIC_setSession (0x1, DEVADDR, (u1_t*)DEVKEY, (u1_t*)ARTKEY);
  // Disable data rate adaptation
  LMIC_setAdrMode(0);
  // Disable link check validation
  LMIC_setLinkCheckMode(0);
  // Disable beacon tracking
  LMIC_disableTracking ();
  // Stop listening for downstream data (periodical reception)
  LMIC_stopPingable();
  // Set data rate and transmit power (note: txpow seems to be ignored by the library)
  LMIC_setDrTxpow(DR_SF7,14); 
  //
}

void loop() {

do_send(&sendjob);

while(1) {
  os_runloop();
//  os_runloop_once();
  }
}


int main() {
  setup();

  while (1) {
    loop();
  }
  return 0;
}