JaapBraam / LoRaWanGateway

A LoRaWan Gateway in LUA
MIT License
225 stars 74 forks source link

why the percent of receive success is low when set the GW_SF to ALL #47

Open Kingwulin opened 5 years ago

Kingwulin commented 5 years ago

Hi JaapBraam,I am coming again When I set parameter GW_SF to a specific value(like SF10), the gateway can receive 100% ok, But when I set the parameter GW_SF to ALL, the gateway mostly prompts "rx timeout", only about 20% can receive the data.So I want to know what about you reality test and if there are any advise for me to deal this problem Great thank to you!!!

JaapBraam commented 5 years ago

Do you have an operational node yourself? Does your gateway receive all messages the node sends on the frequency your gateway is configured to when you set the SF the node is transmitting on? If so, does it still receive all messages when using GW_SF ALL?

Kingwulin commented 5 years ago

Yeap,I have my own node,and I set its transmitting freq at 471.1MHz , receiving freq at 501.1MHz,.I find it work well when I use the single SF(SF10).But loss many messages when setting the SF to ALL,and I am sure the transmitting and receiving freq of node and gateway as below all the time: node tx freq = gate rx freq = 471.1MHz node rx freq = gate tx freq = 501.1MHz

Kingwulin commented 5 years ago

Hi Jaap Braam Why not use the RegIrqFlags1 register to determine whether at timeout of receiving but use the value state

related code here

Kingwulin commented 5 years ago

I had saw the discussion here, it seems that I know the reason why I cant receive every message.any way,thank you for your project by the way, I think value of rssi is unreliable at all.But I still want to know if there were other ways that can listen all sf

kolychen commented 5 years ago

Hello, I transplanted this project on sx1278 and esp8266, and now I have encountered this problem.

  1. When set to fixed SF, the receiving rate is 100%.

  2. The same frequency, when set to ALL mode, the receiver rate is about 1%, almost rxtimeout. In all mode, single receiving mode is changed to continuous receiving mode. Data can be received in ALL mode without rxtimeout, but no data can be received for about one minute, which shows that no interruption can be entered. What's the reason for this? Why is there always a timeout in single mode? Have you ever encountered this problem?

Kingwulin commented 5 years ago

Hi garyquan,I also tested with sx1278 and esp8266,and the problem I meeting is almost the same as you

When setting at ALL sf,I found the gateway can detects the right SF,and enter the single receive mode,but almost result is rxtimout,so I am sure that using the CAD mode to detect SF is ok,but why cant receive data

what also make puzzled is that why using the rssi value to determine whether enter rx mode,I just feel that the rssi value is unreliable

Kingwulin commented 5 years ago

Hello, I transplanted this project on sx1278 and esp8266, and now I have encountered this problem.

  1. When set to fixed SF, the receiving rate is 100%.
  2. The same frequency, when set to ALL mode, the receiver rate is about 1%, almost rxtimeout. In all mode, single receiving mode is changed to continuous receiving mode. Data can be received in ALL mode without rxtimeout, but no data can be received for about one minute, which shows that no interruption can be entered. What's the reason for this? Why is there always a timeout in single mode? Have you ever encountered this problem?

hey hey,I found that you are a Chinese too,let have a told over qq or wechat? that maybe would be more Efficient,although we need more JaapBraam's help

kolychen commented 5 years ago

Hello, I transplanted this project on sx1278 and esp8266, and now I have encountered this problem.

  1. When set to fixed SF, the receiving rate is 100%.
  2. The same frequency, when set to ALL mode, the receiver rate is about 1%, almost rxtimeout. In all mode, single receiving mode is changed to continuous receiving mode. Data can be received in ALL mode without rxtimeout, but no data can be received for about one minute, which shows that no interruption can be entered. What's the reason for this? Why is there always a timeout in single mode? Have you ever encountered this problem?

hey hey,I found that you are a Chinese too,let have a told over qq or wechat? that maybe would be more Efficient,although we need more JaapBraam's help

qq 404538223

JaapBraam commented 5 years ago

Hi Jaap Braam Why not use the RegIrqFlags1 register to determine whether at timeout of receiving but use the value state

related code here

Reading the register takes more time than checking a variable. Reading a register in LUA takes quite some time. It is important to start receiving as fast as possible so that the message won't be missed...

JaapBraam commented 5 years ago

Yeap,I have my own node,and I set its transmitting freq at 471.1MHz , receiving freq at 501.1MHz,.I find it work well when I use the single SF(SF10).But loss many messages when setting the SF to ALL,and I am sure the transmitting and receiving freq of node and gateway as below all the time: node tx freq = gate rx freq = 471.1MHz node rx freq = gate tx freq = 501.1MHz

If I remember correctly using lower frequencies, some registers have to be configured differently in xsInit(). Have a look at the SX1276 datasheet. Currently the registers are configured for higher frequencies...

webgps commented 4 years ago

Hello, I transplanted this project on sx1278 and esp8266, and now I have encountered this problem.

  1. When set to fixed SF, the receiving rate is 100%.
  2. The same frequency, when set to ALL mode, the receiver rate is about 1%, almost rxtimeout. In all mode, single receiving mode is changed to continuous receiving mode. Data can be received in ALL mode without rxtimeout, but no data can be received for about one minute, which shows that no interruption can be entered. What's the reason for this? Why is there always a timeout in single mode? Have you ever encountered this problem?

Can you share your transplantation? :)