martynvdijke / gr-lora_sdr

This is the fully-functional GNU Radio software-defined radio (SDR) implementation of a LoRa transceiver with all the necessary transceiver components to operate correctly even at very low SNRs. This work is a collaboration of the Telecommunication Circuits Laboratory from EPFL and the Electronic Systems group from the Technical University of Eindhoven.
https://martynvdijke.github.io/gr-lora_sdr/html/index.html
GNU General Public License v3.0
21 stars 2 forks source link

No TX or RX against commercial devices and gr-lora from rpp0 #4

Closed FlUxIuS closed 3 years ago

FlUxIuS commented 3 years ago

Hi,

Thanks for the port to 3.8 version of @tapparelj we can directly try. I shortly tried the project and tested the RX against TX that are working perfectly. Nevertheless, against gr-lora from rpp0 (https://github.com/rpp0/gr-lora) no uplink frame gets detected using the same config (SF, BW, freq), and neither with a Dragino LG308 gateway, and the RX part of the project doesn't see uplink packets coming from sensors I have including a LoRa shield to easily force the config with Arduino SDK. Only if I conjugate downlink, some garbage happens but not the original text.

Does it work on the original 3.7 version? Or maybe I'm missing another thing? The RX and TX I'm using are taken from the app directory, I only adapted the frequency to match the 868 MHz in Europe, used it with one channel like 868.1MHz, CR=4, SF=7, BW=125kHz, and adjusted the TX_gain to see something in my receiver using a waterfall and FFT.

Thanks in advance!

tapparelj commented 3 years ago

Hi,

The version 3.7 was tested using both link directions with a LoRa chip RFM95W (https://cdn.sparkfun.com/assets/learn_tutorials/8/0/4/RFM95_96_97_98W.pdf). If nothing gets detected I would investigate the configuration of the network identifiers as their default values might not match with ours, which are value 8 and 16. For the receiver you can set them in lib/frame_sync_impl.cc( in the constructor). For the transmitter you can change them in lib/modulate_impl.cc (in general_work()).

What are you meaning by conjugate downlink?

Let me know if your network identifiers are the same and if it doesn't solve your issue can you attach a picture of the GNU Radio flowgraphs you have modified.

FlUxIuS commented 3 years ago

Hi @tapparelj,

So the flowgraph has been modifying as follows to match EU frequency plan: grlorasdr_TX

I could make the TX work with gr-lora from @rpp0 by doing a very basic flowgraph on the RX side and with a 250 kHz samp rate on the RX side: grlorasdr_to_grlorarpp0

But it seems to get desync after some packets. I'll try with two different computers because I generally manage to use gr-lora with multiple freqs and SF using a 2 MHz bandwidth and few optimizations

Using the TX flowgraph, I don't see anything on the SX1301 and SX1257 of the Dragino LG308.

About the RX, the flowgraph is kind of the same as one of your apps like the TX one: grlorasdr_RX

But doesn't see the signal sent by the Microchip RN2483, neither the Dragino LoRa Shield.

Here is a sample of the Microchip RN2483 with some dumb 0x45 bytes: https://drive.google.com/file/d/1PHUJ4WSvJh8ysPSzhUYuXgj7IBr6vdnG/view?usp=sharing

tapparelj commented 3 years ago

Hi, I just tested the samples you sent and found out that the sync words of the Microchip RN2483 are 24 and 32. By editing them in the previously mentioned locations, the frames are correctly detected . image

If you don't know what they are from the chip datasheets, you can easily find their values by adding the "cout" line after the case NET_ID1 (in lib/frame_sync_impl.cc ~line 400):

switch (symbol_cnt) {
    case NET_ID1:{
        std::cout<<"net id 1 = "<<bin_idx<<std::endl;

Then modifying the value net_id_1 accordingly, compiling and adding the same line in the case NET_ID2.

martynvdijke commented 3 years ago

Hi,

I am not sure how, but I completely missed this issue and PR, sorry for that. Is the issue now fixed ?

FlUxIuS commented 3 years ago

Thanks @tapparelj! I'll try that at least next week :)

Do you have also an idea of the problem for the TX part, to be seen on the Dragino GW. I was looking with a LG308 at the time.

Thanks in advance!

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.