Go to advanced search

by jbudd
Sun Sep 15, 2019 7:23 am
Forum: Beginners
Topic: [How can i run a bash script on boot with Pi 4B /4GB]
Replies: 3
Views: 84

Re: [How can i run a bash script on boot with Pi 4B /4GB]

You shouldn't assume that cron knows where to find your script. It's best to use the full pathname. If you redirect the script output to a logfile you may get a clue to what went wrong. Try @reboot /home/pi/script.sh >/home/pi/script.log 2>&1 (or wherever script.sh is). You could put sleep 10 in the...
by jbudd
Sat Sep 14, 2019 6:27 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 97

Re: Format the output of vcgencmd measure_clock arm to human readable value

echo $(( $(vcgencmd measure_clock arm | cut -d '=' -f 2) / 100000000 ))GHz But I divided by 100000000 not 1000000000 so the answer is wrong (unless the Pi is faster than I thought!) [email protected]:~ $ echo $(( $(vcgencmd measure_clock arm | cut -d '=' -f 2) / 100000000 ))GHz 15GHz [email protected]:~ $ ec...
by jbudd
Sat Sep 14, 2019 1:17 pm
Forum: Beginners
Topic: Connecting Raspberry pi 4 to a DVI monitor
Replies: 6
Views: 178

Re: Connecting Raspberry pi 4 to a DVI monitor

Note that some DVI adapters do not pass through the ground connection, and that is a problem for Pi computers.
I found that this didn't work
good.jpg
good.jpg (169.79 KiB) Viewed 84 times

While this, combined with the official micro HDMI cable did
bad.jpg
bad.jpg (51.49 KiB) Viewed 84 times
by jbudd
Fri Sep 13, 2019 11:21 am
Forum: Beginners
Topic: Solved - Can't boot program on startup
Replies: 5
Views: 113

Re: Can't boot program on startup

There are several different ways to start a program automatically.
Can you tell us what methods you have tried and what error messages you see?

ps What is "a auto reboot"?
by jbudd
Thu Sep 12, 2019 1:38 pm
Forum: Off topic discussion
Topic: How to Install Microsoft windows 10 operating systems ?
Replies: 26
Views: 711

Re: How to Install Microsoft windows 10 operating systems ?

EVERY SINGLE BLOODY TIME this subject comes up, some OS dick who thinks they know something always starts slagging off Windows. DONT DO IT. Next time you will be banned. I use Linux EVERYWHERE and yet I do not feel the need to go all MS hatey. If you do, please keep it to yourself, and I'd suggest ...
by jbudd
Thu Sep 12, 2019 1:09 pm
Forum: Off topic discussion
Topic: How to Install Microsoft windows 10 operating systems ?
Replies: 26
Views: 711

Re: How to Install Microsoft windows 10 operating systems ?

"I can't find the download" and "I'm not sure it's legitimate for me to use it" (even if I paid for it).

Two excellent reasons to celebrate having a computer whose price didn't include a payment to Microsoft and won't run Windows as we know and love it.
by jbudd
Thu Sep 12, 2019 10:19 am
Forum: General discussion
Topic: Wifi don’t connect when ap encription change.
Replies: 1
Views: 70

Re: Wifi don’t connect when ap encription change.

In a terminal window sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Change the password (psk=) in the section for your wifi SSID
by jbudd
Wed Sep 11, 2019 3:55 pm
Forum: Beginners
Topic: Connecting to RPI from another device
Replies: 2
Views: 55

Re: Connecting to RPI from another device

By default the Pi's ssh daemon listens on port 22. You can change it by editing /etc/ssh/sshd_config and restarting. You are setting up port forwarding from public port 80 to private port 8080? So you would need Port 8080 in /etc/ssh/sshd_config and ssh [email protected].168.n.n:8080 I'm not at all sure it tha...
by jbudd
Wed Sep 11, 2019 8:45 am
Forum: General discussion
Topic: Super new to this and need help badly
Replies: 18
Views: 650

Re: Super new to this and need help badly

Confused:

disconnect the wifi cable

Wireless is wire less therefore no cable involved.......
He has seperate router and access point. With a wire between them!
by jbudd
Wed Sep 11, 2019 8:27 am
Forum: General discussion
Topic: Super new to this and need help badly
Replies: 18
Views: 650

Re: Super new to this and need help badly

You have seperate router and access point then. The problem is with the way your network is set up, not the Pi Output from route shows gateway address 192.168.43.1 on ethernet and 192.168.1.1 on wifi. They are on different subnets - 192.168.43 and 192.168.1 We don't see your WIFI IP address from ifc...
by jbudd
Tue Sep 10, 2019 11:47 pm
Forum: General discussion
Topic: Super new to this and need help badly
Replies: 18
Views: 650

Re: Super new to this and need help badly

Can you boot with the ethernet cable connected, open a terminal window, run these commands and post the result (save the output from route in a file since internet isn't working on ethernet):

cat /etc/network/interfaces
sudo tail -30 /etc/dhcpcd.conf
route --numeric > route.out
cat route.out
by jbudd
Tue Sep 10, 2019 2:51 pm
Forum: General discussion
Topic: Super new to this and need help badly
Replies: 18
Views: 650

Re: Super new to this and need help badly

A fresh Raspbian Buster setup will normally work on Ethernet without you making any changes.

Are you using the desktop or command line?
Have you made any changes to /etc/network/interfaces or /etc/dhcpcd.conf?
Have you tried to give the Pi a static IP address?
by jbudd
Tue Sep 10, 2019 11:30 am
Forum: Beginners
Topic: cron/bash job to run when ip s not responding to ping
Replies: 61
Views: 2393

Re: cron/bash job to run when ip s not responding to ping

If python encounters an error it exits. You can change this behaviour by wrapping code in try: and except: blocks try: some code which might give an error except: some other code to handle the error I suspect that you are making life more complicated than it needs to be by your script having an infi...
by jbudd
Tue Sep 10, 2019 10:51 am
Forum: Beginners
Topic: read variable from .txt file
Replies: 4
Views: 95

Re: read variable from .txt file

It depends what you want to do with the data and what language you are using. Here is a not very elegant Bash script that puts the data into two Bash arrays #! /bin/bash declare -a array1 declare -a array2 i=0 while read line do array1[$i]=$(echo $line | cut -d ',' -f 1) # Up to the comma array2[$i]...
by jbudd
Tue Sep 10, 2019 9:47 am
Forum: Troubleshooting
Topic: Using a light sensor: Problems reading light/dark (output only prints out zeroes)
Replies: 2
Views: 46

Re: Using a light sensor: Problems reading light/dark (output only prints out zeroes)

Does your code look like this from gpiozero import LightSensor, Buzzer ldr = LightSensor(4) # alter if using a different pin while True: print(ldr.value) or like this? from gpiozero import LightSensor, Buzzer ldr = LightSensor(4) # alter if using a different pin while True: print(ldr.value) If you w...
by jbudd
Sun Sep 08, 2019 1:00 pm
Forum: Beginners
Topic: Trying to connect to a raspberry pi without a monitor.
Replies: 1
Views: 78

Re: Trying to connect to a raspberry pi without a monitor.

Did you burn the latest Raspbian image to your SD card with Etcher? Don't try to use a preinstalled SD card or NOOBS without a monitor. After you have written the image to the card, eject it from your PC and reinsert it. Then create an empty file named ssh or ssh.txt in the drive that windows can se...
by jbudd
Sun Sep 08, 2019 9:07 am
Forum: General discussion
Topic: Wildhog alarm
Replies: 5
Views: 234

Re: Wildhog alarm

Regarding sensors you could take a look at Andreas Speiss' videos on YouTube. https://m.youtube.com/watch?v=9WiJJgIi3W0 The radar type are effective over a longer range than cheap PIR and have 360° coverage. On the other hand, ultrasonic sensors might themselves be a deterrent, if they are audible t...
by jbudd
Sat Sep 07, 2019 10:52 am
Forum: General discussion
Topic: Dual redundancy raspberry PI
Replies: 14
Views: 615

Re: Dual redundancy raspberry PI

Did the Pi die or was it unresponsive but still connected to your network?
by jbudd
Thu Sep 05, 2019 10:15 pm
Forum: General programming discussion
Topic: Sorting files by date & outputting to list
Replies: 6
Views: 457

Re: Sorting files by date & outputting to list

Does using PowerShell on Linux help?
Hmm makes sense to use the tool you are familiar with I suppose but "PowerShell on Linux" just sounds so wrong...
by jbudd
Thu Sep 05, 2019 3:03 pm
Forum: General programming discussion
Topic: Sorting files by date & outputting to list
Replies: 6
Views: 457

Re: Sorting files by date & outputting to list

find option -printf lets you select and format the output eg find /media/usbcctv/camera1/ -iname *.mp4 -type f -size +1M -newermt 20190830T0000 ! -newermt 20190830T2359 -printf "%[email protected]\tfile '%p'\n" Should(!) print the file access time in seconds since the world was created (Jan 1st 1970) followed by ...
by jbudd
Thu Sep 05, 2019 2:04 pm
Forum: Other programming languages
Topic: bash script command not found
Replies: 4
Views: 289

Re: bash script command not found

#!/bin/sh

echo Hello World
The hashbang line specifies the script should be interpreted by /bin/sh which is Dash not Bash. Maybe your more complex scripts have Bash specific code?
by jbudd
Tue Sep 03, 2019 10:53 am
Forum: General discussion
Topic: Looking for a simple vpn solution
Replies: 11
Views: 1727

Re: Looking for a simple vpn solution

I was looking at NordVPN a week or so ago and they had a limited time 75% discount offer ending in 2 hours. Two days later they had a limited time 75% discount offer ending in 9 hours. Today their sale (75% off) is ending soon. You need to trust your VPN provider. Starting off by lying adverts doesn...
by jbudd
Tue Sep 03, 2019 10:40 am
Forum: General discussion
Topic: HDMI problems
Replies: 1
Views: 83

Re: HDMI problems

Just the red LED might indicate that your Pi's are dead.
Did you go through the boot problems sticky thread? http://www.raspberrypi.org/forums/viewt ... 28&t=58151
by jbudd
Tue Sep 03, 2019 10:27 am
Forum: Troubleshooting
Topic: Pi-hole disconnects my Raspberry Pi 4 from the internet.
Replies: 13
Views: 300

Re: Pi-hole disconnects my Raspberry Pi 4 from the internet.

You say that nslookup raspberrypi.org gives this Server: 127.0.0.1 Address: 127.0.0.1#53 Name: mraspi Address: 127.0.1.1 I presume that your /etc/hosts file contains "127.0.1.1 your_hostname", that's normal, but I don't know why the Pi thinks it is the address of raspberrypi.org. Does it make a diff...
by jbudd
Mon Sep 02, 2019 2:53 pm
Forum: Troubleshooting
Topic: Pi-hole disconnects my Raspberry Pi 4 from the internet.
Replies: 13
Views: 300

Re: Pi-hole disconnects my Raspberry Pi 4 from the internet.

I think you need this in /etc/dhcpcd.conf interface eth0 static ip_address=192.168.0.104/24 # Shouldnt be necessary if address is reserved in router static routers=192.168.0.1 # OR whatever your router IP address is static domain_name_servers=127.0.0.1

Go to advanced search