helium / miner

Miner for the helium blockchain
Apache License 2.0
607 stars 265 forks source link

sensor failed to join helium server - tmst is wrong #1153

Open Milesight-IoT opened 3 years ago

Milesight-IoT commented 3 years ago

The sensor failed to join the network server, we found the "tmst":-576459528470418 is wrong for the Join Accept feedback by helium network server.

The system time of the hotspot is correct, the miner's program release is '2021.10.29.0' Here are the full system packet fwd log

JSON up: {"rxpk":[{"jver":1,"tmst":393385559,"chan":0,"rfch":0,"freq":486.300000,"mid": 8,"stat":1,"modu":"LORA","datr":"SF10BW125","codr":"4/5","rssis":-59,"lsnr":10.2,"foff":149,"rssi":-59,"size":23,"data":"AAEAKgDAJOEkR4gjC2Ak4SRtlnSLNvU="}]}
data [00 01 00 2a 00 c0 24 e1 24 47 88 23 0b 60 24 e1 24 6d 96 74 8b 36 f5  ]
Message_Type = Join Request                                                                                                     
MHDR         = 00                                                                                                               
Major        = 00                                                                                                                
APPEUI       = 24e124c0002a0001                                                                                                 
DevEUI       = 24e124600b238847                                                                                                
 DevNonce     = 966d                                                                                                             
MIC          = 748b36f5                                                                                                         
INFO: [up] PUSH_ACK received in 0 ms                                                                                            
INFO: [down] PULL_RESP received  - token[252:70]

JSON down: {"txpk":{"codr":"4/5","data":"IJJSyaoQ8Nm/UjZwZLD5KGE=","datr":"SF10BW125","freq":506.70001220703125,"imme":false,"ipol":true,"modu":"LORA","powe":16,"rfch":0,"size":17,"tmst":-576459528470418}}
data [20 92 52 c9 aa 10 f0 d9 bf 52 36 70 64 b0 f9 28 61  ]                                                                     
Message_Type = Join Accept                                                                                                       
MHDR         = 20                                                                                                               
Major        = 00                                                                                                               
ERROR: Packet REJECTED (jit error=2)                                                                                                                                                                         
INFO: [down] PULL_RESP received  - token[55:181] 
madninja commented 3 years ago

Moving this to the router repo since it's a bug report there.

jdgemm commented 3 years ago

After discussing with team, actually miner issue.

jdgemm commented 3 years ago

@Milesight-IoT Thanks for raising, is this reproducible?

Milesight-IoT commented 3 years ago

@jdgemm Yes, it's reproducible 100% at my side, everytime, the tmst is an invalid value then the sensors failed to join.

Milesight-IoT commented 3 years ago

We have changed the miner program to test again, and found the issue. It's the bug of the latest miner version. in old version * 2021.09.26.0 permanent**, all work good.

The sensors can join and transmit the data successfuly. image