Skip to contentSkip to conversation

TSFT

DISCUSSION Simon Barber 5 participants 11 messages Nov 17, 2012 – Nov 21, 2012 7 messages not in the archive

lore
Share & tools
lore
#0 lore raw

This is the current definition of TSFT:

"Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames only."

My experience with TSFT is with Atheros cards, which record the timestamp at the end of the frame, not the start.

Do you know the behaivour of any particular capture systems re: TSFT - where do they timestamp the frame?

Furthermore for DSSS/CCK the definition above is reasonable, but for OFDM and HT (802.11n) the SIGNAL field (part of the PLCP header, not part of the MPDU) is part of the first data symbol. It would be much clearer to change the definition to state that the timestamp is at the start of this first SIGNAL/data symbol. Any objections to doing this, or preference to change the reference point to a different part of the frame?

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

Simon

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 8 lines · Simon Barber

This is the current definition of TSFT:

"Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames only."

My experience with TSFT is with Atheros cards, which record the timestamp at the end of the frame, not the start.

Interesting. Is it consistent across the whole Atheros product line?

Quoted 10 lines

Furthermore for DSSS/CCK the definition above is reasonable, but for OFDM and HT (802.11n) the SIGNAL field (part of the PLCP header, not part of the MPDU) is part of the first data symbol. It would be much clearer to change the definition to state that the timestamp is at the start of this first SIGNAL/data symbol. Any objections to doing this, or preference to change the reference point to a different part of the frame?

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

I think we need 1) a methodology for an author to identify their device's reference point so that they can calibrate their driver to the standard and/or 2) a radiotap datum that identifies the reference point in use or 3) something entirely different.

Dave

Signature · 2 lines
David Young
[email protected]    Urbana, IL    (217) 721-9981

A message that is not in the archive (sent off-list or not yet received): 20121117064848.GO21779-Gq8g4XVd89tWk0Htik3J/[email protected]

#4 lore raw
Quoted 11 lines · David Young
Quoted 8 lines · Simon Barber

This is the current definition of TSFT:

"Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames only."

My experience with TSFT is with Atheros cards, which record the timestamp at the end of the frame, not the start.

Interesting. Is it consistent across the whole Atheros product line?

Pretty much.

Quoted 8 lines
Quoted 8 lines

Furthermore for DSSS/CCK the definition above is reasonable, but for OFDM and HT (802.11n) the SIGNAL field (part of the PLCP header, not part of the MPDU) is part of the first data symbol. It would be much clearer to change the definition to state that the timestamp is at the start of this first SIGNAL/data symbol. Any objections to doing this, or preference to change the reference point to a different part of the frame?

Quoted 7 lines
Quoted 2 lines

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

I think we need 1) a methodology for an author to identify their device's reference point so that they can calibrate their driver to the standard and/or 2) a radiotap datum that identifies the reference point in use or 3) something entirely different.

FWIW, for the Atheros drivers we *just* added (1) to the Linux kernel, but for radiotap output we calculate the difference to the start of the frame, see here:

http://git.kernel.org/?p=linux/kernel/git/jberg/mac80211-next.git;a=commit;h=f4bda337bbb6e245e2a07f344990adeb6a70ff35

(the patches for the drivers are separate, but simply change the _START flag to _END)

I have no objections to (also) allowing this information to be in radiotap though, but I'm not sure we want to? Our (Intel's) device for example has the "on air rise" timestamp which is different again, so we could potentially end up with at least three different reference points? OTOH, I don't see more than these three making sense at all...

johannes

A message that is not in the archive (sent off-list or not yet received): 1353141950.9543.3.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org

#6 lore raw
Quoted 10 lines · Johannes Berg
Quoted 8 lines · David Young
Quoted 2 lines · Simon Barber

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

I think we need 1) a methodology for an author to identify their device's reference point so that they can calibrate their driver to the standard and/or 2) a radiotap datum that identifies the reference point in use or 3) something entirely different.

Quoted 8 lines

FWIW, for the Atheros drivers we *just* added (1) to the Linux kernel, but for radiotap output we calculate the difference to the start of the frame, see here:

http://git.kernel.org/?p=linux/kernel/git/jberg/mac80211-next.git;a=commit;h=f4bda337bbb6e245e2a07f344990adeb6a70ff35

(the patches for the drivers are separate, but simply change the _START flag to _END)

Adjusting the NIC's TSFT in this way, so that the radiotap reference point is according to spec, sounds right to me.

Quoted 2 lines

I have no objections to (also) allowing this information to be in radiotap though, but I'm not sure we want to?

Given that the adjustment is easy, I'm pretty sure we should not waste radiotap header space to describe the TSFT.

Wireshark doesn't already have more than two "interpretation modes" for radiotap headers, does it? That would be too bad. I realize that there may be already be a mode for a particular OS....

Dave

Signature · 2 lines
David Young
[email protected]    Urbana, IL    (217) 721-9981

A message that is not in the archive (sent off-list or not yet received): 20121117174600.GQ21779-Gq8g4XVd89tWk0Htik3J/[email protected]

#8 lore raw
Quoted 9 lines · David Young
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

Given that the adjustment is easy, I'm pretty sure we should not waste radiotap header space to describe the TSFT.

Wireshark doesn't already have more than two "interpretation modes" for radiotap headers, does it? That would be too bad. I realize that there may be already be a mode for a particular OS....

As I understood it, Simon is saying that he's adding one, but since he's using Linux, which will have the adjustment in a matter of days, it probably won't be necessary after all.

johannes

#9 lore raw
In reply to a message not in the archive
Quoted 3 lines · David Young

Wireshark doesn't already have more than two "interpretation modes" for radiotap headers, does it? That would be too bad. I realize that there may be already be a mode for a particular OS....

That's the only preference setting Wireshark's radiotap dissection code has.

The OS in question is OpenBSD, as per

http://www.radiotap.org/rejected-fields/FCS%20in%20header

OpenBSD's other collisions are 15 for hardware queue:

http://www.radiotap.org/suggested-fields/hardware%20queue

rather than TX flags:

http://www.radiotap.org/suggested-fields/TX%20flags

and RSSI:

http://www.radiotap.org/suggested-fields/RSSI

rather than RTS retries:

http://www.radiotap.org/suggested-fields/RTS%20retries

but the latter two are suggested fields rather than defined fields.

We could, I guess, define a "standard radiotap" link-layer type header value, and have dissectors that look at flags above 13 always handle those in the standard fashion and have programs that process radiotap headers in files either have a preference to control how to interpret the existing radiotap link-layer header type or just wire in one of the choices. I don't know whether that's worth the effort.

#10 lore raw
In reply to a message not in the archive

Hi Simon,

Quoted 8 lines · Simon Barber

This is the current definition of TSFT:

"Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames only."

My experience with TSFT is with Atheros cards, which record the timestamp at the end of the frame, not the start.

There is already a patch in mac80211-next which accounts for this and normalizes frame TSFT to beginning of frame.

Quoted 9 lines

Do you know the behaivour of any particular capture systems re: TSFT - where do they timestamp the frame?

Furthermore for DSSS/CCK the definition above is reasonable, but for OFDM and HT (802.11n) the SIGNAL field (part of the PLCP header, not part of the MPDU) is part of the first data symbol. It would be much clearer to change the definition to state that the timestamp is at the start of this first SIGNAL/data symbol. Any objections to doing this, or preference to change the reference point to a different part of the frame?

Keeping the TSFT at start of MPDU is cleaner from the user's point of view.

Quoted 2 lines

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

I'm not sure which patch you're referring to, but it seems cleaner to handle normalizing TSFT to a single reference in the kernel.

Thomas

#11 lore raw

Unfortunately this patch does not do a very accurate calculation, so it makes the problem worse. It simply multiplies rate by the number of bits to get a time. This does not take into account the limited accuracy in rate (11n has fractional rates), nor does it consider the rounding into blocks caused by FEC, or symbols. As a result the data is made worse by the current code. Either the code should do an accurate fix, or it should record the raw value and let the end user correct it properly.

Simon

Quoted 34 lines · Thomas Pedersen

Hi Simon,

Quoted 8 lines · Simon Barber

This is the current definition of TSFT:

"Value in microseconds of the MAC's 64-bit 802.11 Time Synchronization Function timer when the first bit of the MPDU arrived at the MAC. For received frames only."

My experience with TSFT is with Atheros cards, which record the timestamp at the end of the frame, not the start.

There is already a patch in mac80211-next which accounts for this and normalizes frame TSFT to beginning of frame.

Quoted 9 lines

Do you know the behaivour of any particular capture systems re: TSFT - where do they timestamp the frame?

Furthermore for DSSS/CCK the definition above is reasonable, but for OFDM and HT (802.11n) the SIGNAL field (part of the PLCP header, not part of the MPDU) is part of the first data symbol. It would be much clearer to change the definition to state that the timestamp is at the start of this first SIGNAL/data symbol. Any objections to doing this, or preference to change the reference point to a different part of the frame?

Keeping the TSFT at start of MPDU is cleaner from the user's point of view.

Quoted 2 lines

In my wireshark patch I've added options to interpret TSFT as the start of end of the frame.

I'm not sure which patch you're referring to, but it seems cleaner to handle normalizing TSFT to a single reference in the kernel.

Thomas

A message that is not in the archive (sent off-list or not yet received): [email protected]

#13 lore raw
Quoted 8 lines · Simon Barber

Unfortunately this patch does not do a very accurate calculation, so it makes the problem worse. It simply multiplies rate by the number of bits to get a time. This does not take into account the limited accuracy in rate (11n has fractional rates), nor does it consider the rounding into blocks caused by FEC, or symbols. As a result the data is made worse by the current code. Either the code should do an accurate fix, or it should record the raw value and let the end user correct it properly.

If we can, I'd say we should fix the calculations.

The question is how we define it when the first bit of the MPDU can be fractional in a symbol?

johannes

A message that is not in the archive (sent off-list or not yet received): 1353236845.9649.6.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org

#15 lore raw

One problem with fixing the calculations is that quite a lot of information is needed to do the calculation correctly. In Intel's case I don't know if Ness information is available, and this makes upto a 16us difference in the PLCP header length.

Calculating the start of the MPDU from the end accurately requires knowing the FEC scheme, the MCS, the guard interval, the bandwidth. Is the FEC scheme known, or are all current cards only supporting BCC?

Do you know if Intel supports extension spatial streams? If not the number is always 0. And FEC - is it always BCC?

Simon

Quoted 17 lines · Johannes Berg
Quoted 8 lines · Simon Barber

Unfortunately this patch does not do a very accurate calculation, so it makes the problem worse. It simply multiplies rate by the number of bits to get a time. This does not take into account the limited accuracy in rate (11n has fractional rates), nor does it consider the rounding into blocks caused by FEC, or symbols. As a result the data is made worse by the current code. Either the code should do an accurate fix, or it should record the raw value and let the end user correct it properly.

If we can, I'd say we should fix the calculations.

The question is how we define it when the first bit of the MPDU can be fractional in a symbol?

johannes

A message that is not in the archive (sent off-list or not yet received): [email protected]

#17 lore raw
Quoted 8 lines · Simon Barber

One problem with fixing the calculations is that quite a lot of information is needed to do the calculation correctly. In Intel's case I don't know if Ness information is available, and this makes upto a 16us difference in the PLCP header length.

Calculating the start of the MPDU from the end accurately requires knowing the FEC scheme, the MCS, the guard interval, the bandwidth. Is the FEC scheme known, or are all current cards only supporting BCC?

Good question, I don't really know.

Quoted 2 lines

Do you know if Intel supports extension spatial streams? If not the number is always 0. And FEC - is it always BCC?

I don't think our devices support extension spatial streams or anything but BCC.

Overall though, I think there's an argument to be made here for simply introducing a new radiotap timestamp field that gives the timestamp at the end of the frame? This could be defined better and would be more accurate.

I'm not sure I'd want to redefine the existing field in any way since there are probably a whole bunch of implementations out there that just stick whatever timestamp they have into the field, without regard for where it is in the frame, and without regard for aggregation.

johannes