Hi there Ivan, So my RTC was the problem, I fix it and now in my bash reads /rtc1 again and it is working fine.
To get my localtime working I did this root@beaglebone:~# ntpdate -b -s -u pool.ntp.org root@beaglebone:/etc# rm localtime root@beaglebone:/etc# ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime You can replace with your zone. But besides the correct timezone I don't think that localtime have something to do with the RTC. Here is my bash: echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device hwclock -s -f /dev/rtc1 hwclock -w and the service: [Unit] Description=DS1307 RTC Service [Service] Type=simple WorkingDirectory=/usr/share/rtc_ds1307 ExecStart=/bin/bash clock_init.sh SyslogIdentifier=rtc_ds1307 [Install] WantedBy=multi-user.target You enable the service? because if not when you restart he will not gonna start. Regards. On Thursday, July 31, 2014 2:58:32 PM UTC-3, ivan.de...@gmail.com wrote: > > Hi Fernando, > > Im having the same problem as you had after the update, but I'm using the > BBB Rev C under Debian, and it does not get the time from the RTC during > boot, but it does if I perform the commands (mentioned in the tutorial) > manually: > > hwclock -s -f /dev/rtc1 > hwclock -w > > So I'd like to ask you what did you do about the /etc/localtime to make it > work, or how does this impact the RTC ? > > Besides, I see in your bash script *clock_init.sh*, you are using: > > > 1. *echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device* > 2. *hwclock -s -f /dev/rtc0* > 3. *hwclock -w* > > > and as far as I know this is the BBB built-in RTC's path (not battery > backened) so I wonder how is this working on your BBB ? > > The Adafruit Tutorial is made for a RTC Battery Backened registered under > /dev/rtc1, as follows: > > echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device > hwclock -s -f /dev/rtc1 > hwclock -w > > Any suggestion, comment, idea is welcome > > Thanks > > Regards > > > On Monday, February 24, 2014 12:24:00 PM UTC-6, Fernando Derkoski wrote: >> >> Yeah noob here, My /etc/localtime was not correct. Now the whole thing >> work just fine. >> >> On Monday, February 24, 2014 1:45:18 PM UTC-3, Fernando Derkoski wrote: >>> >>> I tried *echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device* >>> >>> and now is working, sort of, because the time it is not being set on >>> restart. >>> here is my bash script: >>> >>> /usr/share/rtc_ds1307/clock_init.sh >>> >>> >>> 1. *echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device* >>> 2. *hwclock -s -f /dev/rtc0* >>> 3. *hwclock -w* >>> >>> >>> And here is my service: >>> >>> /lib/systemd/system/rtc-ds1307.service >>> >>> >>> 1. *[Unit]* >>> 2. *Description=DS1307 RTC Service* >>> 3. >>> 4. *[Service]* >>> 5. *Type=simple* >>> 6. *WorkingDirectory=/usr/share/rtc_ds1307* >>> 7. *ExecStart=/bin/bash clock_init.sh* >>> 8. *SyslogIdentifier=rtc_ds1307* >>> 9. >>> 10. *[Install]* >>> 11. *WantedBy=multi-user.target* >>> >>> >>> My service is running on the restart, but if I run >>> dmesg | grep ds1307 I get: >>> *[ 5.934660] rtc-ds1307: probe of 0-0068 failed with error -5* >>> *[ 5.970362] i2c i2c-0: new_device: Instantiated device ds1307 at >>> 0x68* >>> >>> >>> On Monday, February 24, 2014 9:58:23 AM UTC-3, Fernando Derkoski wrote: >>>> >>>> Hello, >>>> >>>> Before the upgrade I was testing the RTC and it was normal, but after I >>>> runned the okpg upgrade this happens: >>>> >>>> *root@beaglebone:~# i2cdetect -y -r 1* >>>> *] 0 1 2 3 4 5 6 7 8 9 a b c d e f* >>>> *00: -- -- -- -- -- -- -- -- -- -- -- -- --* >>>> *10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --* >>>> *20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --* >>>> *30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --* >>>> *40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --* >>>> *50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --* >>>> *60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --* >>>> *70: -- -- -- -- -- -- -- --* >>>> *root@beaglebone:~# echo ds1307 0x68 > >>>> /sys/class/i2c-adapter/i2c-1/new_device* >>>> *-sh: echo: write error: Invalid argument* >>>> *root@beaglebone:~#* >>>> >>>> I was doing this tutorial: >>>> >>>> http://learn.adafruit.com/adding-a-real-time-clock-to-beaglebone-black/set-rtc-time >>>> >>>> Anyone could help me? >>>> >>> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.