Thread: [Linuxptp-users] Linuxptp for Masterclock simulation
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: Kirchhoff, P. <phi...@si...> - 2021-12-08 08:05:41
|
Hi, I was wondering if it is possible with linuxptp to simulate a PTP masterclock on a PC. I realize that I can't achieve reasonable accuracy with it. It is only about the simulation of the protocol. Regards Philip |
|
From: Miroslav L. <mli...@re...> - 2021-12-08 08:53:13
|
On Wed, Dec 08, 2021 at 07:32:10AM +0000, Kirchhoff, Philip wrote: > Hi, > > I was wondering if it is possible with linuxptp to simulate a PTP masterclock on a PC. I realize that I can't achieve reasonable accuracy with it. It is only about the simulation of the protocol. There is a testsuite using simulations: https://github.com/mlichvar/linuxptp-testsuite Depending on what exactly you need to test, you could just modify one of the existing scripts. -- Miroslav Lichvar |
|
From: Richard C. <ric...@gm...> - 2021-12-08 15:06:10
|
On Wed, Dec 08, 2021 at 07:32:10AM +0000, Kirchhoff, Philip wrote: > Hi, > > I was wondering if it is possible with linuxptp to simulate a PTP masterclock on a PC. I realize that I can't achieve reasonable accuracy with it. It is only about the simulation of the protocol. Sure, you can run ptp4l over tun/tap interfaces, for example. Or maybe you can use Miroslav's awesome simulation environment: https://github.com/mlichvar/linuxptp-testsuite https://github.com/mlichvar/clknetsim HTH, Richard |
|
From: Kirchhoff, P. <phi...@si...> - 2021-12-09 09:24:09
|
I may have expressed myself in a misleading way. I do not want to simulate a clock network. I have an embedded device that should synchronize its time via PTP. Since I don't have a HW clock available, I want my PC (or maybe an RPI) to act as master clock and connect it to the device. The time source for the master clock should be the system time of my PC. ________________________________ From: Richard Cochran <ric...@gm...> Sent: Wednesday, December 8, 2021 4:06 PM To: Kirchhoff, Philip (SE GP T HG PE T 1 2) <phi...@si...> Cc: lin...@li... <lin...@li...> Subject: Re: [Linuxptp-users] Linuxptp for Masterclock simulation On Wed, Dec 08, 2021 at 07:32:10AM +0000, Kirchhoff, Philip wrote: > Hi, > > I was wondering if it is possible with linuxptp to simulate a PTP masterclock on a PC. I realize that I can't achieve reasonable accuracy with it. It is only about the simulation of the protocol. Sure, you can run ptp4l over tun/tap interfaces, for example. Or maybe you can use Miroslav's awesome simulation environment: https://deu01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmlichvar%2Flinuxptp-testsuite&data=04%7C01%7Cphilip.kirchhoff%40siemens-energy.com%7C4a6d1b835a524103fa1708d9ba5c427b%7C254ba93e1f6f48f390e6e2766664b477%7C1%7C0%7C637745727674174875%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=2cXVR8s5snY7RZjFg3m3ZNEAGptDsr55B8J0%2BlrbbOU%3D&reserved=0 https://deu01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmlichvar%2Fclknetsim&data=04%7C01%7Cphilip.kirchhoff%40siemens-energy.com%7C4a6d1b835a524103fa1708d9ba5c427b%7C254ba93e1f6f48f390e6e2766664b477%7C1%7C0%7C637745727674174875%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nqwqfAhen%2Bo9eFjOEdqc3qXOW18fn1bnoyIjxs37oNU%3D&reserved=0 HTH, Richard |
|
From: Richard C. <ric...@gm...> - 2021-12-09 21:20:01
|
On Thu, Dec 09, 2021 at 09:08:12AM +0000, Kirchhoff, Philip wrote: > I may have expressed myself in a misleading way. I do not want to simulate a clock network. > I have an embedded device that should synchronize its time via PTP. Since I don't have a HW clock available, I want my PC (or maybe an RPI) to act as master clock and connect it to the device. The time source for the master clock should be the system time of my PC. Yes, that works just fine. At the end of the day, there is nothing special about a GM. It need not be hooked to GPS or DCF77 or anything at all. HTH, Richard |
|
From: Kirchhoff, P. <phi...@si...> - 2021-12-10 13:06:47
|
Ok, but do I need to configure anything explicitly for this? How does the Lib know that it should act as GM. ________________________________ From: Richard Cochran <ric...@gm...> Sent: Thursday, December 9, 2021 10:19 PM To: Kirchhoff, Philip (SE GP T HG PE T 1 2) <phi...@si...> Cc: lin...@li... <lin...@li...> Subject: Re: [Linuxptp-users] Linuxptp for Masterclock simulation On Thu, Dec 09, 2021 at 09:08:12AM +0000, Kirchhoff, Philip wrote: > I may have expressed myself in a misleading way. I do not want to simulate a clock network. > I have an embedded device that should synchronize its time via PTP. Since I don't have a HW clock available, I want my PC (or maybe an RPI) to act as master clock and connect it to the device. The time source for the master clock should be the system time of my PC. Yes, that works just fine. At the end of the day, there is nothing special about a GM. It need not be hooked to GPS or DCF77 or anything at all. HTH, Richard |
|
From: Richard C. <ric...@gm...> - 2021-12-11 02:17:57
|
On Fri, Dec 10, 2021 at 12:51:10PM +0000, Kirchhoff, Philip wrote: > Ok, but do I need to configure anything explicitly for this? How does the Lib know that it should act as GM. You can run the DUT with --clientOnly (aka -s) Or you can bump the --priority1 or --priority2 on the GM. Thanks, Richard |