Go to advanced search

by markkuk
Sat Dec 04, 2021 9:07 pm
Forum: Beginners
Topic: Using two Pi's on a home network
Replies: 8
Views: 311

Re: Using two Pi's on a home network

tomhusband wrote:
Sat Dec 04, 2021 8:53 pm
OK thanks, I'm struggling to find a way of doing that in my MicroTik router but I'll sort it out sooner or later.
Hostname is changed on the Pi using the raspi-config command, not on the router.
by markkuk
Tue Nov 16, 2021 1:55 pm
Forum: Networking and servers
Topic: Connect to MySQL database stored on the raspberry pi
Replies: 14
Views: 310

Re: Connect to MySQL database stored on the raspberry pi

First the server (DB) is sitting on my desktop. I will go into daily to check things out. The only time I will access this DB is when I'm sitting in front of my computer. How many machines are involved in this example? Is "the server" the same machine as "my computer"? Is the we...
by markkuk
Sat Nov 06, 2021 9:44 am
Forum: Networking and servers
Topic: Mail Server
Replies: 14
Views: 682

Re: Mail Server

#2: Find the source code and recompile on the Pi.
#3: I've used Webmin occasionally, but not on a Pi. It may be useful for people who like web-based interfaces, but I prefer edititing the config files directly.
by markkuk
Sat Oct 30, 2021 12:23 pm
Forum: Python
Topic: Python error
Replies: 6
Views: 294

Re: Newbie

Python language is case-sensitive just like most others programming languages. The module is called "RPi.GPIO", notice the small "i" in RPi. Function names start with a small letter (following the standard Python converntion), for example GPIO.setmode(), GPIO.setup() and GPIO.out...
by markkuk
Fri Oct 29, 2021 8:03 am
Forum: Networking and servers
Topic: Mail Server
Replies: 14
Views: 682

Re: Mail Server

Traceback (most recent call last): File "newmailing.py", line 6, in <module> server.sendmail("timlab195@gmail.com","password",msg) File "/usr/lib/python2.7/smtplib.py", line 748, in sendmail raise SMTPRecipientsRefused(senderrs) smtplib.SMTPRecipientsRefused:...
by markkuk
Sat Oct 23, 2021 8:32 am
Forum: C/C++
Topic: Why should i use c++ not c?
Replies: 111
Views: 4882

Re: Why should i use c++ not c?

how can stdio be a mandatory C definition standard especially for systems which do not even have a file system? The standard defines two kinds of implementations of the C language: hosted and freestanding. "Hosted" means that the programs will run under an operating system with a file sys...
by markkuk
Fri Oct 01, 2021 12:11 pm
Forum: General discussion
Topic: CERTIFICATE_VERIFY_FAILED on One Specific Client
Replies: 9
Views: 833

Re: CERTIFICATE_VERIFY_FAILED on One Specific Client

pt.ox wrote:
Thu Sep 30, 2021 10:59 pm

6) SSL Certificates are letsencrpt using certbot
The letsencrypt root certificate has expired on 30th September. You need to update the client side with the new root certificate.
by markkuk
Wed Sep 22, 2021 8:02 am
Forum: General programming discussion
Topic: Cannot delete files
Replies: 4
Views: 601

Re: Cannot delete files

Deteleting a file requires write access to the directory containing the file, not the file itself. Check the rights of the directory.
by markkuk
Wed Sep 01, 2021 7:40 am
Forum: General discussion
Topic: Accessing array/json values
Replies: 2
Views: 169

Re: Accessing array/json values

json.loads() converts your JSON into Python data, so you aren't dealing with JSON in any of the following code. Just use the standard ways for accessing Python dicts and lists.
by markkuk
Mon Aug 30, 2021 8:11 am
Forum: Beginners
Topic: How can I control the 2 motors?
Replies: 19
Views: 770

Re: How can I control the 2 motors?

I just found a great article( https://howchoo.com/g/mjg5ytzmnjh/controlling-dc-motors-using-your-raspberry-pi ) about using RPi to control DC motors. In the article, the author uses a Stepper Motor Controller to control 2 DC motors and this is exactly my case. With the provided document( https://ww...
by markkuk
Fri Aug 20, 2021 10:08 am
Forum: MicroPython
Topic: Raspberry Pi run the program out of the compiler?
Replies: 8
Views: 929

Re: Raspberry Pi run the program out of the compiler?

Thonny isn't a compiler, and Python isn't (usually) a compiled language. MicroPython is used to program microcontrollers like the Rasberry Pi PIco. Is this question related to the Pico? There's a separate forum for Pico/MicroPython questions: viewforum.php?f=146
by markkuk
Mon Aug 16, 2021 1:33 pm
Forum: Beginners
Topic: Django or Flask for your project
Replies: 2
Views: 267

Re: Django or Flask for your project

You can call any Python functions for GPIO control from either Django or Flask programs. For differences between the frameworks see: https://testdriven.io/blog/django-vs-flask/ or https://hackr.io/blog/flask-vs-django
by markkuk
Mon Aug 09, 2021 9:43 pm
Forum: Networking and servers
Topic: Telnet: how to start?
Replies: 8
Views: 537

Re: Telnet: how to start?

Telnet (actually system function inet_aton()) interprets a number with leading zero to be octal. Octal number 077 is 63 decimal. Drop the leading zero to access 192.168.188.77
by markkuk
Wed Aug 04, 2021 10:01 pm
Forum: General discussion
Topic: I can't receive NTP updates, help please
Replies: 8
Views: 691

Re: I can't receive NTP updates, help please

pi@RaspbFranco:~ $ sudo systemctl enable ntpd Failed to enable unit: Unit file ntpd.service does not exist. The service is called ntp, not ntpd: mk@rpi3plus:~ $ systemctl status ntp.service ● ntp.service - Network Time Service Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset:...
by markkuk
Wed Aug 04, 2021 6:26 am
Forum: General discussion
Topic: I can't receive NTP updates, help please
Replies: 8
Views: 691

Re: I can't receive NTP updates, help please

I've also disabled IPv6, no changes, I'm cheesed off from all this problems, it should be easy to configure an NTP without loosing hours. Please sorry me. So, what exactly is the problem? The outputs from ntpq and ntptime you quoted show ntp operating normally. Just keep it running for a while to g...
by markkuk
Tue Aug 03, 2021 7:26 am
Forum: General discussion
Topic: Newbie With Things To Do - RPi4 with Windows as NAS and Video Player
Replies: 48
Views: 3225

Re: Newbie With Things To Do - RPi4 with Windows as NAS and Video Player

Can I put the Desktop PI into VM and then operate the actual PI (the one mentioned above that will be in another room) from my desktop that will be in another room as well? Yes, but you won't use the Raspberry Pi Desktop VM to remote control your physical RPi. A different program will be used, for ...
by markkuk
Sun Jul 18, 2021 7:18 am
Forum: C/C++
Topic: How to use Bosch BMP180_driver
Replies: 9
Views: 820

Re: How to use Bosch BMP180_driver

This driver appears to work the same way as the BME680 driver I have used with a Pi. In order to use the driver you need to do the following: Define three functions: one to read data from the I2C bus, one to write data, and a delay function. The driver is intended to be used in various systems inclu...
by markkuk
Wed Jul 14, 2021 4:59 am
Forum: Networking and servers
Topic: nginx configuration for postgresql
Replies: 7
Views: 579

Re: nginx configuration for postgresql

From the expression that postgres is a server based database, I got the idea that a server is needed. Yes, a postgresql server is required, not nginx, samba, or some other random server. Check that the postgresql server is running using the command: sudo pg_isready If that works, you can continue s...
by markkuk
Fri Jul 02, 2021 5:47 am
Forum: Beginners
Topic: Need help in configuring UFW for SFTP access
Replies: 12
Views: 433

Re: Need help in configuring UFW for SFTP access

Vsftpd configuration has nothing to do with SFTP. As I wrote before, SFTP protocol is served by OpenSSH (sshd). Check /etc/ssh/sshd_config, and make sure the following line isn't commented out:

Code: Select all

Subsystem       sftp    /usr/lib/openssh/sftp-server
by markkuk
Thu Jul 01, 2021 2:25 pm
Forum: Beginners
Topic: Need help in configuring UFW for SFTP access
Replies: 12
Views: 433

Re: Need help in configuring UFW for SFTP access

ganeshmallyap wrote:
Thu Jul 01, 2021 1:30 pm
As far as I undersand port 22 was used by OpenSSH on my Raspberry Pi.
Yes, and OpenSSH is the SFTP server.
ganeshmallyap wrote:
Thu Jul 01, 2021 1:30 pm
If I want to use only SFTP and not FTP on my current installatino and enable UFW to allow it, how do I do that?
Open port 22/tcp, close ports 21 and 22.
by markkuk
Tue Jun 29, 2021 8:06 am
Forum: C/C++
Topic: pthread_cancel, PTHREAD_CANCELED
Replies: 5
Views: 779

Re: pthread_cancel, PTHREAD_CANCELED

Heater wrote:
Tue Jun 29, 2021 6:28 am
So how do I know if **retval is supposed to be my exit status or PTHREAD_CANCELED when I call pthread_join()?
If *retval does not equal PTHREAD_CANCELED or NULL it points to your return status.
by markkuk
Mon Jun 28, 2021 8:51 pm
Forum: C/C++
Topic: pthread_cancel, PTHREAD_CANCELED
Replies: 5
Views: 779

Re: pthread_cancel, PTHREAD_CANCELED

According to the standard : The symbolic constant PTHREAD_CANCELED expands to a constant expression of type (void *) whose value matches no pointer to an object in memory nor the value NULL. It's not something you can call, it's used as a status value for pthread_join() calls, something like this: v...
by markkuk
Wed Jun 23, 2021 7:56 am
Forum: Automation, sensing and robotics
Topic: 3d printed Weather Station
Replies: 11
Views: 772

Re: 3d printed Weather Station

Osprey72 wrote:
Tue Jun 22, 2021 2:35 pm
Interesting. When you say 'list', is that an array?
Python doesn't have arrays, it uses lists instead.
by markkuk
Wed Jun 16, 2021 7:01 am
Forum: General discussion
Topic: Can't delete files on an external USB HDD
Replies: 13
Views: 927

Re: Can't delete files on an external USB HDD

Am I right in thinking the user pi is the root user, and this is why nothing changes when I change the ownership to this user and group. No, you're wrong. The root user is identifed by User ID (UID) == 0 and conventionally has username "root". The user "pi" has UID 1000 in Raspb...

Go to advanced search