Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Jul 2018
    Posts
    20

    piCorePlayer and NTP updates

    Hi,

    I just installed 5.0.0 on my RPi3+HifiBerry AMP2+. Works great. I noticed that NTP is already installed (it wasn't with v.4.1.0). How do I change the server? I tried setting it to my local server in /etc/sysconfig/ntpserver but it keeps setting itself to the original line after reboot. Any tips?

    Thanks

  2. #2
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,513
    The tc way is to put it on the kernel command line.

    ntpserver=xxx.xxx.xxx.xxx

    We do have a web page to let you set it.....in the extras | bootcodes page........ it is beta functionality.....
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #3
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    1,415
    Quote Originally Posted by paul- View Post
    The tc way is to put it on the kernel command line.

    ntpserver=xxx.xxx.xxx.xxx

    We do have a web page to let you set it.....in the extras | bootcodes page........ it is beta functionality.....
    Has always worked for me OK

    Would be nice to get the NTP server from DHCP though !

    Jeff
    Players: SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
    Server: LMS Version: Latest Nightly on Centos 8.0 VM on ESXi 6.5.0U3 on Dell T320
    Plugins: AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player Groups
    Remotes: iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
    Music: 522GB,1.5K albums with 25K songs by 5K artists mostly FLACs

    Want a webapp ? See http://forums.slimdevices.com/showth...Webapp-for-LMS

  4. #4
    Senior Member M-H's Avatar
    Join Date
    Oct 2016
    Posts
    154
    Quote Originally Posted by Jeff07971 View Post
    Would be nice to get the NTP server from DHCP though !Jeff
    Indeed DHCP would be nice, if you have a NTP server on your LAN, why use the WAN link.
    The next best thing would be a DNS name f.i. pool.ntp.org , numbers need to much maintenance.
    But I am not sure what is possible. Looks like something fun to investigate.

    Regards M-H
    Pi based multi-room audio system powered by PiCorePlayer(s):
    Pi3B with Phat-dac in a Rasptouch, 2 pi B+ with Cirrus Logic Audio Card, Pi Zero with Phat-beat , and a few other tests...

  5. #5
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,513
    Quote Originally Posted by Jeff07971 View Post

    Would be nice to get the NTP server from DHCP though !

    Jeff
    Most home routers aren't going to pass that information, however if you run something that does......here is the busybox documentation

    https://git.busybox.net/busybox/tree...d04e17316f479a

    You can edit the file: /usr/share/udhcpc/default.script, and add a section to the script to deal with ntp server.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  6. #6
    Senior Member M-H's Avatar
    Join Date
    Oct 2016
    Posts
    154
    Thanks Paul,
    :-) I started with the NTPD version in busybox, to see whether it is a continues-time-updater or a one-time-copy program.
    But it seems the busybox implementation is quite mature, and does sync against a set of NTP servers, including detection for leaps like caused by hibernation.
    So using a fixed DNS name for an NTP pool is a good starting point, and might not need any tinkering for most users.
    If we detect the region of internet connection, we could even optimize for counties etc, or leave it for a tweak entry.
    Overruling with DHCP details that might be available in some LAN's , seems technically more accurate but unnecessary for PCP ( imho )

    So I wil see I can test it with my DHCP and NTP server..... next year !

    Regards , M-H
    Pi based multi-room audio system powered by PiCorePlayer(s):
    Pi3B with Phat-dac in a Rasptouch, 2 pi B+ with Cirrus Logic Audio Card, Pi Zero with Phat-beat , and a few other tests...

  7. #7
    Junior Member
    Join Date
    Jul 2018
    Posts
    20
    Quote Originally Posted by paul- View Post
    The tc way is to put it on the kernel command line.

    ntpserver=xxx.xxx.xxx.xxx

    We do have a web page to let you set it.....in the extras | bootcodes page........ it is beta functionality.....
    Hi Paul,

    so I assume you mean Beta -> Tweaks -> User Commands? This is where I set the "ntpserver=192.168.1.1" command where the IP is that of my router that is dishing out NTP service. I rebooted, ssh to the tc user and ran "date" to get the time. Well, its still, very annoyingly, stating 1970 as the date.

    Of course, if I run
    Code:
    cat /etc/sysconfig/ntpserver
    i still get pool.ntp.org, which not what I want. I have restricted all ntp traffic on my network to run through the router so all traffic on port 123 is blocked if it tries to go to the internet. I need to tell piCorePlayer to interrogate 192.168.1.1 for time.

    The option you describe seems to not work at boot time. If I change the setting in the ntpserver file, it will revert back to the default pool.ntp.org. Any other suggestion?

    Thanks

  8. #8
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,513
    No the kernel command line. Goto Extras | Bootcodes.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #9
    Junior Member
    Join Date
    Jul 2018
    Posts
    20
    Quote Originally Posted by paul- View Post
    No the kernel command line. Goto Extras | Bootcodes.
    Yes, that worked thank you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •