Go to advanced search

by knute
Thu Dec 24, 2020 4:04 am
Forum: Troubleshooting
Topic: pigpio?
Replies: 2
Views: 138

pigpio?

I have a Pi 4 with up to date RPi OS. pigpio version 71 running the pigpiod daemon from systemd with only the -l option. The only address that I can connect to the pigpiod socket on is ::1. localhost, 127.0.0.1 and 0.0.0.0 give a connection refused error. I haven't changed anything in the networking...
by knute
Tue Dec 22, 2020 1:13 am
Forum: C/C++
Topic: pigpio problem?
Replies: 2
Views: 149

Re: pigpio problem?

The command consists of the cmdCmd_t plus the extension. Both have to be sent before the command is echoed back. Is it just misleading wording? "The cmdCmd_t is echoed back with the result, if any, in p3/res, and an extension immediately afterwards for a few commands" is referring to any ...
by knute
Mon Dec 21, 2020 10:10 pm
Forum: C/C++
Topic: pigpio problem?
Replies: 2
Views: 149

pigpio problem?

I'm working on a Java front end that uses pigpio to access the GPIO so I don't have to write any JNI code. I decided to use the socket interface to pigpio because it is easily accomplished in Java. I've been testing several of the commands and I think I may have found something I don't understand. T...
by knute
Fri Dec 11, 2020 3:35 am
Forum: C/C++
Topic: gcc 10+?
Replies: 6
Views: 497

Re: gcc 10+?

You flipped the script on me :-). I ran the original script from ~/bin. It created a directory gcc-10.2.0. There was no Makefile in ~/bin so I went to ~/bin/gcc-10.2.0/obj and entered sudo make install. I think it is working like it is supposed to. It needed a restart of the terminal. Thanks again.
by knute
Fri Dec 11, 2020 12:24 am
Forum: C/C++
Topic: gcc 10+?
Replies: 6
Views: 497

Re: gcc 10+?

jahboater wrote:
Thu Dec 10, 2020 4:32 pm
knute wrote:
Thu Dec 10, 2020 4:11 pm
Is there any advantage of recompiling 10 with 10?
That's what happens anyway as the final part of the normal build (one of the reasons it takes so long).
Thanks.

One more question, I've compiled it but how do I install it somewhere?
by knute
Thu Dec 10, 2020 4:11 pm
Forum: C/C++
Topic: gcc 10+?
Replies: 6
Views: 497

Re: gcc 10+?

Thanks for that!

One other question. Is there any advantage of recompiling 10 with 10?
by knute
Thu Dec 10, 2020 3:52 am
Forum: C/C++
Topic: gcc 10+?
Replies: 6
Views: 497

gcc 10+?

A while back there was a thread with a script for downloading and compiling gcc 10 (I think it was 10 anyway). I can't seem to find it again. I have need for gcc 10. Anybody remember who posted the script or what the title was?
by knute
Wed Dec 09, 2020 8:54 pm
Forum: Java
Topic: Dissapointed with java.nio
Replies: 4
Views: 501

Re: Dissapointed with java.nio

Hello I have coded a program (server and client) in two versions: one with java.io and the other one with java.nio. The program simulates a chat server a many clients, that send messages to server and the server resend to all of the clients. The test I made was with 100 clients. With java.io the se...
by knute
Mon Dec 07, 2020 3:51 pm
Forum: Troubleshooting
Topic: Pulseaudio and VLC?
Replies: 17
Views: 820

Re: Pulseaudio and VLC?

There was an update this morning with some pulseaudio libraries. After the update I got no sound at all until I discovered that the update had changed the selection to AV Jack instead of HDMI. VLC still has the stutter when it starts playing though.
by knute
Sun Dec 06, 2020 10:10 pm
Forum: Troubleshooting
Topic: Pulseaudio and VLC?
Replies: 17
Views: 820

Re: Pulseaudio and VLC?

BTW, if you have firefox-esr installed, please ,can you try to play this video from YouTube... https://www.youtube.com/watch?v=4Wrc4fHSCpw there are very few videos that plays without sound, but only in firefox-esr. this became an issue after the upgrade with PulseAudio. maybe this issue is kind of...
by knute
Sun Dec 06, 2020 2:18 am
Forum: Troubleshooting
Topic: Pulseaudio and VLC?
Replies: 17
Views: 820

Re: Pulseaudio and VLC?

I tried your tone file and it skips in the first couple of seconds of playback. I have noticed that once in a while it doesn't do that but no repeatable and only very rarely.
by knute
Sat Dec 05, 2020 8:09 pm
Forum: Troubleshooting
Topic: Pulseaudio and VLC?
Replies: 17
Views: 820

Pulseaudio and VLC?

When vlc starts now it skips audio in the first few seconds of playing. The only thing new is the updates to use pulseaudio. This only happens when I use vlc, if I play sounds with Java it never skips. Any body know how to fix it?
by knute
Mon Nov 30, 2020 2:50 am
Forum: C/C++
Topic: multi threading in c
Replies: 7
Views: 602

Re: multi threading in c

Threads are pretty simple in C++. The compiler command line is in the code. #include <iostream> #include <unistd.h> #include <thread> // g++ mt.c -o mt -lpthread using namespace std; void a() { for (int i=0; i<25; i++) { cout << "a"; cout.flush(); sleep(1); } } void b() { for (int i=0; i<1...
by knute
Mon Nov 30, 2020 2:20 am
Forum: Advanced users
Topic: VPN Client?
Replies: 5
Views: 236

Re: VPN Client?

Have you looked at pptp-linux (pptp client) and/or pptpd (pptp server)? Yes, they're rudimentary, but better than /dev/null Yes, that's all I found. I got to believe there is something simpler available for the Pi. On Xubuntu it is super simple to set up. The little network widget on the taskbar ha...
by knute
Mon Nov 30, 2020 12:27 am
Forum: Advanced users
Topic: VPN Client?
Replies: 5
Views: 236

Re: VPN Client?

logcabin wrote:
Sun Nov 29, 2020 10:39 pm
Have you considered WireGuard? Easy to set up, and runs like greased lightning.
That's an VPN tunnel scheme. I need a VPN client to connect with existing servers. The servers are running in routers at remote locations. I can't use a different scheme.
by knute
Sun Nov 29, 2020 4:07 pm
Forum: Advanced users
Topic: VPN Client?
Replies: 5
Views: 236

VPN Client?

I need to set up a client to use with several PPTP VPN servers at remote locations. I looked around for information on RaspberryPi PPTP VPN clients and found nothing. There is some data out there on setting up a PPTP VPN client under Debian. On Xubuntu there is a widget that does network connections...
by knute
Thu Nov 26, 2020 4:02 pm
Forum: Java
Topic: Display JPG images on JAVAFX does'nt work
Replies: 7
Views: 736

Re: Display JPG images on JAVAFX does'nt work

I tried to use openjdk11 without success that's why I use Bellsoft. If you have any time to help me it would be great ! It can be a bit daunting to figure out what's actually going on (not that I really have a good handle on it) and make it work. So I'm going to assume that you installed openjdk-11...
by knute
Fri Nov 20, 2020 5:01 pm
Forum: Java
Topic: Display JPG images on JAVAFX does'nt work
Replies: 7
Views: 736

Re: Display JPG images on JAVAFX does'nt work

I'm pretty sure it is a BellSoft bug. Loading a JPEG image works fine if you use the OpenJDK11 and OpenJFX11 from the repository. Using it is a little more complicated than using Liberica because you have to list the module path and added modules on the command line. Let me know if you want any help...
by knute
Thu Nov 19, 2020 4:46 pm
Forum: Java
Topic: Display JPG images on JAVAFX does'nt work
Replies: 7
Views: 736

Re: Display JPG images on JAVAFX does'nt work

I found the same thing with Bellsoft JDK 15 on my Pi. I'm not sure what's causing it but it looks like a bug. I'm really surprised this hasn't shown up some where before. I'll look into it some more.
by knute
Tue Nov 17, 2020 9:56 pm
Forum: Graphics, sound and multimedia
Topic: Small monitor - big clock!
Replies: 5
Views: 404

Re: Small monitor - big clock!

How about an analog clock? With Java 11 or later run it with: java AnalogClock.java import java.awt.*; import java.awt.event.*; import java.awt.geom.*; import java.time.*; import javax.swing.*; /** * AnalogClock is a resizable Swing component that draws an analog clock. * * @author Knute Johnson * @...
by knute
Mon Nov 16, 2020 4:24 pm
Forum: Troubleshooting
Topic: Unable to properly install java
Replies: 13
Views: 542

Re: Unable to properly install java

In your first attempt I thought that apt was supposed to check processor against the install and bomb out before trying to install the wrong version? Perhaps it was just that one file jks-keystore that slipped through the net? Strange! I haven't tried to install it from the repository to a Pi 1 in ...
by knute
Mon Nov 16, 2020 4:07 am
Forum: Troubleshooting
Topic: Unable to properly install java
Replies: 13
Views: 542

Re: Unable to properly install java

Ok, maybe im just stupid and overread something but I followed the installation guide and well [pi@raspberrypi:/usr/lib/jvm $ java -bash: java: command not found If the java program is in /usr/lib/jvm and it appears you are too then you need to use the command: ./java Where did you unzip the Zulu J...
by knute
Fri Oct 23, 2020 8:29 pm
Forum: Troubleshooting
Topic: gpio-shutdown not working?
Replies: 3
Views: 143

Re: gpio-shutdown not working?

Do you have I2C enabled? Enabling I2C 1 on the default pins blocks the gpio-shutdown overlay from functioning on GPIO 3. It has no impact on using GPIO 3 for restart. Not too sure why I2C was enabled but it was. Disabled it works again. Thanks very much. What is set for HandlePowerKey in /etc/syste...
by knute
Fri Oct 23, 2020 4:43 pm
Forum: Troubleshooting
Topic: gpio-shutdown not working?
Replies: 3
Views: 143

gpio-shutdown not working?

For some reason gpio-shutdown is not working on my Pi4. I have the dtoverlay=gpio-shutdown in my /boot/config.txt file under [all]. I have a push button switch between pins 5 and 6. The button works if the Pi is halted to restart it so the GPIO is probably not bad.

Any ideas?
by knute
Thu Oct 22, 2020 1:40 am
Forum: C/C++
Topic: Interpreting command line arguments passed to main()
Replies: 11
Views: 753

Re: Interpreting command line arguments passed to main()

To add to what DEA said: From man strcmp: DESCRIPTION The strcmp() function compares the two strings s1 and s2. It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2. So a match returns 0. This is a template tha...

Go to advanced search