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

PPS counter and INST counter are very different #112

Open
Wvirgil123 opened this issue Aug 16, 2023 · 0 comments
Open

PPS counter and INST counter are very different #112

Wvirgil123 opened this issue Aug 16, 2023 · 0 comments

Comments

@Wvirgil123
Copy link

Wvirgil123 commented Aug 16, 2023

j = lgw_cnt2utc(local_ref, p->count_us, &pkt_utc_time);

In this line, converting CNT to UTC is calculated by local_ref, local_ref and time_reference_gps equal. But ref is derived from PPS counter, and the values of PPS counter and INST COUNTER are already well over 1s。

SX1302 counter (INST): 4208287192
SX1302 counter (PPS): 718559044

So the 'time' calculated in JSON Up is wrong

JSON up: {"rxpk":[{"jver":1,"tmst":4210558634,"time":"2023-08-16T10:37:34.999590Z","tmms":1376217472999,"chan":0,"rfch":0,"freq":903.900000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","rssis":-105,"lsnr":8.5,"foff":-196,"rssi":-105,"size":22,"data":"QKQIAEiAZ3QCz+548az544fTLvtZCA=="}]}

question:
Is this PPS counter abnormality a problem with the SX1302 chip?

Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ##### 2023-08-16 09:39:24 UTC #####
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### [UPSTREAM] ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # RF packets received by concentrator: 3
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # CRC_OK: 100.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # RF packets forwarded: 3 (105 bytes)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # PUSH_DATA datagrams sent: 4 (1140 bytes)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # PUSH_DATA acknowledged: 100.00%
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### [DOWNSTREAM] ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # PULL_DATA sent: 6 (100.00% acknowledged)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # RF packets sent to concentrator: 0 (0 bytes)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # TX errors: 0
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### SX1302 Status ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # SX1302 counter (INST): 4208287192
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # SX1302 counter (PPS):  718559044
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # BEACON queued: 0
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # BEACON sent so far: 0
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # BEACON rejected: 0
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### [JIT] ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: src/jitqueue.c:434:jit_print_queue(): INFO: [jit] queue is empty
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: #--------
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: src/jitqueue.c:434:jit_print_queue(): INFO: [jit] queue is empty
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### [GPS] ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # Valid time reference (age: 2 sec)
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: # GPS coordinates: latitude 12.57700, longitude 113.92225, altitude 97 m
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ### Concentrator temperature: 34 C ###
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: ##### END #####
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: {"state":1,"temperature":"34.1","rx_sum":3,"report_time":1692178764,"tx_sum":0}
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]:
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: JSON up: {"stat":{"time":"2023-08-16 09:39:24 UTC","lati":22.57700,"long":113.92225,"alti":97,"rxnb":3,"rxok":3,"rxfw":3,"ackr":100.0,"dwnb":0,"txnb":0,"temp":34}}
Wed Aug 16 09:39:24 2023 daemon.info lora_pkt_fwd[3435]: INFO: [up] PUSH_ACK received in 228 ms
Wed Aug 16 09:39:25 2023 daemon.info lora_pkt_fwd[3435]: INFO: [down] PULL_ACK received in 230 ms
Wed Aug 16 09:39:26 2023 daemon.info lora_pkt_fwd[3435]:
Wed Aug 16 09:39:26 2023 daemon.info lora_pkt_fwd[3435]: INFO: Received pkt from mote: 480008A4 (fcnt=29799)
Wed Aug 16 09:39:26 2023 daemon.info lora_pkt_fwd[3435]:
Wed Aug 16 09:39:26 2023 daemon.info lora_pkt_fwd[3435]: JSON up: {"rxpk":[{"jver":1,"tmst":4210558634,"time":"2023-08-16T10:37:34.999590Z","tmms":1376217472999,"chan":0,"rfch":0,"freq":903.900000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","rssis":-105,"lsnr":8.5,"foff":-196,"rssi":-105,"size":22,"data":"QKQIAEiAZ3QCz+548az544fTLvtZCA=="}]}

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

1 participant