Connection p2p with two RN2483 and LoRaWan gateway

Just a photograph of the two RN2483 modules and how they are connected.
From the code I cannot make up why it doesn’t work, perhaps the phyical setup is wrong.
Otherwise I don’t know it. I was able to communicate between my RN2483 module and a SX1276 module, so it should be possible to send and receive p2p.

Are you able to communicate with a gateway? Perhaps you can use the other module to eavesdrop on this connection.

I don’t have anything connected to it, they were able to connect to the gateway indeed, but I only have two modules, so it would not be enough, further, if I disable the LoRaWan stack, the gateway won’t see much right?

@scl how does your code look like? I mean the sending and receiving part

My set up in both nodes is this

 Serial.print("Pausing mac: ");
  Serial1.write("mac pause\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  
  Serial.print("Setting device in lora modulation: ");
  Serial1.write("radio set mod lora\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting frequency: ");
  Serial1.write("radio set freq 868000000\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting power: ");
  Serial1.write("radio set pwr 14\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting sf: ");
  Serial1.write("radio set sf sf12\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting afcbw: ");
  Serial1.write("radio set afcbw 125\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting rxbw: ");
  Serial1.write("radio set rxbw 250\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting fdev: ");
  Serial1.write("radio set fdev 5000\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting prlen: ");
  Serial1.write("radio set prlen 8\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
//  Serial.print("Setting crc: ");
//  Serial1.write("radio set crc on\r\n");
//  delay(50);
//  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting cr: ");
  Serial1.write("radio set cr 4/8\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting sync: ");
  Serial1.write("radio set sync 12\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting bw: ");
  Serial1.write("radio set bw 250\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting wdt: ");
  Serial1.write("radio set wdt 0\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
  Serial.print("Setting IQ inversion: ");
  Serial1.write("radio set iqi on\r\n");
  //Serial1.write("radio get iqi\r\n");
  delay(50);
  while (Serial1.available()) Serial.write(Serial1.read());
  LoRaBlink();
osjob_t initjob;
led_init();
uart_init();

debug_str("hallo\r\n");

// LoRa Standby MODE
writeReg(0x01, 0x81);
// Set frequency 869525000 -> 868300000
writeReg(0x06, 0xD9);
writeReg(0x07, 0x61); //13
writeReg(0x08, 0x99); //33
// Set RF Amplifier
writeReg(0x09, (0<<7)|(7<<4)|(14<<0)); //7f
// Set Amplifier Ramp-up
writeReg(0x0A, 0x08);
// Set LNA
writeReg(0x0C, 0x23); // Max gain, LNA-boost on
// Set LoRa page registers
writeReg(0x0E, 0x00);
writeReg(0x0F, 0x00);
// Setup interrupts
writeReg(0x40, 0b00111111); // set irq type, receive DIO0
writeReg(0x12, 0xFF); // reset flags
writeReg(0x11, 0x00); // mask
// Modem configure
writeReg(0x1D, 0x72); // 125 kHz, cr 4/5, explicit header
writeReg(0x1E, 0xC0); // SF12, CRC disable
writeReg(0x26, 0x04 | 0x08); // LNA gain internal AGC loop, low data rate optimize
// IQI configure
writeReg(0x33, 0x67); // IQI mode (27 = enabled or 67 = disabled)
writeReg(0x3B, 0x19); // 1D or 19
// send
hal_pin_rxtx(1);
// Setup payload - length 5
writeReg(0x0D, 0x00);

writeReg(0x22, 0x20);
writeBuf(0x00, buf, 32);
// Set to LoRa receive MODE
writeReg(0x01, 0x83);
//writeReg(0x01, 0x85);

u1_t mode = 0;

while(1) {
	delay_ms(2000);
	u1_t val = readReg(0x01);
	mode = val;
//		writeReg(0x0D, 0x00);
	// Setup payload - length 5
//		writeBuf(0x00, buf, 32);
	// Set to LoRa receive MODE
//		writeReg(0x01, 0x83);
}

This was my code to control SX1276, in combination with the LMiC library and an XMC1100 starter kit. But the RN2483 should be able to do the same with some commands (because under the hood it is the same).

I was using RN2483 with a USB-UART (3.3Volt) converter and a serial console. And entering commands manually. Shouldn’t you use an antenna btw, i see none in your picture?

According to the doc of TTU it does not need an extra antenna, there’s one antenna the one labeled in the picture as AF.

Looking your code, I see two things different from mine, first you disable the CRC when transmitting is that a reason for? I have done it as well, no luck thouh. The second one is that you specify a payload of , where can I do that in the RN2483 ? with the command radio tx 5 and radio rx 5?

Shouldn’t make a difference, disabling CRC only you would get an error in receive if the CRC is incorrect but it would give a signal.

Payload length is only needed when using implicit header… So that one is not used. I did both receiving and transmitting with this code, but it seems I have mixed it up a bit.
I used this code below in the receive interrupt btw:

u1_t len = readReg(0x13);
u1_t snr = readReg(0x19);
u1_t rssi = readReg(0x1A);
u1_t buffe[512] = {0};

// set pointer to 0
writeReg(0x0D, 0x00);
readBuf(0x00, buffe, len);

writeReg(0x12, 0xFF);

But this has nothing to do with your problem. I think I don’t know how to solve your problem unfortunately, I ran out of ideas. The antenna seems te be fine.

Thank you very much for your help scle, I really appreciate it. I don’t know neither where is the issue, maybe I should throw away this platform and go for a different one. I am run out of ideas as well.

Hi @ndarkness, do not give up :wink:

I have two nodes like this: 868MHz RN2483 LoRa™ Technology Mote and managed to get them to talk to each other as described in the link @sergiosena provided earlier (setting all parameters etc.).

I decided to take small steps and started with a simple setup connecting both nodes to my Windows PC. Both were recognised as serial ports (in my case COM6 & COM7). I then used a serial monitor/terminal application (like Tera Term) and initially entered all commands per hand. I know, not optimal but served the purpose and I know that the nodes can talk to each other. :smile:

Now my plan is to write scripts/programs to automate the stuff so thanks to all for some ideas in this thread.

I cross my fingers for your tests to success.

Hi @ksl2europe thank you,

Well my nodes are already mounted in the TTU, so as starting I am using arduino workbench to develop, the code, I had just to simple functions on configuing the other sending or receiving. Thus not big deal, I increased arduino void function timeout to have enough transmission time, but as you see in the post not luck…

Hi @ndarkness,

how about running a simple “serial in, serial out sketch” on Arduino as described here for the WiFi chip: Arduino to ESP8266 By Serial Communication? I guess this way the RN2483 shall be easier to control during your tests.

Cheers,
K.

Thanks @ksl2europe, but my chip is embbeded on the aurdion board, since is the The Things Uno, so you mean that I read from the serial pins of the TTU the serial port?

Interestingly, I also played with the P2P connection between two RN2483 . Indeed, it succeeds in transmitting data in both directions. Just fun to test, :wink:

2x RN2483 connected via ftdi to usb

Output on serial monitor

Good luck to those who continue to develop :wink:

2 Likes

I also played with p2p RN2483 walking around with a laptop.

My code is available here : https://bitbucket.org/oetelaar/lora_rn2483/src

Hello all,

I saw @oetelaar, @IOT_Marco and others talking that is able to transmit data between two RN2483.

My question is: It’s possible to change data between RN2483 (P2P) without a gateway?

Thanks,

Do you mean exchange data between them? Yes it is possible without the gatway, in p2p mode, you’re relying on the LoRa modulation only, there is no LoRaWan stack running on top of the modulation, let’s say that at p2p your are only using the PHY layer of LoRa and not the aboves one ( like Link one)

REgards,

2 Likes

Hi @ndarkness,

Maybe I had fail in my question, but you answered that I wanted, change data between two nodes without a gateway to intermediate them. :+1:

I know that if using P2P I’m ignoring LoRaWan stack.

1 Like

hi @ksl2europe
@IOT_Marco
@denisber they use simple P2P communication without a Gateway sorry, but there is a documentation, or demo on how to make communication between RN2483 and Gateway ? or course using Lorawan (there RF interface )
@oetelaar this is great, nice to success established bidirectional communication between tow RN2483

In our case, we need to make a communication between Linklabs Gateway LoRaWAN and RN2483 ?

We search on many forum and contacting many support team, like LinkLabs, but always no response or they don’t know also, we can’t find documentations about this

How isn’t available if a gateway like LinkLabs destination to be the main point of IoT network, and his manufacturer don’t make the necessary documentation or support for that

Please, anyone have idea, we will be appreciate your help

Thanks

I’m a student and receive project from my teacher about transmit data between two RN2483, you can share your code and experience about them?
Please help me.Thank you.

@thonguyen,
There is no code to share.
Every RN2483 (as you can see in the picture above) has it’s own uart connection via ftdi module and a usb port on a laptop, so there is no wired connection between them. On both laptops you start a program like Termite and all you have to do is program one RN2483 (1) as a receiver and the other (2) as a transmitter with the commands like:

(1)
radio rx 0 //this RN2483 is the receiver and

(2)
radio rx 1 //this RN2483 is the transmitter

after that you can send and receive data
(2)
radio tx 1234

These are all commands you can find in the RN2483 command reference user guide

succes

A post was merged into an existing topic: Microchip released RN2483 library code