Skip to contentSkip to conversation

Precise time synchronization via wifi interface (intel AX201 iwlwifi driver)

DISCUSSION Wei Liu 2 participants 3 messages Mar 5, 2020

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

Hi,

I am trying to achieve precise time synchronization via wifi interface.

I used intel AX201 card, certified with TimeSync, 802.11v, mc. So I assume it has the capability to do hardware time stamp when running applications like linux ptp (http://linuxptp.sourceforge.net/) and gptp (https://github.com/Avnu/gptp). However I get error that seems to suggest the timestamp mode is not supported.

After reading some source code, I discover that the /ptp4l/ application, or /gptp/, or /ethtool/ /-T/ , they all use a system call /ioctl/, which uses ethtool_ops call back to determine whether the hardware can do software/hardware timestamp.

However when searching in the driver/net/wireless/iwlwifi directory, I don't see anywhere /ethtool_ops/ is being implemented in the driver. So this most likely is why all user space tools I tried seem to determine the card cannot do hardware and also software (driver level) transmit timestamp.

Can someone tell me how I could run ptp like application to fully make use of the Timesync feature of intel card?

Some more details below:

root@localhost:/debug/tracing# ethtool -i wlp2s0
driver: iwlwifi
version: 5.4.6-050406-generic
firmware-version: 48.4fa0041f.0
expansion-rom-version:
bus-info: 0000:02:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
root@localhost:/debug/tracing# ethtool -T wlp2s0
Time stamping parameters for wlp2s0:
Capabilities:
        software-receive      (SOF_TIMESTAMPING_RX_SOFTWARE)
        software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none
#1 lore raw
Quoted 4 lines · Wei Liu

Hi,

I am trying to achieve precise time synchronization via wifi interface.

Erm, good luck with that? :)

You do realise that there's a whole bunch of stuff going on below the driver level (listen-before-send, etc) that makes 'precise' timing (as in microsecond-accuracy like ptp)... shall we just say challenging?

-Toke

author
#2 lore raw

Hi Toke,

Yes, it is challenging, but IEEE802.1AS already takes consideration of IEEE802.11 MAC. So I count on the standardization to take care of the challenge :)

Point being that the Intel AX201 card claims Timesync feature (https://www.mouser.com/pdfDocs/wi-fi-6-ax201-module-brief.pdf), which is based on IEEE802.1AS. So there must be some way to run gptp like application on the AX201 intel card.

I appreciate any help here if someone has relevant experiences.

Best,

Wei

Quoted 14 lines · Toke Høiland-Jørgensen
Quoted 4 lines · Wei Liu

Hi,

I am trying to achieve precise time synchronization via wifi interface.

Erm, good luck with that? :)

You do realise that there's a whole bunch of stuff going on below the driver level (listen-before-send, etc) that makes 'precise' timing (as in microsecond-accuracy like ptp)... shall we just say challenging?

-Toke