[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-28 Thread Greg
Look at the link in /dev/rtc:

ls -al | grep rtc

If you got it to point at /dev/rtc1, I would very much like to know how you 
accomplished that!

On Friday, July 28, 2017 at 10:09:19 AM UTC-4, William B wrote:
>
> Greg, it's okay. I was able to make the RTC be recognized as rtc1 in the 
> system. Just turned off the BBB, disconnected everything that was connected 
> to the hardware and starts again. I'm sure the RTC module was properly 
> connected to the BBB, so I believe that there could only be some 
> configuration conflict going on.
>
> Thank you!
>
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/68e625e5-4c56-409a-b330-497e62547cef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-28 Thread Greg
Only /dev/rtc0 is going to be updated automatically.  /dev/rtc1 is not 
going to be updated automatically, as far as I can determine, with the 
Debian distributions as published.
You would have to use the config tools to switch from rtc0 to rtc1 and 
compile a new kernel.

So the common scheme you will find, for example, at the Adafruit site uses 
a script which is run by systemd to set the system time from /dev/rtc1.
This will happen soon after boot, but I am not precisely sure when.

An important point is that "system time" is what matters.  That is what you 
will see with the date command.

So the common scripts use the hwclock command with option --rtc /dev/rtc1 
(this is same as -f option) to set the system time.
So you have to assume /dev/rtc1 has been set accurately.

The best way to set the /dev/rtc1 is to use the hwclock -w /dev/rtc1 
command with the device connected to the internet and accurate NTP time 
being in force.
This command writes the system time to the RTC.  So if the system time is 
correct, the RTC time will be correct.  This is like setting any clock. 
 Thanks to the RTC having a battery, it will maintain time with Beagleboard 
power going off.
This can also be done manually at the command line if you don't have an 
internet connection (but you have another accurate time source).

So basically the common scripts floating around out there overwrite the 
system time which was set automatically with the time provided by the RTC 
/dev/rtc1.

Note that there is a compensation system for the RTC which is also included 
in the system.  I'm still working out the details on how to understand and 
manage what it is doing.  What I am doing for now is periodically rebooting 
my BBGW with it connected to the internet + NTP.  The compensation scheme 
is working, but the system time is running a little bit fast.

Greg

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3ecc7c60-d153-44ee-a593-7e0f50146268%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-28 Thread William B
Greg, it's okay. I was able to make the RTC be recognized as rtc1 in the 
system. Just turned off the BBB, disconnected everything that was connected 
to the hardware and starts again. I'm sure the RTC module was properly 
connected to the BBB, so I believe that there could only be some 
configuration conflict going on.

Thank you!



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/bfb502e5-4ed0-4153-8685-c8bdf06ccaca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-28 Thread William B
Greg,
I'd just like to prevent the RTC from being updated with the system date 
and time so that I can even use a script to do this task when I need to.
How do I prevent the RTC from being updated automatically?


Command response "timedatectl"

root@beaglebone:~# timedatectl
  Local time: Fri 2017-07-28 09:59:52 -03
  Universal time: Fri 2017-07-28 12:59:52 UTC
RTC time: Sat 2016-05-21 22:38:04
   Time zone: America/Sao_Paulo (-03, -0300)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/aa019f88-d142-4f87-bfd3-8bb4f96f7261%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-28 Thread Greg
There is lots of stuff going on, and it is messy.  Check out this link:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=785445

I tried the configuration via udev, but as reported in the above link, it 
doesn't work.

Apparently the only way to get the /dev/rtc link to point to rtc1 instead 
of rtc0 is to change the kernel configuration and compile it that way.
I found the configuration setting, but I was too lazy to change it and 
compile a new kernel.  My systemd service seems to be good enough.
And that brings up another point.  Another system getting into the RTC act 
is systemd.  Try this command:

timedatectl

Greg

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/4b73e1c8-744a-4b23-84aa-2633e6fda0ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William B
Actually what is happening is this: when I remove the power from the BBB, 
the date and time return to the default setting. Because the RTC is 
automatically associated with system time auto-tuning, then its time is 
also being changed incorrectly (I had not noticed this in reboot because it 
is necessary to remove the power).

How do I prevent the system from automatically correcting the RTC? How do I 
remove this connection from the RTC with the system?
I intend to create a script to set date and time.




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/20544dc3-3ce0-4ff7-82d8-9afcdb1c8e0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
Well, rtc0 is most likely the on AM335x on die real time clock, which will
not persist time across reboots.

On Thu, Jul 27, 2017 at 7:54 PM, William B  wrote:

> Finally I got ... the last hint from William Hermans indicated me
> something about the device name, which could be "rtcX", which made me
> execute: "ls -la /dev/rtc*":
>
> root@beaglebone:~# ls -la /dev/rtc*
> lrwxrwxrwx 1 root root  4 May 21  2016 /dev/rtc -> rtc0
> crw--- 1 root root 254, 0 May 21  2016 /dev/rtc0
>
> 1) Replace "rtc1" with "rtc0" in the commands and everything works! (the
> system date and time were already correct):
>
> hwclock -w -f /dev/rtc0
>
> 2) To test if it worked and if the date and time were actually adjusted, I
> changed the system time, restarted the BBB and disconnected it from the
> internet to ensure the date and time would not be auto-tuned. After
> restarting it, I checked if the system time was still wrong and then read
> the RTC time (which must be correct!).
>
> hwclock -r -f /dev/rtc0
>
> It works!!! RTC date and time were correct.
>
> I don't even know how to thank everyone for their help. It should be
> simple to solve this problem, but it takes a lot of time, especially for
> those who don't have experience like me.
>
> Thank you very much!
>
>
>
>
> --
> 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.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beagleboard/9c2b0a36-e70d-4fec-a904-6a0f6b5e0a49%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrnv9o8x6kTfvKJpXCkQNQOUNKz3eN2Cf9syXOibW3%2B9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
William,

Also to save you from future grief. Make sure you load the proper drivers
for your hardware,then if you're going to write your own software to read
from the RTC. Use /dev/rtcx( probably /dev/rtc1 ), and do not try to read
directly from the RTC over I2C. Trust me . . .

On Thu, Jul 27, 2017 at 4:46 PM, William Hermans  wrote:

>
>
> On Thu, Jul 27, 2017 at 4:24 PM, William B  wrote:
>
>> Is there any other difference in this latest version of Debian? I'm
>> following a tutorial below, but the command "hwclock -r -f /dev/rtc1" is
>> indicating failure to communicate with the new device:
>>
>> *TUTORIAL*:
>> https://learn.adafruit.com/adding-a-real-time-clock-to-beagl
>> ebone-black/set-rtc-time
>>
>> *ERROR*:
>> root@beaglebone:~# hwclock -r -f /dev/rtc1
>> hwclock: Cannot access the Hardware Clock via any known method.
>>
>> *DEVICES*:
>> root@beaglebone:/# ls -la /sys/bus/i2c/devices
>> total 0
>> drwxr-xr-x 2 root root 0 Jul 27 20:19 .
>> drwxr-xr-x 4 root root 0 Jul 27 20:19 ..
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0024 ->
>> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0034 ->
>> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0034
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0050 ->
>> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0070 ->
>> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0070
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0054 ->
>> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0054
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0055 ->
>> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0055
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0056 ->
>> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0056
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0057 ->
>> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0057
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-0 ->
>> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-1 ->
>> ../../../devices/platform/ocp/4802a000.i2c/i2c-1
>> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-2 ->
>> ../../../devices/platform/ocp/4819c000.i2c/i2c-2
>>
>>
> You have to write to the RTC before you can read from it. Something that
> guide confuses . . . So actually the first steps you need to take is like
> this:
> root@wgd:~# apt-get install ntpdate
> root@wgd:~# ntpdate pool.ntp.org
> 27 Jul 16:39:29 ntpdate[1903]: adjust time server 199.223.248.101 offset
> 0.004123 sec
>
> Then if it's important to be on the right timezone . . .
> ( optional )
> root@wgd:~# dpkg-reconfigure tzdata
>
> Current default time zone: 'America/Phoenix'
> Local time is now:  Thu Jul 27 16:40:54 MST 2017.
> Universal Time is now:  Thu Jul 27 23:40:54 UTC 2017.
>
> Then you can write to the RTC:
> root@wgd:~# hwclock -w -f /dev/rtc1
>
> So what all this does is update the system time, configures the timezone,
> so that system time can be written to the real time clock. You could in
> fact just write to the real time clock without doing all the above. But the
> RTC will not be accurate.
>
> Now we should be able to read from the RTC.
> root@wgd:~# hwclock -r -f /dev/rtc1
> Thu Jul 27 16:45:41 2017  -0.646341 seconds
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORo8JLJgagSzrgN7bZi1xswr8%3DOTOr%2BqxABp4Y8BcjjswQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
On Thu, Jul 27, 2017 at 4:24 PM, William B  wrote:

> Is there any other difference in this latest version of Debian? I'm
> following a tutorial below, but the command "hwclock -r -f /dev/rtc1" is
> indicating failure to communicate with the new device:
>
> *TUTORIAL*:
> https://learn.adafruit.com/adding-a-real-time-clock-to-
> beaglebone-black/set-rtc-time
>
> *ERROR*:
> root@beaglebone:~# hwclock -r -f /dev/rtc1
> hwclock: Cannot access the Hardware Clock via any known method.
>
> *DEVICES*:
> root@beaglebone:/# ls -la /sys/bus/i2c/devices
> total 0
> drwxr-xr-x 2 root root 0 Jul 27 20:19 .
> drwxr-xr-x 4 root root 0 Jul 27 20:19 ..
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0024 ->
> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0034 ->
> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0034
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0050 ->
> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0070 ->
> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0070
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0054 ->
> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0054
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0055 ->
> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0055
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0056 ->
> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0056
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0057 ->
> ../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0057
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-0 ->
> ../../../devices/platform/ocp/44e0b000.i2c/i2c-0
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-1 ->
> ../../../devices/platform/ocp/4802a000.i2c/i2c-1
> lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-2 ->
> ../../../devices/platform/ocp/4819c000.i2c/i2c-2
>
>
You have to write to the RTC before you can read from it. Something that
guide confuses . . . So actually the first steps you need to take is like
this:
root@wgd:~# apt-get install ntpdate
root@wgd:~# ntpdate pool.ntp.org
27 Jul 16:39:29 ntpdate[1903]: adjust time server 199.223.248.101 offset
0.004123 sec

Then if it's important to be on the right timezone . . .
( optional )
root@wgd:~# dpkg-reconfigure tzdata

Current default time zone: 'America/Phoenix'
Local time is now:  Thu Jul 27 16:40:54 MST 2017.
Universal Time is now:  Thu Jul 27 23:40:54 UTC 2017.

Then you can write to the RTC:
root@wgd:~# hwclock -w -f /dev/rtc1

So what all this does is update the system time, configures the timezone,
so that system time can be written to the real time clock. You could in
fact just write to the real time clock without doing all the above. But the
RTC will not be accurate.

Now we should be able to read from the RTC.
root@wgd:~# hwclock -r -f /dev/rtc1
Thu Jul 27 16:45:41 2017  -0.646341 seconds

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrR4sni%2BWPaRymd8POvkfkdJwwwgS0FZy9Z7zPuPLjzTw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William B
Is there any other difference in this latest version of Debian? I'm 
following a tutorial below, but the command "hwclock -r -f /dev/rtc1" is 
indicating failure to communicate with the new device:

*TUTORIAL*:
https://learn.adafruit.com/adding-a-real-time-clock-to-beaglebone-black/set-rtc-time

*ERROR*:
root@beaglebone:~# hwclock -r -f /dev/rtc1
hwclock: Cannot access the Hardware Clock via any known method.

*DEVICES*:
root@beaglebone:/# ls -la /sys/bus/i2c/devices
total 0
drwxr-xr-x 2 root root 0 Jul 27 20:19 .
drwxr-xr-x 4 root root 0 Jul 27 20:19 ..
lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0024 -> 
../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024
lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0034 -> 
../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0034
lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0050 -> 
../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050
lrwxrwxrwx 1 root root 0 Jul 27 20:19 0-0070 -> 
../../../devices/platform/ocp/44e0b000.i2c/i2c-0/0-0070
lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0054 -> 
../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0054
lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0055 -> 
../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0055
lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0056 -> 
../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0056
lrwxrwxrwx 1 root root 0 Jul 27 20:19 2-0057 -> 
../../../devices/platform/ocp/4819c000.i2c/i2c-2/2-0057
lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-0 -> 
../../../devices/platform/ocp/44e0b000.i2c/i2c-0
lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-1 -> 
../../../devices/platform/ocp/4802a000.i2c/i2c-1
lrwxrwxrwx 1 root root 0 Jul 27 20:19 i2c-2 -> 
../../../devices/platform/ocp/4819c000.i2c/i2c-2

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/02f0803f-23ce-4f6a-985c-daadcd9f7d2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
On Thu, Jul 27, 2017 at 3:02 PM, William B  wrote:

> *Grahan:*
> You're 100% correct. Running "i2cdetect -y -r 2" instead of "1" at the
> end, it detected the RTC at address 0x68, as we can see in the available
> tutorials.
> Answering your question, I'm using the latest available Debian release
> (bone-debian-8.8-iot-armhf-2017-07-01-4gb.img) available here:
> https://rcn-ee.net/rootfs/bb.org/testing/2017-07-01/iot/
>
> *William Hermans: *
> When I run the command "i2cdetect -l", I get this information:
>
> root@beaglebone:~# i2cdetect -l
> i2c-0   i2c OMAP I2C adapterI2C adapter
> i2c-1   i2c OMAP I2C adapterI2C adapter
> i2c-2   i2c OMAP I2C adapterI2C adapter
>
>
> Now I can continue with the process normally and as soon as it works I
> report here.
>
> Thank you again!!!
>

Sounds about right . ..
root@wgd:~# cat /sys/bus/i2c/devices/2-0068/name
ds3232

Funny, I'm actually using an i2c RTC, forgot, and confused the temp sensor
I'm using over one wire. By the way, the DS3232 is also an accurate RTC,
but it does cost like $8.xx per. So not exactly cheap.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORppVeu1WzRMfO2g4Uw_XXq3OGPizrhuNO8Pwk%3DfvguOgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William B
*Grahan:*
You're 100% correct. Running "i2cdetect -y -r 2" instead of "1" at the end, 
it detected the RTC at address 0x68, as we can see in the available 
tutorials.
Answering your question, I'm using the latest available Debian release 
(bone-debian-8.8-iot-armhf-2017-07-01-4gb.img) available here:
https://rcn-ee.net/rootfs/bb.org/testing/2017-07-01/iot/

*William Hermans: *
When I run the command "i2cdetect -l", I get this information:

root@beaglebone:~# i2cdetect -l
i2c-0   i2c OMAP I2C adapterI2C adapter
i2c-1   i2c OMAP I2C adapterI2C adapter
i2c-2   i2c OMAP I2C adapterI2C adapter


Now I can continue with the process normally and as soon as it works I 
report here.

Thank you again!!!




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3ac8db97-2938-433e-992b-2422278bb1c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
It's not so much the debian version, as it is the kernel. kernel 3.8.x is
different from kernel 4.x. The easiest way to see what is attached it this:
root@wgd:~# i2cdetect -l
i2c-0   i2c OMAP I2C adapterI2C adapter
i2c-1   i2c OMAP I2C adapterI2C adapter
i2c-2   i2c OMAP I2C adapterI2C adapter

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORrD516bSiRBEroWhgdzPs3NiWRYZKo4%3DELKtKPCHeJ3-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread Graham
What version of Debian are you running.

On Debian 8, what was in the docs as I2C-1 is now I2C-2.

Hook your translator to pins P9-19 and P9-20 and run "i2cdetect -y -r 2"

I2C-2 is enabled in the device tree by default.

--- Graham

==

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/b6342b82-8238-4745-9b70-924d8edc4d0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William Hermans
On Thu, Jul 27, 2017 at 1:24 PM, William B  wrote:

> Hi!
> I bought the I2C logic converter 3.3V => 5v and I've connected the RTC to
> the BBB, but running "i2cdetect -y -r 1" doesn't find the RTC device. I've
> checked the wiring of the connections and I repeated the process a few
> times, but it doesn't detect the RTC.
>
> Any suggestion?
>

#1 You're sure you're connected to I2C-1 ?
#2 Did you load the device tree to get I2C-1 active ? It's not enabled by
default.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORozg7BMqWW3yETxvMFhvWWHoOqrGN1DRrr5cTF%3DCZnhyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-27 Thread William B
Hi! 
I bought the I2C logic converter 3.3V => 5v and I've connected the RTC to 
the BBB, but running "i2cdetect -y -r 1" doesn't find the RTC device. I've 
checked the wiring of the connections and I repeated the process a few 
times, but it doesn't detect the RTC.

Any suggestion?




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/8020d029-3445-4a93-acf7-de2bfc84e67d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-26 Thread Greg
Here is what I used:

https://www.seeedstudio.com/Grove-High-Precision-RTC-p-2741.html

I'm using the Greens so it conveniently plugs in to the Grove connector. 
 The lithium coin cell was not available at the local stores and I had to 
order via Amazon.
This device uses 3.3V battery and it is plug-n-play with regards to the 
hardware.  The Beagleboard distributions include a driver for it.

In addition to confusion with logic voltages, the Linux ecosystem for RTCs 
is pretty confusing as well.  The man pages have outdated or insufficient 
information.
It was possible to get the RTC to work without touching the Device Tree.

I've got the RTC to work and it is timing my irrigation control system 
reasonably well.  I'm still not confident with what I am doing with the 
hwclock command.
I've documented what I did in the PDF file page 26:

https://github.com/Greg-R/irrigate-control/tree/master/doc/latex

Good luck with the RTC and please share you results here!

Regards,
Greg


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/95bd10e9-2888-4a21-baa0-d2df2536cc8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: RTC's SDA and SCL Resistors

2017-07-26 Thread William B
John, I get it. But I do not know how it would be possible to do this in my 
DS1307 module which is of this type:
http://www.ebay.com/itm/5-PCS-I2C-RTC-DS1307-AT24C32-Real-Time-Clock-Module-For-AVR-ARM-PIC-/172308340060?epid=846722400=item281e609d5c:g:VxcAAOSwawpXsn0J


How would It connect to 3.3V hardware instead of 5V?

Thank you again!





-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/2b99797f-afbb-4408-a47d-3efcbf10b0d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.