TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: MARKUS ROBERT KESSLER
date: 2019-06-22 20:48:00
subject: Re: Zero-WH, strange SD c

Am Sat, 22 Jun 2019 12:20:59 +0100 schrieb druck:

> On 22/06/2019 09:56, Markus Robert Kessler wrote:
>> - I switched to crontab-based reboots because the same machine (RPi
>> Zero Wifi) is used for taking photos on demand. Therefore I ssh into it
>> and start a script which accesses a USB webcam via fswebcam and
>> transfers the photos to a webserver.
>> This works fine, but from time to time fswebcam suddenly is no longer
>> able to get data from the webcam for some reason. In this case even a
>> "USB reset" does not work. So the machine has to be rebooted anyway.
>
> This suggests to me that the webcam may be very close to the maximum
> current available from the Zero's USB port. If it has been currently
> limited the voltage will drop and many devices will no longer respond
> until the power is cycled. A USB deivce drawing too much current may
> also cause the WiFi to drop out on the Pi.
>
> The solution would be to either attach the webcam through an externally
> powered USB hub, or replace it with a Raspberrp Pi camera, which are
> lower power.
>
>> B.t.w., I already tried to put the line "fsck -p /dev/mmcblk0p1" into /
>> etc/rc.local to reset file system's "dirty bit" to prevent it from
>> demanding for a filesystem check. This seems to have no effect.
>
> A fsck will be performed on system startup, long before anything in
> /etc/rc.local gets run. I know you can force an fsck on boot using
> /boot/cmdline.txt but I don't think you can prevent one.
>
>> So, RPi or the OS, seems to make changes to the filesystem / MBR or
>> what else, which cannot be recovered by RPi itself, but a "normal"
>> Linux machine can handle this without even alerting about any trouble.
>
> If this is happening the card needs to be replaced. If it wasn't a Zero
> I'd suggest booting from a USB stick for better reliability, but as an
> SD card is the only option, a high endurance version is probably
> worthwhile.
>
> ---druck

Hi druck,

what you describe above (connecting the camera directly to the RPi) was
what I did first, but that was indeed not so stable. Hence, very soon I
switched to using an active-powered USB hub which feeds camera and RPi.

It may sound strange, but for me it seems that the higher the resolution
of the connected webcam, the more problems this will cause to RPi /
Raspian / fswebcam.

In the beginning, I tried to reset the USB bus -- with no success. Then I
added commands to my script to rmmod and insmod / modprobe the relevant
USB-to-video kernel drivers -- that worked often, but sometimes the whole
machine crashed (!). That was the point when I involved watchdog mechanism
also to get the machine back again in such a case.

So, meanwhile I prefer to wait at least 10..15 seconds after taking of a
photo fails, until repeating it, and if this will not lead to success,
then I run a reboot.

To the Micro SD cards: I tried several different ones in size and
manufacturer, but alway the same. Except Kingston -- these cards just die
under load, but then things are clear at least...

B.t.w., resetting the "dirty flag" is done during startup, in the hope,
that this state may last until the machine crashes or the watchdog runs a
hardware reset. But, it's likely that the flag will be set (again) prior
to some crash, anyway?

Well, what I intend to try next is, what nev young recommends -- on most
of my raspberries Bluetooth is really not needed at all.
So, I'll switch the driver off and see.

Best regards,

Markus

--
Please reply to group only.
For private email please use http://www.dipl-ing-kessler.de/email.htm

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.