LoRaWAN Application Layer Clock Synchronization

Hello! On lora-alliance.org I’ve found a description of LoRaWAN Application Layer Clock Synchronization. And, it seems to be what I need now. The question is: what should I set in Loraserver to start using it? Thank you for your time.

Stepan

If you can wait a bit, FUOTA (which also covers the app layer time sync) will be added soon to LoRa App Server.

If you can’t wait, then you can still implement this on your own using this library: https://godoc.org/github.com/brocaar/lorawan/applayer/clocksync.

2 Likes

Dear, Brocaar! You wrote me the 5 pf march, that “If you can wait a bit, FUOTA (which also covers the app layer time sync) will be added soon to LoRa App Server.” What about that service now? We need a time sync via app layer. Thank you for your time.

Stepan

I will continue the FUOTA work when the Basic Station packet-forwarder integration has been released as stable.

3 Likes

@Tagancev please see https://github.com/brocaar/lora-app-server/commit/a1ece80d40410964594db725733597691814593f :slight_smile:

3 Likes

@brocaar 3.1.0 lora-app-server version implements Clock Sync? I get following message after sending PackageVersionReq. AppTimeReq works fine. Device uses LoRaMac-node stack, my gateway is RAK2243 with newest packet forwarder, loraserver and lora-app-server

Device:

###### =====   UPLINK FRAME        3   ===== ######

CLASS       : A

TX PORT     : 202
TX DATA     : UNCONFIRMED
00 01 01

DATA RATE   : DR_3
U/L FREQ    : 867500000
TX POWER    : 0
CHANNEL MASK: 00FF

Gateway:

Jul 11 09:22:06 rak-gateway-dev-1 loraserver[548]: time="2019-07-11T09:22:06Z" level=error msg="finished client unary call" error="rpc error: code = Internal desc = handle clocksync command error: CID not implemented: PackageVersionReq" grpc.code=Internal grpc.method=HandleUplinkData grpc.service=as.ApplicationServerService grpc.time_ms=22.92 span.kind=client system=grpc
Jul 11 09:22:06 rak-gateway-dev-1 loraserver[548]: time="2019-07-11T09:22:06Z" level=error msg="publish uplink data to application-server error" error="rpc error: code = Internal desc = handle clocksync command error: CID not implemented: PackageVersionReq"

@brocaar , @kadw , greetings.
I’m struggling to implement the ‘AppTimeReq’ call to the app-server.
Device is STM32/SX1276 using STM32_CubeExpansion_LRWAN_V1.2.1.
Any clue on where to start?
All other functions (regular payload uplink/downlink) work fine.
Thank you in advance!

Can you provide logs from gateway? It is hard to tell what might go wrong. I’m using loramac-node stack and have no issues with AppTimeReq. You can take a look at their implementation