element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Synchronisation heure Raspberry
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 6 replies
  • Subscribers 676 subscribers
  • Views 956 views
  • Users 0 members are here
Related

Synchronisation heure Raspberry

Former Member
Former Member over 11 years ago

Bonjour,

 

Je sollicite votre aide pour répondre à une question dont je n'ai pas la réponse et qui me semble extrêmement bizarre.

 

Nous avons fais l'acquisition de plusieurs Raspberry Pi de type B il y a quelques mois.

 

Le problème est que la date du Raspberry ne se mets absolument pas à jour comme il se doit. Nous nous sommes rendu compte il y a quelques jours que le Raspberry avait 3 jours de retard

 

Nous avons donc contacté les services techniques de nos fournisseurs qui nous ont redirigé ici.

 

Je leur ai demandé si le Raspberry avait une pile comme tout pc normalement constitué, mais apparemment le Raspberry Pi n'a aucun BIOS.

 

Ceci dit, nous avons configuré l'heure correcte manuellement en ligne de commande puis rebooter le Raspberry, et là surprise, il ne conserve pas la date qu'on lui a fixé, il se remets avec 3 jours de retard.

 

Apparemment le Raspberry ne se synchronise pas avec le serveur NTP ...

 

Auriez-vous une idée concernant l'origine du problème ?

Et comment pourrait-on le résoudre ?

  • Sign in to reply
  • Cancel
  • rew
    0 rew over 11 years ago

    My French is insufficient to be writing it, I hope you'll be able to read my English...

     

    Indeed the raspberry pi does not have a battery, and therefore no "realtime clock". You could buy a battery-and-real-time-clock to solve your problem.

     

    On the other hand, during boot most raspberry pi's are configured to contact an NTP server for an immediate time-update, and then try to synchronize with the NTP server from then on. Do you have the ntp and ntpdate packages installed? Can you trace if there are any NTP packets going back and forth by using   tcpdump -ni eth0 port ntp ?

    (it would be great if you could do the trace on your router so that you can see what happens during boot!)

     

    Do you have the ntpd program running?

    raspberrypi:~> ps auxww |grep ntp
    ntp       2440  0.0  0.4   5512  1712 ?        Ss   Apr09   1:22 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104
    wolff    10367  0.0  0.1   3796   808 pts/0    S+   10:27   0:00 grep ntp
    raspberrypi:~>

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago in reply to rew

    I will write in English, i hope it will be easier for you image

     

    I have the ntpd program which is running

     

    raspberrypi:~> ps auxww |grep ntp

    ntp       2440  0.0  0.4   5512  1712 ?        Ss   Apr09   1:22 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104

    pi         10367  0.0  0.1   3796   808 pts/0    S+   10:27   0:00 grep ntp

    raspberrypi:~>

     

    When I configured an static ip address on my Raspberry and reboot, the date was synchronize.

     

    To my mind, it's a network issue because i was in DHCP mode and the Raspberry wasn't synchronize.

     

    What do you think about this ? Any ideas ?

     

    How can i see the logs of my ntp server ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 11 years ago in reply to Former Member

    Based on your description I would suspect your DHCP server is not providing all the correct parameters to the PI

     

    Specifically the DNS servers. Often consumer routers will default the DNS server to itself or the one supplied by the ISP (Visible on the WAN configuration page). There is nearly always an option on the router to configure a custom DNS server to override or augment the feature.

     

    Compare the static configuration your using to the properties provided by the DHCP server and you will probably see the difference.

     

    try adding the DNS server used in static configuration to the router DHCP properties and hopefully it will resolve your issue.

     

    The only other possibly I can think of though less lightly is the default gateway setting. you can view this is the same way as seeing the DNS information

    you may already know how to view the PI settings but this may help if not

     

    raspbian - Easiest way to show my IP address? - Raspberry Pi Stack Exchange

    Regards

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 11 years ago in reply to Former Member

    Ah!!! Now I remember!

     

    IIRC, there is a bug in raspbian.... The NTP synchronization might happen before DHCP is completed!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rbladd
    0 rbladd over 11 years ago

    I have found this to also happen.  If the Pi is rebooted the time is synced and the internet works.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 11 years ago

    I found this product on the Kubii's website :

     

    http://www.kubii.fr/ab-electronics/360-module-horloge-rtc-alarm-pi-temps-reel-3272496000964.html

     

    It seems the solution, but there is one problem : the price. It's very expensive to my mind, the same price as the Raspberry Pi ...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube