Advanced search FAQ Register Login

It is currently Thu Feb 22, 2018 12:08 am

 

Postby raini » Tue Jan 23, 2018 9:37 am

Hello,
After I upgraded my Raspberry Pi3 to "raspberrypi 4.9.35-v7+ #1014" I noticed that many log-files started growing rapidly. The total diskspace is shrinking by 5 GB in 10 hours due the logs. The logfiles affected are:

/var/log/messges
/var/log/syslog
/var/log/kern

The majority by far is this kind of events:

Jan 23 09:26:26 raspberrypi kernel: [56861.489243] rtc-ds1307 1-0068: SET TIME!

The Raspberry is extended with an UPS Pico.

These appear in all three logfiles and the system produces 100 events per second, so for all three logfiles 300 events per seconds are generated. Also I see a huge list of the same events in dmesg.

Also it seems the the RTC is not working at all. The command "hwclock -r --debug" results in:

hwclock from util-linux 2.25.2
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.

Does anyone know how I can get rid of this? Obviously there is a problem with the RTC and these event are related to this. Any idea how to troubleshoot this? Can the update of the firmware resolve this? How can I read my current version of the UPS Pico?

Many thanks!

raini
n00b

Posts: 5

Joined: Mon Jan 22, 2018 5:47 pm

Postby Dave » Tue Jan 23, 2018 9:51 am

Firstly, have you setup the RTC correctly, by following these instructions? - https://github.com/modmypi/PiModules/wi ... rdware-rtc

You can download the pico_status.py script here - http://www.forum.pimodules.com/viewtopi ... =27&t=2765 - This will tell you which firmware version your PIco has.

Even if you are using the latest version of the firmware, re-flashing can sometiems resolve little bugs, so I would recommended doing this anyway.

Download the latest firmware here - http://www.forum.pimodules.com/viewtopi ... =25&t=4913 and follow these instructions on how to flash it - https://github.com/modmypi/PiModules/wi ... are-Update

PLEASE NOTE: There is an additional step needed:

After:

To stop it from starting again when rebooted:

Code: Select all

sudo systemctl disable serial-getty@ttyAMA0.service


You will need to edit the cmdline.txt file:

Code: Select all

sudo nano /boot/cmdline.txt


and remove the part that says:

Code: Select all

console=ttyAMA0, 115200

Dave
ModMyPi

User avatar

Posts: 2161

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support

Postby raini » Tue Jan 23, 2018 11:04 am

Many thanks for the quick reply!

So first I want to stop the logging and tried to carry out the last two steps. First I searched in "systemctl" for a service with the name "serial-getty@ttyAMA0.service" but there isn't any. So I cannot stop it.

Next I looked in "/boot/cmdline.txt" for "console=ttyAMA0, 115200" but couldn't find it neither. My "consoles" are only set to "console=serial0,115200 console=tty1".

As both are not part of the installation-steps, what should have created these?

I also saw that with the command "sudo i2cget -y 1 0x69 0x26" the result is an 0xff which probably indicates that there is no communication.

Also I checked all the installation-steps but they all seem conpleted. Is there a way to check the installations of the "PiModules Git"-package?

Thanks!

raini
n00b

Posts: 5

Joined: Mon Jan 22, 2018 5:47 pm

Postby Dave » Tue Jan 23, 2018 5:00 pm

Ah ok, in the cmdline.txt you'll need to remove the section that says:

Code: Select all

console=serial0,115200


This should free up the serial port for you to do a firmware upgrade.

Dave
ModMyPi

User avatar

Posts: 2161

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support

Postby raini » Mon Jan 29, 2018 5:42 pm

Okay, so I remove the line that said: "console=serial0,115200". So all that's left in the "cmdline.txt" is:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

But still, if I'm unlucky, it keeps generating these annoying log-events but if I'm lucky it does not. At some point I had the idea that I could control this with playing with the "serial-getty@ttyAMA0.service" but I'm not sure it is.

At this moment there is no creation of these logs, so I had the chance to do some tests:

In "dmesg" the last line after a reboot states:

i2c i2c-1: Failed to register i2c client ds1307 at 0x68 (-16)

When starting the "serial-getty@ttyAMA0.service" I see a new line in "demesg":

uart-pl011 3f201000.serial: no DMA platform data

With "sudo i2cdetect -y 1" I get this:

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 69 6a 6b 6c 6d 6e 6f
70: -- -- -- -- -- -- -- --

And with "python pico_status_hv3.0.py" I get this output:

***********************************
UPS PIco HV3.0A Status
***********************************

UPS PIco Firmware.....: ff
UPS PIco Bootloader...: ff
UPS PIco PCB Version..: ff
UPS PIco BAT Version..: ERROR
UPS PIco BAT Runtime..: TIMER DISABLED
UPS PIco r232 State...: ERROR

Powering Mode.........: ERROR
BAT Percentage........:
Traceback (most recent call last):
File "pico_status_hv3.0.py", line 194, in <module>
print " ","BAT Percentage........:",bat_percentage(),"%"
File "pico_status_hv3.0.py", line 88, in bat_percentage
datavolts = bat_level()
File "pico_status_hv3.0.py", line 82, in bat_level
data = i2c.read_word_data(0x69, 0x08)
IOError: [Errno 121] Remote I/O error

Also I disable Bluetooth by adding "raspberrypi 4.9.35-v7+ #1014" to "/boot/config.txt" and running "sudo systemctl disable hciuart", then rebooted.

No change!

So obviously there is no communication with the PICO and thus no way to run the upgrade, right?

Again, all started after the OS-upgrade to "raspberrypi 4.9.35-v7+ #1014".

raini
n00b

Posts: 5

Joined: Mon Jan 22, 2018 5:47 pm

Postby raini » Fri Feb 02, 2018 11:27 pm

Any idea?

Thanks!

raini
n00b

Posts: 5

Joined: Mon Jan 22, 2018 5:47 pm

Postby Dave » Tue Feb 06, 2018 9:55 am

Which version of the PIco do you have as it sounds like an issue that was identified with the old 1.1 version. The temporary fix is here (until new FW is released) - http://www.forum.pimodules.com/viewtopi ... t=20#p7343

Dave
ModMyPi

User avatar

Posts: 2161

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support

Postby raini » Tue Feb 06, 2018 6:59 pm

Finally everything works as it should. I guess that the enabled Bluetooth was the cause of the massive amount of log-events. Since this is disabled I never saw this occuring.

Also I reinstalled the entire system including Raspbian Stretch and followed the installation-steps of the Pico UPS. It still refused to communicate. So I followed the upgrade-steps that I must admit are not very clear but finally I succeeded.

Ever since I can use the command to obtain the version, the status-script does work and so is the RTC.

Conclusion, the update of Raspbian Jessie requires the update of the Pico-firmware.

Many thanks! Case closed.

raini
n00b

Posts: 5

Joined: Mon Jan 22, 2018 5:47 pm

Postby Dave » Wed Feb 07, 2018 9:18 am

Glad you are up and running!

We are looking at making the firmware process clearer and more simple. So hopefully the instructions will be updated soon to reflect this!

Dave
ModMyPi

User avatar

Posts: 2161

Joined: Wed Jul 22, 2015 11:36 am

Forum Administrator & Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

Board index

The teamDelete all board cookies • All times are UTC [ DST ]