Node: Need a sketch that works with Dragino LoRa Shield & Arduino Uno


(Robertthompson) #1

Hello:
Can someone point me to a “node” sketch that absolutely works on a “Dragino LoRa Shield v1.4” attached to a “Arduino Uno R3” using 915mhz?
I have tried numerous of tutorials and their sketches but have not been able to get my node “seen” on TTN - the device status is always “never seen”.

Present sketch being used: https://github.com/dragino/Lora/blob/master/Lora%20Shield/Examples/lora_shield_ttn/lora_shield_ttn.ino

Serial Monitor output:
Starting
Packet queued
142752: EV_TXCOMPLETE (includes waiting for RX windows)

Any suggestions would be appreciated.

Rob.


(Tvloon) #2

Try dragino >>
Lora / Lora Shield / Examples /


(Robertthompson) #3

Thanks for the reply tvloon. :slight_smile:

I have tried many of the examples resulting from such a search also the Dragino examples specifically.

I am looking for a “user” who has the exact same components as I do (“Dragino LoRa Shield v1.4” attached to a “Arduino Uno R3” using 915mhz) and has a working node and who is willing to share the sketch that is being used.

I need to know that the sketch works on my exact components so that, if it does not work for me, I can eliminate the sketch as a cause.

This is all very frustrating given how simple it was to get the Dragino LoRa /GPS Hat for RPI to register on TTN.

Rob.


(LoRaTracker) #4

What do Dragino have to say about the problem, their board, their code ?


#5

I have used the 868 version just fine. There are some changes that you need to do that are specific for 915Mhz
Have a look here for tests and changes if you want 915Mhz to work OK
N.B. Only ABP works with the Dragino single channel gateway
http://wiki.dragino.com/index.php?title=Lora_Shield#Example1_--_Use_with_LMIC_library_for_LoRaWAN_compatible

1.Copy this code to your IDE and upload the sketch to your Arduino board:
There,you can also add below code to your sketch to check the current emission frequency:
Serial.println(LMIC.freq);


2.Edit "config.h"
change
   #define CFG_eu868 1
to
  #define CFG_us915 1

3.Edit "lmic.c",about on the line 760,
change
  void LMIC_disableChannel (u1_t channel) {
     if( channel < 72+MAX_XCHANNELS )
        LMIC.channelMap[channel/4] &= ~(1<<(channel&0xF));
  }

to

  void LMIC_disableChannel (u1_t channel) {
      if( channel < 72+MAX_XCHANNELS )
          LMIC.channelMap[channel/16] &= ~(1<<(channel&0xF));
  } 


4.Edit the "main.cpp" to "Set center frequency" on your Raspberry Pi.
change
   uint32_t freq = 868100000; //in Mhz! (868.1)
to
  uint32_t freq = 915000000; //in Mhz! (915.0)

(Robertthompson) #6

I could kiss you!!! :slight_smile: :slight_smile: (figure of speach)
I don’t believe it but IT IS WORKING!!!

image

That means that it is working, right?

I really, really appreciate the time and effort you put into your reply.

I have been working on this for weeks now - I still can’t believe that it is working…

Thanks,

Rob.


(LoRaTracker) #7

Well if you have a solution,be sure to tell Dragino, it could help so many people solve the same problem …


#8

CurlyWurly explained it clearly … dragino should indeed edit their wiki’s


(Robertthompson) #9

Sorry.
My internet is down since Sunday.
Will properly test and respond.
Rob. (from Internet Cafe)


(Glbaum) #10

Hopefully things are working well Rob when you get your internet back and a chance to test. Things here in Montreal seem to be working well with the above set up at the moment. Still can’t get the slightly more expensive piece of junk LG-01 to work, though that may be from my own issues.


(Redpotatoes) #11

Quick question, I see in frequency in TTN, you have 915. How did you set your freq in the LG01 ?
I am able to make my nodes and gateways working on single 902300000 freq but not sure how you did it on LG01.