[solved] Elecrow Lora node radio v1.0

Hi all,

I have a question i stumble on the Lora node radio v1.0 this is a well designed lora node with battery and antenna for 20 dollar. I have expirence with other nodes and have an own packet forwarder gateway. Other nodes are working correct. But this thing won’t work. In the console of the gateway i see data come in with the correct dev key but no data to the node in the console. I switched of the Frame counter check. I have Copied/pastel the network and app key. I use ABP. Any ideas?

Regards Marcel

Sorry for my english

Hi Marcel,

that’s not enough information to solve your problem

  • link to that ’ Lora node radio v1.0 with tech info
  • data from your console (screenshots/txt)
  • what code do you use - 8 ch gateway ?

Thank you so much for your help. I have the following info:

Lora node radio v1.0


gwtraffic

Click to see the code
```cpp

/*******************************************************************************

  • Copytight © 2016 Maarten Westenberg based on work of
  • Thomas Telkamp and Matthijs Kooijman porting the LMIC stack to Arduino IDE
  • and Gerben den Hartog for his tiny stack implementation with the AES library
  • that we used in the LMIC stack.
  • 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 sensor values read.
  • If no sensor is connected the payload is ‘{“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 for your node
  • 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.

*******************************************************************************/

#define WAIT_SECS 120

#if defined(AVR)
#include <avr/pgmspace.h>
#include <Arduino.h>
#elif defined(ARDUINO_ARCH_ESP8266)
#include <ESP.h>
#elif defined(MKL26Z64)
#include <Arduino.h>
#else
#error Unknown architecture in aes.cpp
#endif

#include “lmic.h”
#include “hal/hal.h”
#include <SPI.h>
#include <RH_RF95.h>

//---------------------------------------------------------
// Sensor declarations
//---------------------------------------------------------

// Frame Counter
int count=0;

// LoRaWAN Application identifier (AppEUI)
// Not used in this example
static const u1_t APPEUI[8] PROGMEM = { 0x41, 0x8F, 0x01, 0xD0, 0x7E, 0xD5, 0xB3, 0x70 };

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

// LoRaWAN NwkSKey, network session key
// Use this key for The Things Network
unsigned char NwkSkey[16] = { xxxxxxxxx };

// LoRaWAN AppSKey, application session key
// Use this key to get your data decrypted by The Things Network
unsigned char AppSkey[16] = { xxxxxxx };

// LoRaWAN end-device address (DevAddr)
// See http://thethingsnetwork.org/wiki/AddressSpace

#define msbf4_read§ (u4_t)((u4_t)§[0]<<24 | (u4_t)§[1]<<16 | §[2]<<8 | §[3])
unsigned char DevAddr[4] = { xxxxxxx };

// ----------------------------------------------------------------------------
// 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, NwkSkey, 16);
}

int debug=1;
uint8_t mydata[64];
static osjob_t sendjob;

// Pin mapping
// These settings should be set to the GPIO pins of the device
// you want to run the LMIC stack on.
//
lmic_pinmap pins = {
.nss = 10, // Connected to pin D 15
.rxtx = 0, // 0
.rst = 9, // Needed on RFM92/RFM95? (probably not) D0/GPIO16
.dio = {2, 6, 7}, // Specify pin numbers for DIO0, 1, 2
// connected to D5, D4, D3
};

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
      Serial.print("EV_TXCOMPLETE, time: ");
      Serial.println(millis() / 1000);
      if(LMIC.dataLen) { // data received in rx slot after tx
          //debug_buf(LMIC.frame+LMIC.dataBeg, LMIC.dataLen);
          Serial.println("Data Received");
      }
      break;
   default:
      break;
}

}

void do_send(osjob_t* j){
delay(1); // XXX delay is added for Serial
Serial.print("Time: ");
Serial.println(millis() / 1000);
// Show TX channel (channel numbers are local to LMIC)
Serial.print("Send, txCnhl: ");
Serial.println(LMIC.txChnl);
Serial.print("Opmode check: ");
// Check if there is not a current TX/RX job running
if (LMIC.opmode & (1 << 7)) {
Serial.println(“OP_TXRXPEND, not sending”);
}
else {

strcpy((char *) mydata,"{\"Hello\":\"World\"}");

Serial.print("ready to send: "); 
Serial.println((char *)mydata);
LMIC_setTxData2(1, mydata, strlen((char *)mydata), 0);
}
// Schedule a timed job to run at the given timestamp (absolute system time)
os_setTimedCallback(j, os_getTime()+sec2osticks(WAIT_SECS), do_send);

}

// ====================================================================
// SETUP
//
void setup() {
Serial.begin(115200);

// LMIC init
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, msbf4_read(DevAddr), (uint8_t*)NwkSkey, (uint8_t*)AppSkey);
// 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);
//
//Serial.flush();
Serial.print(F("A: ")); Serial.println(msbf4_read(DevAddr),HEX);
}

// ================================================================
// LOOP
//
void loop() {

do_send(&sendjob);
while(1) {
os_runloop_once();
yield();
}
}

I searched and can’t find more info from this elecrow board.
Don’t know if the pinmappings in the code are correct, maybe need to mount an extra wire, only thing I see is that you are very close to your gateway with this node :wink:

  • update

found this :sunglasses:

uncle Ali:
https://www.aliexpress.com/item/868mhz-LoRa-Radio-Node-V1-0-IOT-Lora-Module-RFM95-SX1276-for-Arduino-ATmega328P-3-7/32971081613.html

1 Like

const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 5, LMIC_UNUSED_PIN},
};

yes (see the above link) but don’t forget the wire :sunglasses:

I just cut and pasted those from working code that was all, 100% use the jumper pins too - no need for soldering wires

20190323_114421564_iOS

1 Like

Thanks guys for the tips it finaly works