Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log is report always rx1 downlink #487

Open
clavisound opened this issue Jan 3, 2025 · 4 comments
Open

Log is report always rx1 downlink #487

clavisound opened this issue Jan 3, 2025 · 4 comments

Comments

@clavisound
Copy link

Hello there.

My node sends at SF9. The gateway sends at RX2 window with SF12 but helium-gateway.log says RX1 downlink.

2024-12-10T18:04:45.488863Z  INFO gateway_rs::gateway: rx1 downlink @568281912 us, 868.30 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:04:51.144646Z  INFO gateway_rs::gateway: rx1 downlink @570828384 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:41:37.221780Z  INFO gateway_rs::gateway: rx1 downlink @2776919708 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:49:55.549376Z  INFO gateway_rs::gateway: rx1 downlink @3278416938 us, 868.30 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:50:01.284748Z  INFO gateway_rs::gateway: rx1 downlink @3280914568 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:16:15.048746Z  INFO gateway_rs::gateway: rx1 downlink @559679256 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:35:07.867986Z  INFO gateway_rs::gateway: rx1 downlink @1695790295 us, 868.50 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:35:13.444322Z  INFO gateway_rs::gateway: rx1 downlink @1698236903 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:45:38.536879Z  INFO gateway_rs::gateway: rx1 downlink @2323363447 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00

I have data-only hotspot.

@madninja
Copy link
Member

madninja commented Jan 3, 2025

Hello there.

My node sends at SF9. The gateway sends at RX2 window with SF12 but helium-gateway.log says RX1 downlink.

2024-12-10T18:04:45.488863Z  INFO gateway_rs::gateway: rx1 downlink @568281912 us, 868.30 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:04:51.144646Z  INFO gateway_rs::gateway: rx1 downlink @570828384 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:41:37.221780Z  INFO gateway_rs::gateway: rx1 downlink @2776919708 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:49:55.549376Z  INFO gateway_rs::gateway: rx1 downlink @3278416938 us, 868.30 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T18:50:01.284748Z  INFO gateway_rs::gateway: rx1 downlink @3280914568 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:16:15.048746Z  INFO gateway_rs::gateway: rx1 downlink @559679256 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:35:07.867986Z  INFO gateway_rs::gateway: rx1 downlink @1695790295 us, 868.50 MHz, DataRate(SF7, BW125), len: 33 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:35:13.444322Z  INFO gateway_rs::gateway: rx1 downlink @1698236903 us, 869.52 MHz, DataRate(SF12, BW125), len: 13 downlink_mac=xx:xx:xx:xx:xx:xx:00
2024-12-10T19:45:38.536879Z  INFO gateway_rs::gateway: rx1 downlink @2323363447 us, 869.52 MHz, DataRate(SF12, BW125), len: 17 downlink_mac=xx:xx:xx:xx:xx:xx:00

I have data-only hotspot.

The gateway-rs code sends at whatever the LNS says to send at. The code here: https://github.com/helium/gateway-rs/blob/main/src/gateway.rs#L311-L330 shows that gwrs sends at rx1 first if available and then if it can't it sees if there's an rx2 window set and uses that to try the rx2 downlink.

How are you seeing that the gateway sends rx2? Nothing in the log there indicates that it is.. if so perhaps your semtech packet forwarder isn't set up right?

@clavisound
Copy link
Author

clavisound commented Jan 3, 2025

Hello, thanks for the answer and the heads up to the code.

I know it because

  1. the GW sends at RX2
JSON down: {"txpk":{"imme":false,"tmst":2665041900,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFCgADUf8AAeriI+c=","size":17}}
JSON down: {"txpk":{"imme":false,"tmst":526599649,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFCwADUf8AAUK3WTE=","size":17}}
JSON down: {"txpk":{"imme":false,"tmst":859758838,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFDAADUf8AAYJBG6g=","size":17}}

  1. From the helium gateway log, check the FREQ. The Freq is RX2 869.52 MHz but it writes RX1.

Sorry I don't understand rust :(

So, if I understood right. The LNS is at fault? Node receives the downlink. To me, it's only a grammar mistake, not an operational mistake.

The weird part is that the frequency is right, but the RX number is wrong.

@madninja
Copy link
Member

madninja commented Jan 3, 2025

Hello, thanks for the answer and the heads up to the code.

I know it because

  1. the GW sends at RX2
JSON down: {"txpk":{"imme":false,"tmst":2665041900,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFCgADUf8AAeriI+c=","size":17}}
JSON down: {"txpk":{"imme":false,"tmst":526599649,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFCwADUf8AAUK3WTE=","size":17}}
JSON down: {"txpk":{"imme":false,"tmst":859758838,"freq":869.525,"rfch":0,"powe":13,"modu":"LORA","datr":"SF12BW125","codr":"4/5","ipol":true,"prea":null,"data":"YK4JAEiFDAADUf8AAYJBG6g=","size":17}}
  1. From the helium gateway log, check the FREQ. The Freq is RX2 869.52 MHz but it writes RX1.

Sorry I don't understand rust :(

So, if I understood right. The LNS is at fault? Node receives the downlink. To me, it's only a grammar mistake, not an operational mistake.

The weird part is that the frequency is right, but the RX number is wrong.

The code is going by what the HPR and LNS tell it to do and log rx1 vs rx2 appropriately.. maybe @lthiery can help explain what the lower level code does here? I'm missing something

@lthiery
Copy link
Contributor

lthiery commented Jan 3, 2025

From a GWMP / Semtech-UDP perspective, I think we're just getting validation of RX2 window is being used. I think as @clavisound says

To me, it's only a grammar mistake, not an operational mistake.

That is to say, the message the LNS is sending to gateway-rs (is it a protobuf? I don't have the msg definition handy) is basically putting the RF characteristics of RX2 into the messages slot for RX1.

It's good that it "works", however, RX1 is usually more efficient for everyone involved if it can be leveraged. Is the LNS intentionally sending on RX2 only (and just shoving it in the RX1 definition in the message to gateway-rs) or is there RX1 being skipped by accident?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants