LoRa Ra-01 question

Hello,
I made one pair of lora with Ra-01 module with arduino nano. As I read in the internet that communication module able to reach 10.000m of distance. But my device just only around 100 mtrs only.
What requirements to my circuit that can reach more 6000 mtrs?
Here my code:

/*
  LoRa Duplex communication

  Sends a message every half second, and polls continually
  for new incoming messages. Implements a one-byte addressing scheme,
  with 0xFF as the broadcast address.

  Uses readString() from Stream class to read payload. The Stream class'
  timeout may affect other functuons, like the radio's callback. For an

  created 28 April 2017
  by Tom Igoe
*/
#include <SPI.h>              // include libraries
#include <LoRa.h>

const int LED1 = 7;                    //connect one LED to this pin (with appropriate current-limiting resistor of course)
const int LED2 = 8;                    //connect another LED to this pin (don't forget the resistor)

//
//const int csPin = 7;          // LoRa radio chip select
//const int resetPin = 6;       // LoRa radio reset
//const int irqPin = 1;         // change for your board; must be a hardware interrupt pin

String outgoing;              // outgoing message

byte msgCount = 0;            // count of outgoing messages
byte localAddress = 0xBB;     // address of this device
byte destination = 0xFF;      // destination to send to
long lastSendTime = 0;        // last send time
int interval = 2000;          // interval between sends

void setup() {

    pinMode(LED1, OUTPUT);
    pinMode(LED2, OUTPUT);
  
  Serial.begin(9600);                   // initialize serial
  while (!Serial);

  Serial.println("LoRa Duplex");

//  // override the default CS, reset, and IRQ pins (optional)
//  LoRa.setPins(csPin, resetPin, irqPin);// set CS, reset, IRQ pin

  if (!LoRa.begin(433E6)) {             //915E6 initialize ratio at 915 MHz
    Serial.println("LoRa init failed. Check your connections.");
    while (true);                       // if failed, do nothing
  }
  LoRa.setTxPower(20);
  //LoRa.setSpreadingFactor(12);           // ranges from 6-12,default 7 see API docs
  //LoRa.setSignalBandwidth(20.8E3 );           // for -139dB (page - 112)
  //LoRa.setCodingRate4(5);                   // for -139dB (page - 112)
//  LoRa.setSyncWord(SyncWord);  
  Serial.println("LoRa init succeeded.");
}

void loop() {
  if (millis() - lastSendTime > interval) {
    String message = "HeLoRa Cuk!";   // send a message
    sendMessage(message);
    Serial.println("Sending " + message);
    lastSendTime = millis();            // timestamp the message
    interval = random(2000) + 1000;    // 2-3 seconds
  }

  // parse for a packet, and call onReceive with the result:
  onReceive(LoRa.parsePacket());
}

void sendMessage(String outgoing) {
  LoRa.beginPacket();                   // start packet
  LoRa.write(destination);              // add destination address
  LoRa.write(localAddress);             // add sender address
  LoRa.write(msgCount);                 // add message ID
  LoRa.write(outgoing.length());        // add payload length
  LoRa.print(outgoing);                 // add payload
  LoRa.endPacket();                     // finish packet and send it
  msgCount++;                           // increment message ID
}

void onReceive(int packetSize) {
  if (packetSize == 0) return;          // if there's no packet, return

  // read packet header bytes:
  int recipient = LoRa.read();          // recipient address
  byte sender = LoRa.read();            // sender address
  byte incomingMsgId = LoRa.read();     // incoming msg ID
  byte incomingLength = LoRa.read();    // incoming msg length

  String incoming = "";

  while (LoRa.available()) {
    incoming += (char)LoRa.read();
  }

  if (incomingLength != incoming.length()) {   // check length for error
    Serial.println("error: message length does not match length");
    return;                             // skip rest of function
  }

  // if the recipient isn't this device or broadcast,
  if (recipient != localAddress && recipient != 0xFF) {
    Serial.println("This message is not for me.");
    return;                             // skip rest of function
  }

  // if message is for this device, or broadcast, print details:
  digitalWrite(LED1, HIGH);  
  
  Serial.println("Received from: 0x" + String(sender, HEX));
  Serial.println("Sent to: 0x" + String(recipient, HEX));
  Serial.println("Message ID: " + String(incomingMsgId));
  Serial.println("Message length: " + String(incomingLength));
  Serial.println("Message: " + incoming);
  Serial.println("RSSI: " + String(LoRa.packetRssi()));
  Serial.println("Snr: " + String(LoRa.packetSnr()));
  Serial.println();
  digitalWrite(LED1, LOW);  

}

what is wrong?

What LoRa settings are you using;

Spreading Factor ?
Bandwidth ?
Coding Rate ?
SyncWord ?

Whats the RSSi and SNR reported at the point where reception starts to stop ?

Hi,
Thank you for the resmonse. Actually I just copy from internet and try to downloaded into my both circuits.
If the circuit running will give serial data:

LoRa Duplex
LoRa init succeeded.
Received from: 0xbb
Sent to: 0xff
Message ID: 9
Message length: 11
Message: HeLoRa Cuk!
RSSI: -22
Snr: 9.50

From the code I don’t understand about lora itself. Just for hobby and learning I want to made remote control.
In my code I add LED1. It will On and Off if Ra-01 received the data.
I just need for far communication.

here my circuit, please correct me if I’m wrong

That is presumably with the two modules very close together, that is not very informative.

They should be capable of more distance that that, even though you did not say where the 100M was.

Better antennas would help.

Extreme short range is normally a symptom of faulty modules or antennas, the modules can be damadged if they are operated without antennas, particullary if maximum power is selected.

Of course I test not too close like my photo, it just info about my moduls.
I test the communication with observ the LED1 status. With first modul I placed at home and the second one I carry on the way away from first module I see the LED1 status on second module. And around 100 meters the LED1 is not blinking it mean communication was lost.

With coil antena that I use is can't use for long distance?

bajingan:
With coil antena that I use is can't use for long distance?

Like I said better antennas would help (increase distance) try a plain bit of wire around 17cm long.

However, a range of 100M with the coil antennas is less than expected.

I have never tested the library you are using or the RA-01 modules for range, its possible either is faulty in some way.

I try to add wire that you mention and it's work for around 300 meters.
So maybe I need a good antena for my project.
Do you have any hint for the good antena? So with my Ra-01 I able to reach a few of km?

You keep quoting distances, without telling us where they are.

The envirment, location and positioning of antennas can have a hugh difference on range\distance.

A setup that gives you 1km at ground level in an dense urban area could work at 1000km+ with good clear line of sight between transmitter and receiver.

I feel that more and more needs to be learned from this lora problem, because I still lack knowledge about RF communication. Unlike what I imagined using this lora module, I just installed and played to communicate for several kilometers. The lora programming parameters that I don't understand so I can't do anything for the next step to fulfill my desires. The factors that caused my transmitter and receiver to not work at a certain distance made me confused to determine whether this was from a program parameter, electronic hardware, antenna or location. I was confused to determine where I started trouble shooting, because all of this was related to each other. the antenna is good but the parameter is not suitable nor does it solve this problem and vice versa. Thank you for helping.

If you believed that you can just buy an off the shelf module, use a library with its defaults and get kilometeres of range in all circumstances then you were mistaken.

A knowledge of RF, antennas and LoRa parameters in particular, is essential to getting the best out of the modules.

The range you are getting may be correct, since you do not seem to have appreciated how much the environment can affect range , where and how your testing these modules remains a secret to us.

There are changes you can make to what appears to be the defaults for that library that would increase range by around a factor of 10, but with a reduction in data rate.

You could of course take up your problem with whoever sold you the modules.

Thank you for the response

srnet:
The range you are getting may be correct, since you do not seem to have appreciated how much the environment can affect range , where and how your testing these modules remains a secret to us.

I don't have secret, I left my transmitter at in front of home and I walking away from housing complex (of course transmitter blocked by other house) and pay attention to my receiver until the receiving LED is not blinking again that mean the communication is not reached and this point is a farest distance.

srnet:
There are changes you can make to what appears to be the defaults for that library that would increase range by around a factor of 10, but with a reduction in data rate.

Which parameter can increase the range of distance? Maybe you can give the value to try. Low data rate is never mind for me.

At last we know where you are testing, hurah.

In urban areas range is very much reduced, as I mentioned earlier.

You can drop the bandwith to 62.5khz will increase range, that shouild work in most circumstances, 41.7khz will work too if you have the gear for measureing the frequency of the modules and making an adjustment.

Increasing the spreading factor to 12 will also increase range.

Setting the coding rate to 8 will also provide a small increase in range.

Yes I test with parameter that you mention and have good result. The distance is increased. Maybe antenna and position are influence factor for distance coverage.
Do you have information about suitable DIY antenna for this Ra-01 module?

bajingan:
Do you have information about suitable DIY antenna for this Ra-01 module?

This is 433Mhz remember.

There will be gazillions of DIY antenna articles to be found on Google, since its so close to the Amatuer radio 70cm band.

I really appreciate your help with this project. But something has been missed at the beginning of making this project. It is a matter of legal rule in my country that regulates radio frequency issues. I just found out after reading from several references. This is very disappointing. But whatever I have done this will make a very valuable experience.

Thank and best regards