I am testing the lora g/w source below by putting it on the raspberry pi.
-g/w base source code
By changing the rak811 module to p2p mode, it is configured to receive lora packets around it.
Through the AT command below
at+set_config=lorap2p:922100000:12:0:1:8:10
Also, I ran the chirpstack server on the raspberry pi.
The purpose of this test is to replace the gateway module by changing the rak811 module to P2P instead of using a dedicated gateway module. There is a disadvantage that only 1 channel can be used, but the price is low, so I tested it.
To check the operation, the RAK811 test board was set to LoRaWAN A Class and executed.
The JOIN Request packet was normally received from the Raspberry Pi(USB serial), and the udp uplink message was transmitted normally through lora_pkt_fwd.
It was confirmed that the JoinRequest message was received normally through the application server, and the JoinAccept message was also received normally from raspberry pi.
Finally, the downlink packet received from the network server was transmitted through the p2p command below with the same frequency setting.
// Send Join_accept packet received from network server
at+send=lorap2p:2080E686211D01CC4A2D6EB692F54A4CD1
However, the join is not successful on the RAK811 LoRaWAN module.
How can I receive the join_accept packet thrown in p2p mode from the loraWAN module side?
It seems you are trying to use RAK811 as a single channel gateway by utilizing P2P mode. Do I understand it correctly? I am afraid that we can’t support you on that since our P2P is only tested on TX-RX mode.
Hopefully, we have other RAK811 users here who already did what you want and can share some info.
lora(LoRaWAN) <-> lora(P2P) <-> G/W <-> Server
JOIN_REQ -------------------------------------------------> work well
JOIN FAIL.,.,.,.,xxxx<------------------------------------ JOIN ACCEPT
xxxx : fail
Can’t the JOIN process be successful using lora(P2P)'s 1CH RX/TX?
Why are you using Semtech’s 2.4 GHz sourcecode variation when you are not operating on 2.4 GHz? If you want to use the code directly from Semtech rather than use RAK’s derivatives of it, you need to be using the correct code for the hardware, which that is not.
/ Send Join_accept packet received from network server
at+send=lorap2p:2080E686211D01CC4A2D6EB692F54A4CD1
However, the join is not successful on the RAK811 LoRaWAN module.
Downlinks in LoRaWan, including join accepts, must be transmitted at very precise times to match the node receive window. An actual LoRaWan gateway has a concentrator chip which accomplishes this in hardware after the packet is staged by software along with the microsecond timestamp of when it should actually be put on the antenna.
Additional settings are different in the downlink direction - IQ inversion is opposite of normal, and in many bandplans frequency, spreading factor, and bandwidth are different too.
Since you are not using hardware which can really implement LoRaWan as designed, you may want to design your own protocol which better matches the hardware you are using. Or better yet, buy standard LoRaWan-compatible hardware; the price of a concentrator card might seem a lot when starting, but it’s really quite cheap compared to all the software work you’ll need to do to accomplish something non-standard.