Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Unable to Update RPi OS -- Clocks not synchronised. (Witty Pi 4 Mini)

10 Posts
2 Users
0 Likes
1,594 Views
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

As I mentioned in one of my initial posts, I thought I would raise it again as an official issue that I seem to have.

 

I have tried everything in relation to synchronizing the clocks to the network, writing the RTC to the system, etc, etc, but nothing fixes this issue.

 

What is going, please???

 

Thx

 

JohnW

 
Posted : 07/10/2023 10:56 am
(@admin)
Posts: 479
Member Admin
 

This is a technical forum, so if you ask a question, the question should contain enough information for others to offer the help.

As mentioned in forum rules, it is recommended to put the product name in your topic title, so everyone knows what your topic is about. We discuss all UUGear products in this forum, not just one product.

Your topic should contain at least these information:

  • Which UUGear product is involved?
  • What do you want to achieve?
  • What have you tried?
  • What is the expected result?
  • What is the actual result you have got?

Besides these, pictures, screenshots, log information etc. will also be helpful for others to help you.

Statements like "it doesn't work" doesn't provide any useful information.

 
Posted : 09/10/2023 11:32 am
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

Sincere apologies.

 

The unit in question is the Witty Pi4 Mini and the latest issues relating to using this product appear to focus on regular updates of  RPi OS. on RPI Zero 2W

Using the desktop you get the facility to update the OS when the update icon appears on the top menu bar whenever the Pi4 Mini is connected to the RPI and the update icon appears when I select Update I always get the message that the system cannot update as the clocks are not synchronized?

However, if I use the command line sudo apt update and upgrade commands I can successfully upgrade the RPI OS.... and i can confirm that if the Pi4Mini is not connected I do not get the issue.

One other observation, if I look at the output of the UWI url after I start the upgrade via the command line, coincidentally the RTC and RPI clock values disappear, along with Temperature and volt readings.

Finally, after i reboot the system the update icon on the top menu bar does not reappear

 

Some other items  I have noted that may or may not be significant are (these are all related to using the uugear web interface(UWI)) :-

  1. When i first activate this URL i can never get the RTC and RPI clocks to synchronize, they are always different when the RTC is 2 sec in advance of the RPI clock.
  2. If i do nothing this difference sometimes is reduced to 1 sec..see attached image.
  3. Forcing the RTC clock to save to the RPI clock never appears to work on my system
  4. Forcing the RPI Clock to save to the RTC clock works sometimes see images
  5. Then for no reason the clocks go out or sync again.
  6. The attached images are of a short time sequence, please note that they are in sync briefly that's when i saved the RPi clock to the RTC clock.

 

 

 
Posted : 09/10/2023 12:41 pm
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

Apologies again could not initially attaching images

This post was modified 1 year ago by ejwmac
 
Posted : 09/10/2023 12:43 pm
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

I have inserted the images in a dropbox folder at the following link:-

https://www.dropbox.com/scl/fo/10qturwikrobypdvtn2w9/h?rlkey=0i0osmaqybk3db9o2wznyc53z&dl=0

thanks

 
Posted : 09/10/2023 12:51 pm
(@admin)
Posts: 479
Member Admin
 

@ejwmac The dropbox link you provided leads to a page with this error message:

Error (500)

Something went wrong. Don't worry, your files are still safe and the Dropbox team has been notified. Check out our Status Page to see if there is a known incident, our Help Center and forums for help, or head back to home.

I guess your image file was not configured to be viewed by others.

You should be able to attach the image file in your forum post. There are also many free image hosting websites that can temporarly host your images.

I still have not seen your images yet, below are what I can tell only from your decription.

The update icon you mentioned is part of Raspberry Pi OS and we have no knowledge of how it is implemented, and hence we can't tell what does it check before doing the update. Witty Pi's software doesn't load the RTC driver into the system, so the RTC on Witty Pi should not be directly visible by the system (Witty Pi's software can synchronize the RTC time with system time though). Most probably the message you have saw was saying the system time was not synchronized with the Internet time yet, and hence refuse to update.

UWI is actually a webserver running on your Pi and it interacts with Witty Pi's software and render the result on the web page. Although the webserver for UWI is very lightweight, sometimes you can still notice the lagging when running it on Raspberry Pi Zero W or even Raspberry Pi 2 Zero W.

When you request to synchronzie the time, Witty Pi's software takes RTC time via I2C interface, and write it into the system. The operation itself takes time, so it is possible the system time is a bit behind the RTC time. It is normal to see the system time has 1 second difference than the RTC time.

UWI uses javascript (in your web browser) to keep pulling data from the device, and sometimes the web requests may fail due to different reasons. As a result you don't see the correct data, or even see no data.

If you believe the RTC on your Witty Pi has rather big drift, you may calibrate it again. Here are some information about how to do it: https://github.com/uugear/Witty-Pi-4/issues/12 , however from your descripiton it is not likely to be an RTC drift issue.

 

 
Posted : 09/10/2023 6:24 pm
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

Hello,

 

I'm not having a good day on this ???

I will sort out the pics and let you know when it is sorted.

I could only see a link to add 1 image to the forum post and i have 4, so thats why i used DropBox.

 

thx

JohnW

 
Posted : 09/10/2023 6:41 pm
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

Lets try this link

 

https://www.dropbox.com/scl/fo/didlu6aqhlxeguesjfxzw/h?rlkey=c7nvkk59vbrj7rogu9c3bzlty&dl=0

 

 
Posted : 10/10/2023 12:07 pm
(@admin)
Posts: 479
Member Admin
 

The images you provided show 1~2 second difference between the system time and RTC time. This is not necessarily to be the actual difference between the system time and RTC time, because this data is taken via I2C interface and then sent via network. Running UWI on a faster Pi (for example 3B+), or accessing the device via wired network (instead of WiFi) may reduce this difference.

If you run the wittyPi.sh on your Pi, its prints the system time and RTC time with better result, and it is more stable because it is not affected by the network.

Third party tools will not complain for this time difference, because the RTC on Witty Pi is invisible to them, only Witty Pi's software communicates with that RTC.

 
Posted : 10/10/2023 5:05 pm
(@ejwmac)
Posts: 17
Eminent Member Customer
Topic starter
 

Posted by: @admin

 

The update icon you mentioned is part of Raspberry Pi OS and we have no knowledge of how it is implemented, and hence we can't tell what does it check before doing the update. Witty Pi's software doesn't load the RTC driver into the system, so the RTC on Witty Pi should not be directly visible by the system (Witty Pi's software can synchronize the RTC time with system time though). Most probably the message you have saw was saying the system time was not synchronized with the Internet time yet, and hence refuse to update.

Hello,

 

ref this issue of not being to upgrade.... as originally reported.

 

I have moved the whole project to an RPI 3B rev 1.3 system as i was not convinced that running on the newer RPi Zero2W was producing consistent results for me, and now is not the time to go into the detail of that. however back to this issue of updating, I fully understand and appreciate the logic behind your response as quoted here, however, this issue still persists in the new environment. 

So there is obviously an interaction between your code at some point causing this, and i can reconfirm that if you try to update the OS via the command line it appears to work OK, so whereas this may not be an issue causing the Pi 4 Mini to fail in its functionality there appears to be some ??? about how your solution is interacting with RPi OS.

As there are a lot of activities now in the area of updating from Bullseye to Bookworm on Raspberry, can I confirm that I am using Bullseye for this work?

 

One other piece of info that may or may not be of interest,  when I run service --status-all on the RPi I get the usual info except that for uwi and witty it comes back with ?  why is this....

 

Thanks

JohnW

 

 
Posted : 12/10/2023 1:22 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.