Go to advanced search

by Lucifer22334
Tue Sep 24, 2019 7:43 am
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

Let's consider a scenario if RPi is not booting up then what should be the solution? Why consider that? You previously wrote "Yeah, on start the green light flickers and yes it shows in router list of connected device." If connected to the router, it booted. I am just taking a precaution nothing mo...
by Lucifer22334
Tue Sep 24, 2019 5:43 am
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

Yeah, on start the green light flickers and yes it shows in router list of connected device. I didn't add ssh.txt on the sd card because I wasn't knowing it yet. I will try tomorrow that ssh.txt file placing in sd card boot part and will try to ssh again. But there is one problem to ssh first it sh...
by Lucifer22334
Tue Sep 24, 2019 5:40 am
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

But there is one problem to ssh first it should be connected to WiFi right if I am not able to start pi than how can I add it?😅 At the top of every forum page is a "Help" link. Click that and look for "Remote Access" In there is a link to "ssh" and its page tells you how to enable ssh by putting th...
by Lucifer22334
Mon Sep 23, 2019 6:10 pm
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

So I loaded OS again on the Memory card and tried to connect it to the MI TV but there it now showed Only Black screen and nothing I can't ssh or anything TV resolution is 1080p/1920x1080 60Hz So is your pi booting ( green LED activity , pi showing up on routers list of connected devices ) , did yo...
by Lucifer22334
Mon Sep 23, 2019 2:20 pm
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

jamesh wrote:
Mon Sep 23, 2019 1:41 pm
Do you know what resolution your display is?
Hi,

I just posted the problem above.
by Lucifer22334
Mon Sep 23, 2019 2:19 pm
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

Hi, Guys, I tried to buy changing the HDMI group and HDMI mode to 1 and 16 respectively. It still didn't start. And then after some time stopped the ssh. I can't ssh into it now. So I loaded OS again on the Memory card and tried to connect it to the MI TV but there it now showed Only Black screen an...
by Lucifer22334
Mon Sep 23, 2019 1:19 pm
Forum: Troubleshooting
Topic: STICKY: Setting up HDMI output when video output is wrong.
Replies: 557
Views: 964051

Re: STICKY: Setting up HDMI output when video output is wrong.

Hi all, My HDMI monitor falls off in this category HDMI group= 1 and HDMI mode = 16. I tested it with the command given above but still, it doesn't give output on the HDMI monitor. I have checked my HDMI monitor conf and it is 1080p/1920x1080 Hz. When I changed in config.txt it stopped ssh also. Ple...
by Lucifer22334
Mon Sep 23, 2019 12:49 pm
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Re: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

So first off have you checked that the HDMI cable is plug in firmly at both ends especially if you are using a case with the pi. secondly is the red LED on the pi flashing , this would indicate a power problem. So assuming both the above are good and that you are running raspbian buster on your pi4...
by Lucifer22334
Mon Sep 23, 2019 12:14 pm
Forum: Troubleshooting
Topic: Urgent : Raspberry Pi 4 doesn't send Signal to HDMI
Replies: 17
Views: 299

Urgent : Raspberry Pi 4 doesn't send Signal to HDMI

Hi all, I have bought raspberry pi 4 from the Silverline electronics which was displayed on buying part of raspberrypi.org. I have also bought the Raspberry PI 4 Micro HDMI to HDMI cable and connected to a monitor. I am Powering Raspberry Pi 4 from the charger of Redmi k20 pro which is of 18W. When ...
by Lucifer22334
Sun Sep 01, 2019 3:28 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

Actually I tried using subprocess but it is sequential. I have a python flask server script to run, a terminal command to port forward and a bash file to start Alexa sample app. Subprocess is not inherently sequential. Depends how you use it. I usually use subprocess.popen. If your child process ge...
by Lucifer22334
Sat Aug 31, 2019 6:25 am
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

If you want an easy way to see all the process names mapped to pids, psutil can help. Here is an example: import psutil for proc in psutil.process_iter(attrs=['pid', 'name', 'username']): print(proc.info) It will place each entry into a dictionary. Here is a sample: {'username': 'afy', 'pid': 8950,...
by Lucifer22334
Sat Aug 31, 2019 6:25 am
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

Ok, so I should use subprocess inseated os.system to call sudo bash start.sh and sudo bash start.sh. But in the start.sh file there are commands to run that 3 terminal with the individual process so How will I find which process is of which? As I said above I am getting 3 python process running and...
by Lucifer22334
Fri Aug 30, 2019 2:26 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

Try : ps -ft pts/0 Here is the output after opening several windows using Popen on my system pi@BanyanBot:~ $ ps -ft pts/0 UID PID PPID C STIME TTY TIME CMD pi 942 890 0 09:52 pts/0 00:00:00 bash pi 1028 942 2 09:53 pts/0 00:00:11 /usr/bin/python3 /usr/local/bin/bls -f exp1.csv pi 1029 1028 0 09:53...
by Lucifer22334
Fri Aug 30, 2019 1:42 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

MrYsLab wrote:
Fri Aug 30, 2019 12:24 pm
Take a look at psutils https://psutil.readthedocs.io/en/latest/#processes. Perhaps there is something there that will help you solve your problem.
Do you know how to get "pts/0" this from: PID pts/0 python [main.py file] ?
by Lucifer22334
Fri Aug 30, 2019 1:40 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

I see you are using os.system. I'd suggest using subprocess instead. This way you can collect the process objects into a list, and then signal them when you're done. I'd also suggest looking at e.g. espeak for TTS so you don#t have to save the audio file before playing it. Regards Aydan Ok, so I sh...
by Lucifer22334
Fri Aug 30, 2019 1:02 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

Do you know how to get "pts/0" this from: PID pts/0 python [main.py file] ?
by Lucifer22334
Fri Aug 30, 2019 12:54 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

MrYsLab wrote:
Fri Aug 30, 2019 12:24 pm
Take a look at psutils https://psutil.readthedocs.io/en/latest/#processes. Perhaps there is something there that will help you solve your problem.
OK, Thanks. I will read the doc and will try to find a solution if not found I will ping here.
by Lucifer22334
Fri Aug 30, 2019 9:44 am
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

I think I have found the problem, In exit.sh I am using sudo killall -9 "sudo" "autossh" "python" I tested it is also killing the main process from which the program runs. I looked in this: ps -A | grep "python" And found that there was 3 python process were running. 1. Main.py file [python main.py]...
by Lucifer22334
Fri Aug 30, 2019 9:23 am
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

This is long shot, but try adding an ampersand to each os.system call. Here is an example: os.system("mpg321 welcome.mp3 &") This will put each job in the background. By adding this it worked: tts.save("welcome.mp3") os.system("mpg321 welcome.mp3") # os.system("sudo killall -9 sudo python autossh &...
by Lucifer22334
Fri Aug 30, 2019 5:27 am
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Re: Problem with closing the terminal processes

Looking at the posted code, the first iteration of the while loop will set val to False and execute the os.system commands. Then for the next iteration, assuming that the user did not enter bye , the code finds the valid name, and since val is False, the next iteration of the while loop is started....
by Lucifer22334
Thu Aug 29, 2019 12:11 pm
Forum: Python
Topic: Problem with closing the terminal processes
Replies: 19
Views: 610

Problem with closing the terminal processes

Hi all, I have made a bash script which opens 3 terminals and runs 3 individual processes on them. I have also created a bash file which kills the process. My application is on detection of RFID tag it will start the bash script which opens the 3 terminal and it will continuously read the card if I ...
by Lucifer22334
Mon Aug 26, 2019 5:30 am
Forum: Python
Topic: Parallel running commands and Files using python
Replies: 2
Views: 187

Re: Parallel running commands and Files using python

If you want to see the program output (to debug / see errors etc) than you can use either TMUX or SCREEN to split the terminal session and run each in its own part of the window. If you want these just to run in the background so you do not see the output then have a read of this article and use of...
by Lucifer22334
Mon Aug 26, 2019 5:27 am
Forum: Python
Topic: How to close terminal from bash or python file?
Replies: 4
Views: 177

Re: How to close terminal from bash or python file?

Andyroo wrote:
Fri Aug 23, 2019 1:10 pm
Another way to get the PID is to use the ‘os’ module in python:

Code: Select all

import os
print(os.getpid())
You could also use the pkill command from the command line as this allow kills by name.

Edit: Corrected and added pkill

Oh..learned new thing today. Thank you so much.
by Lucifer22334
Fri Aug 23, 2019 12:51 pm
Forum: Python
Topic: How to close terminal from bash or python file?
Replies: 4
Views: 177

Re: How to close terminal from bash or python file?

hippy wrote:
Fri Aug 23, 2019 12:20 pm
A python program can determine its PID and write that to a file when it starts, so reading those files would let something know where to direct "kill" commands towards.
Ohh...Means get the PID by pas -A | grep "process or terminal name" and then kill by sudo kill PID. Thanks.
by Lucifer22334
Fri Aug 23, 2019 11:54 am
Forum: Python
Topic: How to close terminal from bash or python file?
Replies: 4
Views: 177

How to close terminal from bash or python file?

Hi all, I am opening 3 terminals from one bash file. And running different files in them. Main terminal --> to run sudo bash New.py which opens and runs 3 Terminals. New.py contain : #!/bin/bash lxterminal -e python tv.py lxterminal -e python server.py lxterminal -e python engine.py So I want to clo...

Go to advanced search