# SX1303 fine timestamping

**URL:** <https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029>\
**Category:** Raspberry Pi Gateways\
**Tags:** gateways\
**Created:** [January 18, 2023, 4:47pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029 "2023-01-18T16:47:11Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![megawine](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/megawine/32/35697_2.png) [@megawine](https://www.thethingsnetwork.org/forum/u/megawine)\
**Post date:** [January 18, 2023, 4:47pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/1 "2023-01-18T16:47:11Z")

</div>

Hello everyone,

I have enabled the optional feature for fine time stamping (‘ftime’) in rxpk on the gateway. I am not able to understand what does the ftime counter actually represents.

It says on hal documentation that it is number of nanoseconds since last PPS [0…999999999].  
But the values received is observed to increase with time upto 999999999 and then start over. Should the ftime more or less same, since it counts the nanoseconds past the last PPS pulse ?.., which by nature happens every second.

If there is any reference or ideas available to understand it then please do share.

Many Thanks !

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [January 18, 2023, 5:01pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/2 "2023-01-18T17:01:21Z")

</div>

Sounds entirely like expected behaviour?!

> [@megawine](#):
>
> not able to understand what does the ftime counter actually represents

erm…

> [@megawine](#):
>
> that it is number of nanoseconds since last PPS

QED!

> [@megawine](#):
>
> the values received is observed to increase with time upto 999999999 and then start over

Sounds like a 1 second count to me and if anything different would not be PPS = Pulse Per Second right?!  
Each GPS PPS input resets the counter to zero, which then steadily counts up to 999…999 nano seconds at which point next pulse arrives and resets the counter to zero, which then steadily… I’m sure I see a pattern here! 😉 Not rocket science even though it uses a Satellite (or 3) 🙂

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [January 18, 2023, 5:04pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/3 "2023-01-18T17:04:38Z")

</div>

I’m not sure that’s the question you were thinking of asking.

If you mean, how do I use fine time-stamping to enable the ToF for location services, the short answer is buy a gateway that supports it - I’m not aware of any Pi based ones that do - budget for £/$/€1,000+

If that’s not the answer to the question you were thinking of, then telling us a whole heap more detail would be appropriate.

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [January 18, 2023, 5:06pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/4 "2023-01-18T17:06:57Z")

</div>

🤔 and possibly also then take a Semtech licence to the secret sauce… 😉 to get required features enabled…

---

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan_scheepers/32/48536_2.png) [@Johan\_Scheepers](https://www.thethingsnetwork.org/forum/u/Johan_Scheepers)\
**Post date:** [January 18, 2023, 5:17pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/5 "2023-01-18T17:17:10Z")

</div>

> [@megawine](#):
>
> fine time stamping (‘ftime’)

What are you wanting the achieve with this? What are your end goal?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [January 18, 2023, 5:19pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/6 "2023-01-18T17:19:40Z")

</div>

> [@descartes](#):
>
> I’m not aware of any Pi based ones that do - budget for £/$/€1,000+

Perhaps there is an assumption, that with the existing hardware, all you need to do is enable fine time stamping and it will work ?

I do recall an instance where Borroz(?) posted some logs of packets received by 3 Gateways that were in the same room. According to the so called timestamps the nodes were many thousands of miles appart.

---

<div class="post-metadata">

**Author:** ![megawine](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/megawine/32/35697_2.png) [@megawine](https://www.thethingsnetwork.org/forum/u/megawine)\
**Post date:** [January 18, 2023, 5:24pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/7 "2023-01-18T17:24:10Z")

</div>

> [@Jeff-UK](#):
>
> Each GPS PPS input resets the counter to zero, which then steadily counts up to 999…999 nano seconds at which point next pulse arrives and resets the counter to zero, which then steadily… I’m sure I see a pattern here!

Thank you ! I think I understood the statement in the documentation now.  
I think ftime means that it timestamps the rxpk on the gateway, with the time value past the last PPS.  
🙂 Silly doubt from my side.

Thank you !

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [January 18, 2023, 5:25pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/8 "2023-01-18T17:25:43Z")

</div>

Yep also recall that - but that was with Sx1301 types and classic timestamping vs fine/location enabling systems IIRC… still funny at the tme mind 🙂

---

<div class="post-metadata">

**Author:** ![megawine](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/megawine/32/35697_2.png) [@megawine](https://www.thethingsnetwork.org/forum/u/megawine)\
**Post date:** [January 18, 2023, 5:27pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/9 "2023-01-18T17:27:03Z")

</div>

> [@descartes](#):
>
> buy a gateway that supports it - I’m not aware of any Pi based ones that do

If this helps, there is [Waveshare SX1303 raspberry Pi hat](https://www.waveshare.com/sx1302-868m-lorawan-gateway-b.htm) available to implement fime timestamping.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [January 18, 2023, 6:16pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/10 "2023-01-18T18:16:40Z")

</div>

Oooooo, good spot. I’d not want to knock WaveShare but I think that’s just a rebadged Seeed SenseCap which strangely Seeed don’t sell standalone. And as much as I love both Seeed and WaveShare for the value kit, I’d not expect much help with getting TDOA turned on & working.

The main reason is they have the resources to pick up batches of a chipset at a good price (or off the back of a passing HGV) and put them on a PCB at a good price as they have lots of young helpers on subsistence wages. But just because the chipset supports something doesn’t mean they’ve made it work with that feature.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [January 18, 2023, 6:48pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/11 "2023-01-18T18:48:06Z")

</div>

So what is the current situation for using fine timestamping etc for Geolocation on TTN ?

A GPS is needed on the Gateway, and suitable hardware, to provide the accurate time sync needed, but does the TTN backend support the feature, assuming there are enough Gateways in an area that can provide the fine timestamping ?

---

<div class="post-metadata">

**Author:** ![Jeff-UK](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/jeff-uk/32/35697_2.png) [@Jeff-UK](https://www.thethingsnetwork.org/forum/u/Jeff-UK)\
**Post date:** [January 18, 2023, 7:22pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/12 "2023-01-18T19:22:21Z")

</div>

> [@descartes](#):
>
> I think that’s just a rebadged Seeed SenseCap

Believe otherway around 🤔 - think Seeed take Concentrator from WS to build (some) GW’s. WS had earlier 1302 bd IIRC that, like many such card builders, were guided quickly from 1302 to 1303 during the ‘recent’ supply chain issues - might as well as same/similar price, adds lower SF support and also then the fine TS capability plus works with 1250 so no brainer. Think Tony Smith in Oz saw similar move/rational…there were forum posts on this - maybe a year back? Longer? I loose track with pandemic time distortion field! 🙂

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [January 18, 2023, 8:56pm UTC](https://www.thethingsnetwork.org/forum/t/sx1303-fine-timestamping/61029/13 "2023-01-18T20:56:22Z")

</div>

I too lose track, as the Dragino boards seem pretty similar too.

I’d still wonder about support, but as you get fine timestamping for free, at worst you’ve got a gateway.

Simpler to put a buzzer on the device & send a downlink - someone will let you know eventually where it is.
