Go to advanced search

by Aydan
Tue Jul 09, 2019 4:09 pm
Forum: Troubleshooting
Topic: Right way to fsck/repair root partition
Replies: 5
Views: 121

Re: Right way to fsck/repair root partition

Sorry, touch /forcefsck is correct, not touch /fsck I misremembered. Seems that adding fsck.mode=force to cmdline seems to be preferred, although you'll have to remove that again, otherwise it will be done on every reboot. /forcefsck will trigger the check only once, but indeed it seems to no longer...
by Aydan
Tue Jul 09, 2019 2:46 pm
Forum: Troubleshooting
Topic: Right way to fsck/repair root partition
Replies: 5
Views: 121

Re: Right way to fsck/repair root partition

If a file named "fsck" is present in "/" then fsck will be run on boot before "/" is remounted read/write.
so

Code: Select all

sudo touch /fsck
and

Code: Select all

sudo reboot
should be enough.
by Aydan
Wed Jul 03, 2019 1:11 pm
Forum: General discussion
Topic: Auto run from rc.local not working when forked (&)
Replies: 1
Views: 81

Re: Auto run from rc.local not working when forked (&)

Running things at boot is better done with a systemd.service.
This automatically pipes the output of the program into the journal (or you can configure where it should go) and lets you monitor and control your service with "systemctl"

Regards
Aydan
by Aydan
Tue Jul 02, 2019 11:38 am
Forum: General discussion
Topic: Raspian Lite on Pi 4
Replies: 6
Views: 389

Re: Raspian Lite on Pi 4

Have a look at "tasksel"
It will allow you to add desktop environments (and other things) and many useful utilities get insstalles automatically.
by Aydan
Fri Jun 28, 2019 1:16 pm
Forum: General discussion
Topic: /boot not on FAT for RPi4
Replies: 9
Views: 712

Re: /boot not on FAT for RPi4

I'd prefer a move towards grub or u-boot booted from MBR, both can read a multitude of file systems.
by Aydan
Tue Jun 25, 2019 2:24 pm
Forum: General discussion
Topic: Users via ssh can't scan with Raspbian Buster anymore
Replies: 9
Views: 756

Re: Users via ssh can't scan with Raspbian Buster anymore

Please have a look at this: https://wiki.debian.org/SaneOverNetwork

I think this is the correct way to share a scanner via network.

Regards
Aydan
by Aydan
Thu Jun 13, 2019 1:44 pm
Forum: Python
Topic: How to print without newline
Replies: 6
Views: 403

Re: How to print without newline

Another way is to use a "\" before the linebreak like so:

Code: Select all

raise TypeError("The sentence should be of type str \
                                                  and not {}".format(type(sentence)))
by Aydan
Thu Jun 13, 2019 1:23 pm
Forum: Troubleshooting
Topic: Crontab issue with DBus
Replies: 2
Views: 124

Re: Crontab issue with DBus

The environment for things started with cron is quite different to the environment in your login shell. Also, to start services, use systemd service files , or if you want to go old school, sysv init scripts. Example #1 of the systemd.service docs should get you started. If you need delays, they can...
by Aydan
Fri May 24, 2019 2:58 pm
Forum: General discussion
Topic: How Hard would this be?
Replies: 6
Views: 345

Re: How Hard would this be?

A pi really is the wrong controller to use for this. An arduino would be the easier solution, if you want to go the controller route. Also you could make the relay control engine temperature dependent. As for doing this with a Pi, you'll probably boot the pi by activating the ignition. So you'll hav...
by Aydan
Thu May 16, 2019 5:38 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 488

Re: my service is not starting at power up

Figure out how it dies and catch the resulting exception.
by Aydan
Thu May 16, 2019 1:26 pm
Forum: General discussion
Topic: my service is not starting at power up [solved]
Replies: 16
Views: 488

Re: my service is not starting at power up

You should modify your script so it does not die if the service it depends on is not available. It should probably poll every few seconds for service availability and then do what it normally does. Also check that your script does not die when the other service is stopped during the script's runtime...
by Aydan
Wed May 08, 2019 12:21 pm
Forum: Troubleshooting
Topic: adafruit 16 channel servo driver will not let me make servo go limp
Replies: 9
Views: 276

Re: adafruit 16 channel servo driver will not let me make servo go limp

AFAIK an analog servo can never go limp, and a digital one probably won't once it received a valid position command. It either stays where it is, if it doesn't receive position updates, or it goes into a preprogrammed fail safe position. Looking at the normal use case for a servo, namely RC-Planes a...
by Aydan
Wed May 08, 2019 11:06 am
Forum: Linux Kernel
Topic: Problems with OTG Ethernet between two Pi zeros.
Replies: 3
Views: 1125

Re: Problems with OTG Ethernet between two Pi zeros.

That's the one I'm using
by Aydan
Wed May 08, 2019 9:51 am
Forum: Linux Kernel
Topic: Problems with OTG Ethernet between two Pi zeros.
Replies: 3
Views: 1125

Re: Problems with OTG Ethernet between two Pi zeros.

Is this problem limited to zeros as host or could this also happen with a Pi3 as host?
I'm in the process of setting up a pi cluster with a clusterHat on a Pi3B+ and (for now) three zeros and I'll keep my eyes open for this.

Regards
Aydan
by Aydan
Fri May 03, 2019 11:37 am
Forum: General discussion
Topic: Raspberry Pi3 B + USB Hub - HDD Issue
Replies: 7
Views: 397

Re: Raspberry Pi3 B + USB Hub - HDD Issue

My USB hub specs: 7 USB 3.0 ports with 12V & 2.5A power adapter. This reminded me of a problem I had sometime around 2012/13 with a 7-port hub The 7-port hub is not actually a 7-port hub, but two 4-port hubs where on is connected to a port of the other. My problem was that I could not connect a HDD...
by Aydan
Fri May 03, 2019 10:01 am
Forum: Python
Topic: Python + JSON, how to create a good log file for diagnostics
Replies: 5
Views: 268

Re: Python + JSON, how to create a good log file for diagnostics

So anywhere a print() appears in the code it would appear in journalctl? I don't need to adjust the systemd profile or anything? Yes, any output to stdout goes into the systemd journal, which can be read with journalctl. No need to set up anything in the systemd unit. It will also end up in syslog ...
by Aydan
Thu May 02, 2019 2:26 pm
Forum: Python
Topic: Python + JSON, how to create a good log file for diagnostics
Replies: 5
Views: 268

Re: Python + JSON, how to create a good log file for diagnostics

Do you run this as a systemd service? If so, just add print() wherever (e.g. for each loop run).
You can read the logs via journalctl.
Your write to the log file should open the file with mode "a", not "w". Mode "w" will truncate the file each time.

Regards
Aydan
by Aydan
Thu May 02, 2019 7:27 am
Forum: Troubleshooting
Topic: Pi0 Hanging after a while using I2C. (But Pi2/3 Okay)
Replies: 2
Views: 157

Re: Pi0 Hanging after a while using I2C. (But Pi2/3 Okay)

What actually happend was that your code was leaking file descriptors. For future reference: Close a file descriptor if you don't need it anymore. Edit: Regarding the different resource limits: AFAIK some are calculated based on available RAM, and since the zero has 512MB and the 2/3 has 1GB they wi...
by Aydan
Tue Apr 30, 2019 11:22 am
Forum: Python
Topic: Python3 Code on Pi3 won't run on Zero
Replies: 3
Views: 328

Re: Python3 Code on Pi3 won't run on Zero

... when I try to run it on a Raspberry Zero, it freezes up for at least an hour and then returns a "Memory Error." ... This tells me the zero is swapping itself to death until the (default 100MB) swap is full and the task is killed. What I would suggest is to disable swap, so the zero doesn't hang...
by Aydan
Mon Apr 29, 2019 2:08 pm
Forum: Troubleshooting
Topic: Open Office Libre Elect
Replies: 7
Views: 280

Re: Open Office Libre Elect

I've had this problem as well (on a PC), and you need to install "libreoffice-gnome" so libreoffice can access gvfs mounts.

Regards
Aydan
by Aydan
Fri Apr 12, 2019 2:00 pm
Forum: Troubleshooting
Topic: Signficant Latency in Ethernet communication using MQTT
Replies: 2
Views: 152

Re: Signficant Latency in Ethernet communication using MQTT

I'd start with tcpdump-ing the MQTT port on the Mosquitto server and checking the delay between the incoming and outgoing messages.

Regards
Hendrik
by Aydan
Wed Apr 10, 2019 1:49 pm
Forum: Advanced users
Topic: Detecting USB activity.
Replies: 12
Views: 1211

Re: Detecting USB activity.

Just thinking out loud here: If you use a partition/loop-file mounted via fuse passthrough and then mout a file inside this file system with g_mass_storage you should be able to implement a callback in the fuse passthrough module for any read/write access from the g_mass_storage module. No need to m...
by Aydan
Thu Feb 14, 2019 1:09 pm
Forum: Advanced users
Topic: Busting for Buster? Try it today!
Replies: 10
Views: 4125

Re: Busting for Buster? Try it today!

- CONFIG_INPUT_EVDEV=y Building evdev statically into the kernel instead of as module would have the advantage that you have working keyboard and mouse in X, even if modules fail to load. E.g. when updates go wrong, and you end up in a situation in which you do have a newer kernel, but not the matc...
by Aydan
Wed Feb 13, 2019 2:08 pm
Forum: Python
Topic: keep TCP socket server running?
Replies: 5
Views: 527

Re: keep TCP socket server running?

@rolgordijn:

once a socket has been closed, youcan't reopen it.
So move these three lines into the while loop and you should be good:

Code: Select all

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
Regards
Aydan

Go to advanced search