Error running timedatectl on Hummingboard

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

Error running timedatectl on Hummingboard

Postby crazystick » Fri Oct 24, 2014 4:10 pm

When I try to run timedatectl on a Hummingboard-i2eX I receive the error
$this->bbcode_second_pass_code('', 'Failed to query server: Invalid argument')

All the commands such as $this->bbcode_second_pass_code('', 'timedatectl set-ntp 1') seem to go OK, and the command works on the Cubox-i2eX

I don't see any errors in the log: this is the tail from running $this->bbcode_second_pass_code('', 'timedatectl status')
$this->bbcode_second_pass_code('', '
Oct 24 12:22:56 xxxxxxxx dbus[214]: [system] Activating via systemd: service name='org.freedesktop.timedate1' unit='dbus-org.freedesktop.timedate1.service'
Oct 24 12:22:56 xxxxxxxx systemd[1]: Starting Time & Date Service...
Oct 24 12:22:56 xxxxxxxx dbus[214]: [system] Successfully activated service 'org.freedesktop.timedate1'
Oct 24 12:22:56 xxxxxxxx systemd[1]: Started Time & Date Service.
')

I opened it as a bug on Github but it was closed-invalid almost immediately, so I'm assuming there is some other fix, I hope someone can help me out. Thanks.
crazystick
 
Posts: 23
Joined: Wed Jul 25, 2012 3:09 pm

Re: Error running timedatectl on Hummingboard

Postby pepedog » Fri Oct 24, 2014 4:41 pm

Sorry, I only have a hb i2ex so can't help, can't believe it works on one and not the other
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

[SOLVED] Re: Error running timedatectl on Hummingboard

Postby crazystick » Mon Oct 27, 2014 12:08 pm

$this->bbcode_second_pass_quote('pepedog', 'S')orry, I only have a hb i2ex so can't help, can't believe it works on one and not the other


I think I figured it out, I have the Hummingboard Pro carrier which includes the hardware RTC and I end up with /dev/rtc0 and /dev/rtc1 plus the symlink /dev/rtc -> /dev/rtc0

After linking /dev/rtc -> /dev/rtc1 timedatectl succeeds. The behaviour on the Hummingboard and the Cubox is different

Cubox-i - Both rtc0 and rtc1 work as hardware clocks

$this->bbcode_second_pass_code('', '
user@cubox ~ % sudo hwclock -r -f /dev/rtc0 --debug
hwclock from util-linux 2.25.1
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc0 does not have interrupt functions. Waiting in loop for time from /dev/rtc0 to change
...got clock tick
Time read from Hardware Clock: 2014/10/27 12:01:06
Hw clock time : 2014/10/27 12:01:06 = 1414411266 seconds since 1969
Mon Oct 27 12:01:06 2014 -0.843424 seconds
user@cubox ~ % sudo hwclock -r -f /dev/rtc1 --debug
hwclock from util-linux 2.25.1
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 1970/01/13 01:34:33
Hw clock time : 1970/01/13 01:34:33 = 1042473 seconds since 1969
Tue Jan 13 01:34:33 1970 -0.287867 seconds
')

Hummingboard - rtc0 does not function, rtc1 is a hardware clock

$this->bbcode_second_pass_code('', '
user@hummingboard ~ % sudo hwclock -r -f /dev/rtc0 --debug
hwclock from util-linux 2.25.1
Using the /dev interface to the clock.
Last drift adjustment done at 1414410754 seconds after 1969
Last calibration done at 1414410754 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc0 does not have interrupt functions. Waiting in loop for time from /dev/rtc0 to change
hwclock: ioctl(RTC_RD_TIME) to /dev/rtc0 to read the time failed: Invalid argument
...synchronization failed
74 user@hummingboard ~ % sudo hwclock -r -f /dev/rtc1 --debug
hwclock from util-linux 2.25.1
Using the /dev interface to the clock.
Last drift adjustment done at 1414410754 seconds after 1969
Last calibration done at 1414410754 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2014/10/27 12:00:53
Hw clock time : 2014/10/27 12:00:53 = 1414411253 seconds since 1969
Mon Oct 27 12:00:53 2014 -0.971156 seconds
')
crazystick
 
Posts: 23
Joined: Wed Jul 25, 2012 3:09 pm

Re: Error running timedatectl on Hummingboard

Postby crazystick » Mon Oct 27, 2014 2:07 pm

ok scratch that previous post. Turns out that the first rtc does in fact work, but it was in some kind of invalid state. I found this post that was able to reset the hardware clock https://www.mail-archive.com/smartphone ... 02020.html

Now rtc0 is working as expected.
crazystick
 
Posts: 23
Joined: Wed Jul 25, 2012 3:09 pm

Re: Error running timedatectl on Hummingboard

Postby pepedog » Mon Oct 27, 2014 3:36 pm

You have the rtc battery? Connects to tiny socket near USB
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Error running timedatectl on Hummingboard

Postby crazystick » Mon Oct 27, 2014 4:32 pm

Yes - bought one of ebay and was testing it today. Seems it powers the pcf8523 rtc0 and not the snvs rtc1 which is why my first 'fix' didn't in fact work at all :)
crazystick
 
Posts: 23
Joined: Wed Jul 25, 2012 3:09 pm


Return to ARMv7h

Who is online

Users browsing this forum: bamboo and 9 guests