Go to advanced search

by knute
Mon Oct 14, 2019 2:24 pm
Forum: Java
Topic: Having trouble with .Jar files
Replies: 2
Views: 254

Re: Having trouble with .Jar files

Assuming it is a Java program in that .jar file you are trying to run, the easiest thing it to start it from the command line: java -jar nameOfYourJarFile.jar If you want to run it by double clicking on its icon in File Manager: Open the File Manager, right click on the file you want to run, AnalogC...
by knute
Sat Oct 12, 2019 7:22 pm
Forum: General discussion
Topic: "Realtime" audio output using RPi?
Replies: 4
Views: 389

Re: "Realtime" audio output using RPi?

Java has a very simple sound API that works just fine on a Pi. As to the 0-5ms latency I don't know. I think that would be affected by the USB sound card's buffering. In any case that is a really short time, even 1 cycle of 800hz tone takes 1.25ms. What are you using the sound for?
by knute
Wed Oct 09, 2019 2:22 am
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

I never enable ufw until after I allow ssh.

The ufw default is to drop inbounds that are not specifically allowed and to allow outbounds. I don't think you gain anything by rejecting all the inbound as it is really nice to be able to ping the server.
by knute
Mon Oct 07, 2019 8:13 pm
Forum: Troubleshooting
Topic: Raspberry Pi 3B+ Unable to sync to correct time
Replies: 17
Views: 368

Re: Raspberry Pi 3B+ Unable to sync to correct time

It looks like a DNS problem. The output from timedatectl shows not synced. No return from the google.com ping. All symptoms of DNS not working correctly. You might post the last 15 or so lines of /etc/dhcpcd.conf if you are using a static IP. If you are using dhcp then: cat /var/run/dnsmasq/resolv.c...
by knute
Sun Oct 06, 2019 9:04 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

I don't know how you are getting to your remote Pi but I would be very careful with using the ufw rules from above. If you are getting to your Pi via remote ssh you will be locked out forever using those commands. If that is not the case then kindly disregard my note.
by knute
Sat Oct 05, 2019 9:59 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

In the <HEAD> part of the HTML put <meta http-equiv="refresh" content="60"> to get a 60 second reload. If you don't like the flash that will occur with an image there is a more sophisticated method that uses some JavaScript. Take a look at my website, http://knutejohnson.com/pi, there are a couple o...
by knute
Fri Oct 04, 2019 9:35 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 338

Re: Need 5V for my fan, pins covered by RTC?

Did you solder that to the board?
by knute
Tue Oct 01, 2019 9:23 pm
Forum: Other projects
Topic: Need 5V for my fan, pins covered by RTC?
Replies: 4
Views: 338

Need 5V for my fan, pins covered by RTC?

I've got a Pi4 in a case with a fan and a RTC that covers pins 1-6. The fan needs 5V. Is there another pin or place to get 5V on the board? What about the POE pins? I thought as a last resort I could use one of the USB ports for power but that uses up a USB that could be used for something more inte...
by knute
Tue Oct 01, 2019 8:34 pm
Forum: Troubleshooting
Topic: Unable to write a .service file to systemd for auto-booting python programs
Replies: 6
Views: 141

Re: Unable to write a .service file to systemd for auto-booting python programs

The .service files need to go into the /etc/systemd/system directory. That directory is owned by root. The .service file needs to be owned by root. So you need to use sudo on all the command to read or write a file to that directory. Also, the systemd services are run as root unless you specifically...
by knute
Sat Sep 28, 2019 11:15 pm
Forum: Java
Topic: Method in ArrayList?
Replies: 3
Views: 243

Re: Method in ArrayList?

It's a little more complicated in Java. import java.util.*; import java.util.function.*; public class SSCCE { // simple self contained compilable example public static void main(String... args) { // returns the argument unchanged UnaryOperator<String> u1 = UnaryOperator.identity(); // returns the ar...
by knute
Sat Sep 21, 2019 7:34 pm
Forum: Troubleshooting
Topic: [Solved] Stuck in loop asking for password before desktop. Check your .profile
Replies: 15
Views: 32635

Re: [Solved] Stuck in loop asking for password before desktop. Check your .profile

I had the same thing happen just now and it was a bad uSD card. When they die sometimes they go into read only so they'll boot but you can't login. The only solution is a new card.
by knute
Fri Sep 20, 2019 1:13 am
Forum: Graphics, sound and multimedia
Topic: Web camera and time lapse video
Replies: 1
Views: 96

Re: Web camera and time lapse video

A RaspberryPi, a Pi camera and the ffmpeg program should do what you asked.
by knute
Thu Sep 19, 2019 4:42 pm
Forum: General discussion
Topic: Small piwiz race condition (time sync)
Replies: 25
Views: 842

Re: Small piwiz race condition (time sync)

To sum up, systemd uses its release date as the initial time. Then it compares the time at boot to the modification time of the drop in file, which is newer. That triggers the warning. I still don't understand why this doesn't affect units without drop in files, but I've had enough digging through ...
by knute
Thu Sep 19, 2019 4:40 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 607

Re: Clock?

So I found out some more interesting stuff. I thought that my Xubuntu box was updating the time much sooner than the desktop came alive. That is incorrect. Xubuntu is using systemd-timesyncd to update its system clock just like Raspbian and it takes about the same amount of time, 20 to 30 seconds. T...
by knute
Wed Sep 18, 2019 3:02 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

eccentricdyslexic wrote:
Wed Sep 18, 2019 2:42 pm
Looks like i have to upgrade to Jessie...hope it doesn't break things... either that or skip hosting and upload the pic every minute..
Buster would be better.
by knute
Wed Sep 18, 2019 3:00 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 607

Re: Clock?

NTP on Raspbian suffers from the same problem, that is not being up when the desktop gets up. It can take 20 to 30 seconds for the system clock to be synchronized and this is playing havoc with some folks programs that load with the desktop and need the current time. I wrote a new script to check th...
by knute
Tue Sep 17, 2019 8:44 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 607

Re: Clock?

It's highly likely that the first attempt for timesyncd to get the time could fail. I've not looked at the dependencies as I've disabled it in favour of good old NTP on all of my systems. I'm a fan of NTP as well. It has the same problem though with Buster. Something is off in the timing somewhere....
by knute
Tue Sep 17, 2019 8:38 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

I'd rather the pi act as a webserver, so as not too use all my bandwidth (internet very poor here). Any good guides to setting up a webserver? sudo apt install apache2 apache2-doc Now you have a web server. Follow neilgl's fine instructions for creating a web page document. Put that in /var/www/htm...
by knute
Tue Sep 17, 2019 3:20 pm
Forum: General discussion
Topic: Small piwiz race condition (time sync)
Replies: 25
Views: 842

Re: Small piwiz race condition (time sync)

After switching over to Buster Lite, I began having 'apt-get update' failures when it is run immediately after startup. When it became clear the problem was due to the time not being set, I added the following to my startup script and haven't had any problems since: # Wait For Time Synchronization ...
by knute
Tue Sep 17, 2019 3:05 pm
Forum: General discussion
Topic: Upload a pic every minute
Replies: 37
Views: 847

Re: Upload a pic every minute

How can one then display the latest image on a webpage? Cheers Steve Just send the image file to the webserver. Do you want your Pi to be the webserver or is it to be remote? If it is local you can just copy the file to the appropriate directory, if remote you can send the photos via FTP or some ot...
by knute
Tue Sep 17, 2019 2:53 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 607

Re: Clock?

Once the network is alive systemd-timesyncd gets the time from an internet time server. It then polls, infrequently, to keep the clock close to the local time of day. I don't know how it knows the network is alive since systemd-timesyncd apparently normally uses systemd-networkd to determine that a...
by knute
Sat Sep 14, 2019 9:10 pm
Forum: Troubleshooting
Topic: Clock?
Replies: 13
Views: 607

Clock?

Has anybody noticed that it takes a long time for the clock to set with Buster? From the time the desktop is up, it takes my 3B+ and 4 between 1:00 and 1:20 to set. I also noticed something else interesting, the Pi remembers when it was shut down and when it comes back it has that time until it upda...
by knute
Sat Sep 14, 2019 8:32 pm
Forum: General discussion
Topic: Locked topic question?
Replies: 4
Views: 330

Re: Locked topic question?

Thanks very much for the reply and the unlocking. I posted a follow up and you can lock it again if you wish.

Thanks,

knute...
by knute
Sat Sep 14, 2019 8:29 pm
Forum: Troubleshooting
Topic: Java GUI to set static IP parameters in Jessie
Replies: 2
Views: 688

Re: Java GUI to set static IP parameters in Jessie

New code for Buster at http://knutejohnson.com/pi. The old code only worked on Jessie and that is now ancient history.
by knute
Sat Sep 14, 2019 8:27 pm
Forum: Java
Topic: Change static IP from app
Replies: 4
Views: 371

Re: Change static IP from app

I wrote a Java application for changing the IP settings. You are free to steal as much of that as is helpful. The program is IPConfig. http://knutejohnson.com/pi

Go to advanced search