Quantcast
Channel: Recent Questions - Raspberry Pi Stack Exchange
Viewing all 50954 articles
Browse latest View live

Which services on the Pi are mandatory and optional?

$
0
0

I am looking to make the Pi more responsive by disabling unneeded service. I am looking to disable services in /etc/init.d (and anywhere else if there are other places) and want to find a list somewhere that details all the services that are optional so I can disable it. Or can anyone give me a list of unneeded services?

Where can I find such a list? Raspbian stretch is what I'm using.


Booting from network and installing os

$
0
0

Is it possible to download any suitable os from network and install it same way like using pxe boot on pc?

How to set up Raspberry Pi as wireless station after setting it up as access point?

$
0
0

I found this tutorial for setting the Raspberry Pi as access point, but I don't know how to set it back to wireless station as before to connect it to a wireless network.

Can anyone tell me how to do so?

Raspberry Pi for Machine Learning

$
0
0

I’m a software engineer interested (and doing research) in machine learning. For some of my machine learning models, I need more computational power than which offered by a single computer.

Presently, I’m planning to buy few GPUs or build a small cluster using few number of cheap computers. However, recently I came access this nice article which shows how to build a small computing cluster using Raspberry Pi.

Steps to make a Raspberry Pi Supercomputer

Since I don't have previous experience in Raspberry Pi, I just want to know that such a cluster is suitable for high-performance computing applications such as machine learning with big datasets.

Thank You in Advance

Upul

How do I disconnect from wireless after exiting the browser?

$
0
0

When I launch the browser, it activates a wireless connection, but it doesn't disconnect when I quit the browser.

How do I turn wifi off after a session?

Problem handling failed call to pigpio

$
0
0

I've written some python code using pigpio over a network. I have two questions I can't seem to solve myself:

  • Can I change the timeout when calling the pigpidaemon with pigpio.pi(<ip number>). Sometimes the computer I call is unavailable and the default timeout is very long.

  • Can I prevent the below message from being printed on stdout?


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Can't connect to pigpio at alll(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment
variables PIGPIO_ADDR/PIGPIO_PORT?
E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the
pigpio.pi() function? E.g. pigpio.pi('soft', 8888)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

edac-utils on Debian 8 - Jessie

$
0
0

I have Jessie installed on my Raspbery-Pi Zero W system. edac-utils were installed successfully using "apt-get install edac-utils", but I cannot use them somehow, do I need to manually set edac drivers to use this module? Is anyone using edac-utils on raspberry pi successfully?

$sudo edac-ctl --status
edac-ctl: drivers not loaded

$edac-util
edac-util: Fatal: Unable to get EDAC data: Unable to find EDAC data in sysfs

$sudo edac-ctl --mainboard
Use of uninitialized value in concatenation (.) or string at /usr/sbin/edac-ctl line 66.

NGINX Reverse Proxy IP Camera HTTPS and RTSP

$
0
0

I'm new to the Rasp Pi so am at a stage where I'm following existing instructions rather than knowing for sure how to solve problems.

I'm trying to set up a reverse proxy on the Rasp Pi, using NGINX in order to be able to HTTPS to my local network HTTP IP Camera, a Wansview K2. I've followed the instructions @ https://www.raspberrypi.org/forums/viewtopic.php?f=36&t=34291&p=1261650#p1261650.

I've got to the point where I can route into the cameras admin page over an external HTTPS connection. I can change settings so all paths are set up in NGINX correctly. However, for the life of me I cannot work out how to get the stream so that ultimately I can connect to the stream using Androids IP Cam Viewer app (see below). I cannot get a stream through the admin page either locally or remotely due to the need for an ActiveX control which seems not to work in Chrome or Edge. I can get a stream using Androids IP Camera Viewer with RTSP over HTTP. So RTSP is the bit I'm missing the the setup.

According to the camera settings and documentation RTSP is defaulted to port 554 and the stream is available on /live/ch0. What I can't work out unfortunately and despite Googling is how to set up the RTSP bits in NGINX. I may be completely missing the point but this is my current understanding.

With this in mind this is my current NGINX configuration:

server {
    # SSL configuration
    #

    listen 443 ssl;
    listen [::]:443 ssl;
    keepalive_timeout 70;

    ssl on;
    ssl_session_timeout 180m;

    #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

    #ssl_prefer_server_ciphers on;
    #ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:!ADH:!AECDH:!MD5;

    ssl_certificate /home/ralfym/certificate.crt;
    ssl_certificate_key /home/ralfym/certificate.key;

    access_log /home/ralfym/nginx.log;
    server_name ralfym.something.com;

    location /lounge {
        proxy_pass http://192.168.1.21:99/;
        proxy_redirect off;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Real-IP $remote_addr; 
        #try_files $uri $uri/ =404;
    }

    location /hy-cgi {
            proxy_pass http://192.168.1.21:99/hy-cgi;
            proxy_redirect off;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
    }

    location /style {
            proxy_pass http://192.168.1.21:99/style;
            proxy_redirect off;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
    }

    location /js {
            proxy_pass http://192.168.1.21:99/js;
            proxy_redirect off;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
    }

    location /images {
            proxy_pass http://192.168.1.21:99/images;
            proxy_redirect off;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
    }

    location /live {
            proxy_pass http://192.168.1.21:99/live;
            proxy_redirect off;
            proxy_set_header Host $host:$server_port;
            proxy_set_header X-Real-IP $remote_addr;
    }
} 

As you can see from the above I have tried putting the /live path in, in the hope this would work, but it doesn't and neither does the stream work without this configured path. if I browse to /live/ch0 I see:

RTSP/1.0 400 Bad Request
Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )
Cseq: 
Connection: Close

This makes sense of course since I need to make an RTSP call, not HTTPS. Using IP Cam Viewer (adding a Generic URL, RTSP over HTTPS) and going to /live/ch0 I get:

[20/Jan/2018:10:38:39 +0000] "GET /live/ch0 HTTP/1.1" 499 0 "-""Lavf54.6.100"
[20/Jan/2018:10:38:40 +0000] "GET /live/ch0 HTTP/1.1" 502 172 "-""Lavf54.6.100"
[20/Jan/2018:10:38:40 +0000] "POST /live/ch0 HTTP/1.1" 400 0 "-""Lavf54.6.100"
[20/Jan/2018:10:39:10 +0000] "GET /live/ch0 HTTP/1.1" 499 0 "-""Lavf54.6.100"

OK, so after all the above I can get a stream if I turn off RTSP and turn on Onvif, then in IP Camera Viewer choose an Onvif camera. It's slow and jerky but am guessing that's my Pi struggling (it's an old Model B). I'd still like to understand the RTSP bits.

Can anyone provide any help please?

Regards


Raspberry Pi won't recognize nRF24L01+

$
0
0

I'm a Raspberry Pi n00b and a python beginner, but I have a lot of experience with DIY electronics, arduino and c#.

I've tried everything I can think of, and I just can't get the Pi to recognise the RF24.

here's my setup

Raspberry Pi 3 model B nRF24L01+

I'm using this tutorial which uses the Blavery version of the RF24 library, but I have tried at least 4 different tutorials and libraries, which all seem pretty similar.

here is the code:

import RPi.GPIO as GPIO
from lib_nrf24 import NRF24
import time
import spidev

GPIO.setmode(GPIO.BCM)

pipes = [[0xe7, 0xe7, 0xe7, 0xe7, 0xe7], [0xc2, 0xc2, 0xc2, 0xc2, 0xc2]]

radio = NRF24(GPIO, spidev.SpiDev())
radio.begin(0, 17)
radio.setPayloadSize(32)
radio.setChannel(0x60)

radio.setDataRate(NRF24.BR_1MBPS)
radio.setPALevel(NRF24.PA_MIN)
radio.setAutoAck(True)
radio.enableDynamicPayloads()
radio.enableAckPayload()

radio.openReadingPipe(0, pipes[1])
radio.printDetails()

radio.startListening()

while(1):
    ackPL = [1]
    while not radio.available(0):
        time.sleep(1 / 100)
    receivedMessage = []
    radio.read(receivedMessage, radio.getDynamicPayloadSize())
    print("Received: {}".format(receivedMessage))

    print("Translating the receivedMessage into unicode characters")
    string = ""
    for n in receivedMessage:
        # Decode into standard unicode set
        if (n >= 32 and n <= 126):
            string += chr(n)
    print(string)
    radio.writeAckPayload(1, ackPL, len(ackPL))
    print("Loaded payload reply of {}".format(ackPL))

and here is the output:

Warning (from warnings module):
  File "/home/pi/Desktop/NRF24L01/lib_nrf24.py", line 377
    self.GPIO.setup(self.ce_pin, self.GPIO.OUT)
RuntimeWarning: This channel is already in use, continuing anyway.  Use GPIO.setwarnings(False) to disable warnings.
STATUS   = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1    � = 0x0808080808 0x0808080808 
RX_ADDR_P2-5    � = 0x08 0x08 0x08 0x08 
TX_ADDR      = 0x0808080808 
RX_PW_P0-6  � = 0x08 0x08 0x08 0x08 0x08 0x08 
EN_AA        = 0x08 
EN_RXADDR   � = 0x08 
RF_CH        = 0x08 
RF_SETUP    � = 0x08 
CONFIG       = 0x08 
DYNPD/FEATURE   � = 0x08 0x08 
Data Rate    = 2MBPS
Model        = nRF24L01
CRC Length   = 8 bits
PA Power     = PA_MIN

Sometimes the addresses are different, but they never match the addresses from the code.

I've tried checking all the wiring with a multimeter, and it seems to be solid. I've tried with many different wires including ribbon cable directly to the nRF24 module and using a breadboard with the breakout. I tried using a capacitor on the power supply to the RF24. I tried sever different RF modules, all of which I tested with an Arduino and they work fine. I tried it with a Raspberry Pi 2, and had more or less the same results.

As its my first time using Pi, I don't really know the steps for how to debug the problem. I unfortunately don't have an oscilliscope/signal analyzer, so it's hard to test the serial pins. Any suggestions would be greatly appreciated!

thanks

How to enable mod_sftp on proftpd?

$
0
0

I read mod_sftpd is not compiled by default. So, I tried to manually install proftpd-basic downloading it from here, following the steps described here but something went wrong. When I run sudo make I have this error:

msg.c: In function ‘sftp_msg_write_mpint’:

msg.c:449:12: error: dereferencing pointer to incomplete type ‘BIGNUM {aka const struct bignum_st}’

   if (mpint->neg) {

            ^~
Makefile:34: recipe for target 'msg.lo' failed

make[2]: *** [msg.lo] Error 1

make[2]: Leaving directory '/home/pi/proftpd-dfsg-1.3.5b/contrib/mod_sftp'

Makefile:41: recipe for target 'shared' failed

make[1]: *** [shared] Error 2

make[1]: Leaving directory '/home/pi/proftpd-dfsg-1.3.5b/modules'

Makefile:39: recipe for target 'modules' failed

make: *** [modules] Error 2

I tried to search for similar questions but I did not find anything related to raspberry

Red led repeatedly blinks 4 short and 4 long on RPi 3B+ with TinyCore

$
0
0

The red led repeatedly blinks 4 long 4 short and the Pi doesn't boot. Tested with various power adapters.

When powered up without an SD card the red led is solid. I'm using an SD card that works fine with a RPi 2 and 3B.

What could be the problem?

Voice recognition of just 1 word

$
0
0

New to Raspberry Pi - I want to create a device which upon hearing a particular word it will activate/deactivate something. E.g. if I say the word "light", it will turn on/off an LED light. The device will only recognize this one and only word that I program it with. Hoping to use it at home which might have some background noise.

The key part that I'm not sure how to implement is the voice recognition. Would open-source libraries like mycroft and jasper help with this, or is there any other solution? If I were to use it in a home setting with various background noises is rnnnoise the state-of-the-art noise cancelling technique or are the open-source packages enough?

Edit: Sorry I should've specified, I want this device to be disconnected from the internet, so using Alexa / Google would be off the table.

fstab mount network share to older smb dd-wrt versions

$
0
0

I have been having a problem mounting a samba share of my dd-wrt to my rpi3.

Is there a way to solve this problem?

Simultaneous dual networks (LAN + Wifi) setup

$
0
0

I am in the middle of setting up my home automation system with my Raspberry Pi (3B+), and I have a question regarding networking.

My Raspberry is running the Rasbian Lite derivative called Openhabian ( https://www.openhab.org/docs/installation/openhabian.html ). What I want to achieve is pretty simple. The raspberry is currently connected to my network using a LAN cable. But I want to move my home automation devices that don't need internet connection to completely separate network all together. So basically I'll set up a different wifi router and connect all of those devices to it. And I will not be connecting that router to my primary network. That way I can do anything with my primary network without breaking my home automation setup.

The idea of what I want is simple - the raspberry should connect to my primary network via a LAN cable, get it's IP from there (DHCP) and work like normal. But I also want to connect it to my home automation network via wifi at the same time. And it needs to be able to interact with devices from both networks at the same time.

Sadly I have almost 0 experience with Linux networking and I need some help on how to actually do this.

Xorg not working after upgrading to buster

$
0
0

After switching to Raspbian Buster and rebooting RPi3 B+ boots into a shell. (I use the GUI so this is a bit odd) After typing in startx I get this error (I cutout a bunch of junk):

(EE) no screens found(EE)

(EE) Server terminated with error (1). Closing log file

xinit: giving up

xinit: unable to connect to X server: Connection refused

xinit: server error

Is there any way to fix this?


RPi 4B ACT solid green

$
0
0

I am new to raspberry pi and I recently decided to get RPi 4B. Anyways, I was doing a small project and when I finished, I pulled the jumper wires from the breadboard and the wire connected the GND and 5.0v touched which caused the RPi to reset. Now, I don't own a monitor nor keyboard nor mouse, so I just use a VNC server on my laptop. When the 2 wires touched the VNC server got disconnected, so i waited for the RPi to boot up but the LED was solid red and the ACT was solid green.

I searched this forum for help but all I found that the polyfuse just needs time to heal, but i just learned that the RPi 4B doesn't have a polyfuse, It only has an OVP diode.

It's been a couple hours and still nothing, I tried reinstalling raspbian and even tried a new SD card, so is it dead?

PS:Sorry for post being so long. I just wanted to give you all the details

Thanks in Advance

Raspberry Pi4B Not Booting - Solid Green

$
0
0

Just got a Raspberry Pi4B, I have tried all night to get this to work and have had no luck. Both the red and green LED indicators are both on, not blinking. I have followed all troubleshooting advice I have seen (new NOOBS, etched Raspbian, recovery.bin) and cannot get it to output anything to HDMI or even get the green LED to begin blinking. Plugging in has never caused the green lights to blink, regardless of whether or not anything else is inserted. Wired devices such as keyboards and mice don't power up when plugged in (no leds in keyboard for instance). Recovery.bin did not cause the green LED to flicker. Did my Pi brick in transport or something?

Do you have to port forward when using OpenVPN?

$
0
0

I'm going through an install of PiVPN (http://www.pivpn.io/) and it asks to specify a port. Some guides and videos say this needs to be forwarded from the router.

Isn't the point of a VPN to not have the need to port forward?

How to hibernate/suspend rapberry pi?

$
0
0

I have a RPi connected to TV via it's USB port to display statistics graphs. Every morning I have to power it up and set up the chrome tabs which consumes lots of time. I was looking for a way to safely hibernate or suspend by saving state in the evening so the following morning I only have to boot it up.

Leaving the TV on all night is not an option.

Slaves on i²c bus aren't detected

$
0
0

I'm currently trying to get multiple i²c slaves with the same address working without the use of a multiplexer on a PI Model 3b.

I followed this instrutable for the creation of a second i²c bus:

  1. cd /boot
  2. sudo nano config.txt
  3. Add the following line of code:dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24

Checking with sudo i2cdetect -l it appears that a new i²c bus (bus 3) was created. Nevertheless, no slave/sensor is being detected if sudo i2cdetect -y 3 is executed.

pi@raspberrypi:~ $ sudo i2cdetect -l
i2c-3   i2c         3.i2c                               I2C adapter
i2c-1   i2c         bcm2835 I2C adapter                 I2C adapter

pi@raspberrypi:~ $ sudo i2cdetect -y 1  
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- 0d -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- 76 -- 

pi@raspberrypi:~ $ sudo i2cdetect -y 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --  

The sensors on buses 1 and 3 are identical and the wiring is the same. If I switch the buses for the two sets of sensors I get the same result that the sensors on bus 1 (previously on 3) get detected and the ones on bus 3 (previously on 1) don't get detected.


I know do not know how to fix this problem if it is even fixable as most tutorials/instructions simply say that you need a multiplexer to get around the problem with double use of adresses. enter image description here Wiring may look a bit messy but there are no shorts and everything works if connected with bus 1.

  • Black = Ground
  • Orange = 3.3V
  • Gray = SDA
  • Purple = SCL

  • The used sensors also don't have jumpers to select an alternative address.
  • I'm also not able to communicate with the sensors on the bus 3 over a python script
Viewing all 50954 articles
Browse latest View live


Latest Images