Menu ▾ ▴

#288 PTP error on WSL and iPerf on Windows

1.0
accepted
None
2023-12-15
2023-12-14
Amogh
No

I wanted to test iPerf on Windows clients for wireless and wired machine with Windows as well. I tried installing PTP on Windows System linux on Win 11 client for wired so the goal is to have PTP Server and PTP client on WSL and iPerf can be on base Windows OS (else on WSL as well.) This will help to do a wired to wireless cleint tests (with major devices being Windows based in the field)

For installing WSL, used this command on Windows 11 laptop command prompt:
wsl --install

//This command displays the WSL version. I preferred WSL version 1 instead of 2 to have same IP for Windows 11 OS and the mounted Linux. By default, the WSL will have Ubuntu unless distribution is specified.
C:\Users\EP_02>wsl --status
Default Distribution: Ubuntu
Default Version: 1

//Used these commands for the chanign WSL 2 to WSL 1
wsl --set-version <distribution name=""> <versionnumber>
wsl --set-default-version <version></version></versionnumber></distribution>

My Windows machine had only 1x ethernet adapter and same was shows in ifconfig in WSL

Once Ubuntu is installed, you may login as root. The default folder will be /
root@<desktop_name>/mnt/c/Users/EP_02#</desktop_name>

Once the environment was setup, installed the ptpd package and edited the config file to behave as a PTP grandmaster. However, PTP was initiated and kept on seeing these messages in  the PTP log file:

2023-12-13 18:41:15.985845 ptpd2[72].startup (info)      (___)   Info:    Now running as a daemon

2023-12-13 18:41:15.986850 ptpd2[72].startup (info) () Successfully acquired lock on /var/run/ptpd2.lock
2023-12-13 18:41:15.987069 ptpd2[72].startup (notice) (
) PTPDv2 started successfully on eth0 using "masteronly" preset (PID 72)
2023-12-13 18:41:15.987147 ptpd2[72].startup (info) (___) TimingService.PTP0: PTP service init
2023-12-13 18:41:15.991693 ptpd2[72].eth0 (error) (init) failed to call SO_BINDTODEVICE on the interface (strerror: Protocol not available)
2023-12-13 18:41:15.991822 ptpd2[72].eth0 (error) (init) Failed to initialize network
2023-12-13 18:41:16.001418 ptpd2[72].eth0 (error) (flt) PTPd init failed - will retry in 10 seconds
2023-12-13 18:41:25.991228 ptpd2[72].eth0 (notice) (init) TimingService.PTP0: elected best TimingService
2023-12-13 18:41:25.991348 ptpd2[72].eth0 (info) (init) TimingService.PTP0: acquired clock control
2023-12-13 18:41:25.991387 ptpd2[72].eth0 (error) (init) Could not read adjtimex flags: Function not implemented (strerror: Function not implemented)
2023-12-13 18:41:26.378593 ptpd2[72].eth0 (error) (init) failed to call SO_BINDTODEVICE on the interface (strerror: Protocol not available)
2023-12-13 18:41:26.378758 ptpd2[72].eth0 (error) (init) Failed to initialize network
2023-12-13 18:41:26.378807 ptpd2[72].eth0 (error) (flt) PTPd init failed - will retry in 10 seconds
2023-12-13 18:41:26.991682 ptpd2[72].eth0 (error) (init) Could not read adjtimex flags: Function not implemented (strerror: Function not implemented)
2023-12-13 18:41:27.992233 ptpd2[72].eth0 (error) (init) Could not read adjtimex flags: Function not implemented

"failed to call SO_BINDTODEVICE on the interface      (strerror: Protocol not available)"
"(init) Could not read adjtimex flags: Function not implemented      (strerror: Function not implemented)"

PTP status file shows PTP state as FAULTY:

Even tried compiling PTP in Ubuntu WSL

Discussion

  • Robert McMahon

    Robert McMahon - 2023-12-15
    • status: open --> accepted
     
  • Robert McMahon

    Robert McMahon - 2023-12-15

    Thanks for this. I'll try to get to it soon. Please feel to ping me every so often so it doesn't get lost in my todo list.

     

Log in to post a comment.