Using LoRa P2P on the RAK4631

I am considering moving from using LoRa WAN to using plain LoRa between 4631 based devices and RAK7248 gateways.
I have no idea where to start!
Is there any documentation that I can refer to?

Hi @Alangward ,

@beegee have many RAK4631 running in P2P mode. But I am confused about why there is a gateway(RAK7248) if it is a P2P setup?

Hi @Alangward

LoRaWAN gateways cannot communicate in LoRa P2P mode. They are not supporting it.

What I did in my P2P setups is to have one device with a RAK2305 WiFi module. This device acted as gateway, receiving the P2P packets from the other nodes and then forwarding them to the Cloud.

Hi @beegee
Thanks for this. I already have one of those WiFi modules so I could try that approach out.
Could you point me at some code that I use a s a starting point?

I did not publish that code because it is about my home control system (intruder detection, environment sensors, light automation). And I did not use the AT command interface of the RAK2305, instead I flashed it with my own custom firmware.

You will have to learn about the ESP32 AT commands => AT Command Set — ESP-AT User Guide documentation
There are options to communicate over TCP, HTTP Post, MQTT to a server in the cloud. I never used these by myself.

Thanks for that. I’ll see what I can put together.

I’ve been successful in getting two RAK 4631 devices talking to each other.
I’m wondering if the gateway service on my RAK 7248 shouldn’t also be able to see these messages.
I know the gateway is intended to handle LoRaWAN rather than plain LoRa. I thought however that the gateway would be able to see plain Lora messages, but that they would discarded somewhere later?
I got the default Semtech lora-pkt-fwd app running on a clean pi build as I wondered if that would pass through the lora messages, but its failing with not being able to find a temperature sensor on port 0x39 etc.


I never saw any of my LoRa P2P packets in the log of the gateway. I guess they are filtered out by the gateway firmware immediately after they are received because they are in the wrong format.

Sorted it.

I changed the public/private setting in the gateway config file to false (i.e. private)
Chirpstack is confused as it thinks all the messages are Join Accepts.
If I listen to the mqtt feed (gateway/#) I am getting my messages with unencrypted data as I had hoped.


If you set the gateway to private network, you have to do the same in the nodes.


But I never tested it. No guarantee it works.

The nodes are no longer Lorawan so they don’t care??

They are still LoRaWAN, maybe a Google search helps you to understand the difference.