iFrogLab / IL-LORA1272

LoRa Module for Arduino, Raspberry Pi, PC, Mac,
http://www.ifroglab.com/
19 stars 17 forks source link

Data lost when receiving (just getting the first packet all other are getting lost) #5

Closed ebarsallo closed 5 years ago

ebarsallo commented 6 years ago

We are using the loop read example python script: ap-Lib-5-lora-LoopRead, and we're experiencing some problems while receiving the data.

  1. We are only able to receive the first the transmission, after that all the subsequent packets are empty.
  2. We have to reset the device iFrogLab LoRa USB Gateway to receive more data. But as before, we only are able to get the one packet and the subsequent packets are empty.

Basically, we are using a iFrogLab LoRa USB Gateway as a receiver and nRF52 Dev Board (with a Semtech LoRa SX1272 transceiver) as a sender. The sender sends data every 1 seconds, while the LoRa USB Gateway is receiving the data. The following is a snippet from the python script:

while True:
  data=LoRa.FunLora_6_readPureData()
  print ("{%d}" %(len(data)) + ",".join("{:02x}".format(x) for x in data))
  time.sleep(1)

In the first iteration of the while loop, we send the respective commands to read from the iFrogLab LoRa USB Gateway device.

0xc1 0x06 0x00 0xc7

The response is as follows (which correspond to the data we send from the nRF52 board):

0xc1 0x86 0x22 0x19 0x63 0x19 0x00 0x00 0x07 0x08 0x0b 0x00 0x00 0x00 0x15 0x0e 0x00 0xe3 0x00 0xe0 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1a

However, for the subsequent iterations of the while loop, we get the following response from the device after sending the commands for reading (0xc1 0x06 0x00 0xc7):

0xc1 0x86 0x02 0x00 0x00 0x45

If we restart the script again (reseting the iFrogLab LoRa USB Gateway device, configuring the modes, etc) we are able to get just one data packet again. Then, as before, all the subsequent packets are empty.

0xc1 0x86 0x02 0x00 0x00 0x45

We did the test on Windows and also on Linux, and the result is the same. Furthermore, we did a test using two iFrogLab LoRa USB Gateway, one acting as receiver and the other as sender, and everything works with that same script (ap-Lib-5-lora-LoopRead.py).

Has the iFrogLab LoRa USB Gateway been tested for receiving data from other LoRa compatible devices?

Can anyone give us hand try to solve this issue?

ebarsallo commented 6 years ago

@powenko @iFrogLab Is it possible to get some feedback?

iFrogLab commented 6 years ago
  1. Could you download and install this Java application first? Make sure device and drive working well. http://www.ifroglab.com/en/?page_id=6703

  2. I will try to use 2 iFrogLab USB Devices to send and receive, We could not 100% make sure other LoRa compatible devices working or not,

One iFrogLab USB device can execute below python code, https://github.com/iFrogLab/IL-LORA1272/blob/master/Samples-Python/02-iFrogLabLevel1-Lib/ap-Lib-5-lora-LoopRead.py The other iFrogLab USB device can execute below python code, https://github.com/iFrogLab/IL-LORA1272/blob/master/Samples-Python/02-iFrogLabLevel1-Lib/ap-Lib-5-lora-LoopWrite.py

  1. Based on your question on Github, Look like passable, But, I need you check 1 and 2 to make sure working, And it will help you make it working, if 1 and 2 working on your case.
ptorrent commented 4 years ago

Hello,

Same problem here. I'm not able to get packets from other Lora endpoint. Any news about that ?

write <Buffer c1 04 03 01 04 07 c4> ======================> <Buffer c1 aa 01 55 3f> write <Buffer c1 03 05 03 01 53 10 0f 89> ======================> <Buffer c1 aa 01 55 3f> write <Buffer c1 02 00 c3> ======================> <Buffer c1 82 08 03 01 53 10 0f 01 04 07 07> mode: 'rx' frequence: 868 BW: '125k' CR: '4/8' SF: 12 power: 15

write <Buffer c1 06 00 c7> ======================> <Buffer c1 86 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65> write <Buffer c1 06 00 c7> ======================> <Buffer c1 86 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65>

write <Buffer c1 06 00 c7> ======================> <Buffer c1 86 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65>

write <Buffer c1 06 00 c7> ======================> <Buffer c1 86 22 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65>

etc...

I tried with the Java software on Windows. It's exactly the same.

Thanks for your help !