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

blynk for python3

$
0
0

I run this command to try to install Blynk for python on my raspberry pi. I want it to get it working for python3 but when I tell python to "import BlynkLib" it can't find the module. Can someone here give me the correct command to install Blynk for python3.

This is the command I tried:

'''sudo pip install blynklib'''


Using Pi 3 Bluetooth with external GPS

$
0
0

Im trying to connect a RPI3 (running jessie-lite) via Bluetooth to an android phones gps output. I'm using https://play.google.com/store/apps/details?id=com.meowsbox.btgps to stream NMEA strings from my phone.

The end game is to stream positioning strings from a dedicated GPS to the Pi and store them using python.

The problem(s) i'm having are:

I can scan, pair and trust my phone from within bluetoothctl however when i then try connect i get an error.

[bluetooth]# pair F8:95:C7:17:AF:66Attempting to pair with F8:95:C7:17:AF:66[CHG] Device F8:95:C7:17:AF:66 Connected: yesRequest PIN code[agent] Enter PIN code: 1234[CHG] Device F8:95:C7:17:AF:66 Modalias: bluetooth:v00C4p13A1d1000[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001101-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001105-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001112-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001116-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000112d-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001132-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001200-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001800-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 00001801-0000-1000-8000-00805f9b34fb[CHG] Device F8:95:C7:17:AF:66 UUIDs: 7fbe865e-518b-462a-b31b-90acf6a472fc[CHG] Device F8:95:C7:17:AF:66 UUIDs: 936da01f-9abd-4d9d-80c7-02af85c822a8[CHG] Device F8:95:C7:17:AF:66 UUIDs: e3cccccd-33b7-457d-a03c-aa1c54bf617f[CHG] Device F8:95:C7:17:AF:66 Paired: yesPairing successful[CHG] Device F8:95:C7:17:AF:66 Connected: no[bluetooth]# connect F8:95:C7:17:AF:66Attempting to connect to F8:95:C7:17:AF:66Failed to connect: org.bluez.Error.Failed

I've followed instructions from:https://www.raspberrypi.org/forums/viewtopic.php?p=919420#p919420https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=140631

Without any success, using rfcomm bind allows me to connect to the pi using a bluetooth terminal app on android but won't let me connect to the nmea stream.

If anyone has any other ideas to try i'd be incredibly appreciative.

8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

$
0
0

Can connect to many routers with the usb wifi adapter but on some I get an error. When I do the wpa-suplicant manually with the -dd option I get [skip - no WPA/RSN proto match] for the AP I'm trying to connect. I have tried various options for the proto,key_mgmt,pairwise etc options with no luck. By the way, the settings I've used, work with other routers that have similar Security/Encryption setings. I changed the adapter to a Ralink Technology, Corp. RT5370 Wireless Adapter and get the same results. I guess it must be a driver or configuration issue. Has anyone else had this issue with a particular router?

lsusb (only concect one at a time)

8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter5370 Ralink Technology, Corp. RT5370 Wireless Adapter

uname -a

Linux myraspberry 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"NAME="Raspbian GNU/Linux"VERSION_ID="7"VERSION="7 (wheezy)"ID=raspbianID_LIKE=debianANSI_COLOR="1;31"

/etc/network/interfaces

auto lo                                                                                                                                  iface lo inet loopback                                                                                                                   auto eth0                                                                                                                                iface eth0 inet static                                                                                                                   address 192.168.0.34                                                                                                                     netmask 255.255.255.0                                                                                                                        auto wlan0                                                                                                                           allow-hotplug wlan0                                                                                                                      iface wlan0 inet manual                                                                                                                  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf                                                                                         

/etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev                                                                                  update_config=1                                                                                                                          network={                                                                                                                                ssid="NETGEAR"psk="1482000000"}                                                                                                                                        

Also tried
using wpa_passphrase NETGEAR 1482000000 (insterted results below in wpa_suplicant file with no luck)

network={                                                                                                                                        ssid="NETGEAR"        #psk="1482000000"     psk=fb43ef5d68e1923000a9c3adfd8b6cb727526d7b795be395fc87e5158dbb9d6c                                                                }                                                                                                                                        

To view connection details...

  sudo wpa_supplicant -i wlan0  -c /etc/wpa_supplicant/wpa_supplicant.conf  -K   -dd                                                     

Note: I tried the same command with the -D option with 8192cu nl80211 and wext with no luck

Output of wpa_sup....command (breaks where I think caused the error)

wpa_supplicant v1.0                                                                                                                      random: Trying to read entropy from /dev/random                                                                                          Initializing interface 'wlan0' conf     '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'default'     ctrl_interface 'N/A' bridge 'N/A'Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'Reading configuration file     '/etc/wpa_supplicant/wpa_supplicant.conf'ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=netdev' update_config=1                                                                Line: 5 - start of a new network block                                                                                                   ssid - hexdump_ascii(len=7):                                                                                                                  4e 45 54 47 45 41 52                              NETGEAR                                                                           PSK (ASCII passphrase) - hexdump_ascii(len=10):                                                                                               31 34 38 32 30 30 30 30 30 30                     1482000000                                                                        id_str - hexdump_ascii(len=5):                                                                                                            57 69 66 69 31                                    Wifi1                                                                                 priority=3 (0x3)                                                                                                                             PSK (from passphrase) - hexdump(len=32): fb 43 ef 5d 68 e1 92 30 00 a9 c3 ad fd 8b 6c b7 27 52 6d 7b 79 5b e3 95 fc 87 e5 15 8d bb 9d 6c Priority group 3                                                                                                                            id=0 ssid='NETGEAR'WEXT: cfg80211-based driver detected                                                                                                     wext: interface wlan0 phy: phy0                                                                                                          rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0                                                                                   SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf                                                                                   capabilities: key_mgmt 0xf enc 0xf flags 0x0                                                                                           netlink: Operstate: linkmode=1, operstate=5                                                                                              wlan0: Own MAC address: 00:0f:60:05:41:81                                                                                                Driver did not support SIOCSIWENCODEEXT                                                                                                  wpa_driver_wext_set_key: alg=0 key_idx=5 set_tx=0 seq_len=0 key_len=0 [...snip...]                                                                   Driver did not support SIOCSIWENCODEEXT                                                                                                  wpa_driver_wext_set_countermeasures                                                                                                      wlan0: RSN: flushing PMKID list in the driver                                                                                            wlan0: Setting scan request: 0 sec 100000 usec                                                                                           WPS: Set UUID for interface wlan0                                                                                                        WPS: UUID based on MAC address - hexdump(len=16): 59 42 aa ef 68 5d 57 b6 8e 2b 35 44 a9 a7 d4 48                                        EAPOL: SUPP_PAE entering state DISCONNECTED                                                                                              EAPOL: Supplicant port status: Unauthorized                                                                                              EAPOL: KEY_RX entering state NO_KEY_RECEIVE                                                                                              EAPOL: SUPP_BE entering state INITIALIZE                                                                                                 EAP: EAP entering state DISABLED

Here:

EAPOL: Supplicant port status: Unauthorized                                                                                          EAPOL: Supplicant port status: Unauthorized                                                                                          ctrl_interface_group=106 (from group name 'netdev')                                                                                      wlan0: Added interface wlan0                                                                                                             random: Got 20/20 bytes from /dev/random                                                                                                 RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          Wireless event: cmd=0x8b06 len=8                                                                                                         RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          Wireless event: cmd=0x8b1a len=8                                                                                                         RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          wlan0: State: DISCONNECTED -> SCANNING                                                                                                   wlan0: Starting AP scan for wildcard SSID                                                                                                Scan requested (ret=0) - scan timeout 10 seconds                                                                                         EAPOL: disable timer tick                                                                                                                EAPOL: Supplicant port status: Unauthorized                                                                                              RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          Wireless event: cmd=0x8b19 len=8                                                                                                         wlan0: Event SCAN_RESULTS (3) received                                                                                                   Received 3092 bytes of scan results (6 BSSes)                                                                                            wlan0: BSS: Start scan result update 1                                                                                                   wlan0: BSS: Add new id 0 BSSID 00:24:b2:59:f6:4d SSID 'CAMSOFT'wlan0: BSS: Add new id 1 BSSID 84:db:2f:3c:c7:45 SSID 'UNITE-C745'wlan0: BSS: Add new id 2 BSSID 86:db:2f:3c:c7:45 SSID 'ScrubIsland-Wifi'wlan0: BSS: Add new id 3 BSSID 00:26:44:77:fc:e4 SSID 'CAMCLARO'wlan0: BSS: Add new id 4 BSSID 20:aa:4b:ce:96:42 SSID 'Default'wlan0: BSS: Add new id 5 BSSID 30:46:9a:10:db:59 SSID 'NETGEAR'Add randomness: count=1 entropy=0                                                                                                        [...snip...]                                                                                                       wlan0: New scan results available                                                                                                        wlan0: Selecting BSS from priority group 3                                                                                               wlan0: 0: 00:24:b2:59:f6:4d ssid='CAMSOFT' wpa_ie_len=26 rsn_ie_len=24 caps=0x11 level=-33                                               wlan0:    skip - SSID mismatch                                                                                                           wlan0: 1: 84:db:2f:3c:c7:45 ssid='UNITE-C745' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                         wlan0:    skip - SSID mismatch                                                                                                           wlan0: 2: 86:db:2f:3c:c7:45 ssid='ScrubIsland-Wifi' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                   wlan0:    skip - SSID mismatch                                                                                                           wlan0: 3: 00:26:44:77:fc:e4 ssid='CAMCLARO' wpa_ie_len=28 rsn_ie_len=24 caps=0x11 level=-49 wps                                          wlan0:    skip - SSID mismatch                                                                                                           wlan0: 4: 20:aa:4b:ce:96:42 ssid='Default' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-83 wps                                            wlan0:    skip - SSID mismatch                                                                                                           wlan0: 5: 30:46:9a:10:db:59 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 level=-67 wps 

Here:

wlan0:    skip - no WPA/RSN proto match                                                                                              wlan0: No suitable network found                                                                                                     wlan0: Setting scan request: 5 sec 0 usec                                                                                                wlan0: Checking for other virtual interfaces sharing same radio (phy0) in event_scan_results                                             wlan0: Starting AP scan for wildcard SSID                                                                                                Scan requested (ret=0) - scan timeout 30 seconds                                                                                         RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          Wireless event: cmd=0x8b19 len=8                                                                                                         wlan0: Event SCAN_RESULTS (3) received                                                                                                   Received 3093 bytes of scan results (6 BSSes)                                                                                            wlan0: BSS: Start scan result update 2                                                                                                   Add randomness: count=7 entropy=6                                                                                                        [...snip...]                                                                                                      wlan0: New scan results available                                                                                                        wlan0: Selecting BSS from priority group 3                                                                                               wlan0: 0: 00:24:b2:59:f6:4d ssid='CAMSOFT' wpa_ie_len=26 rsn_ie_len=24 caps=0x11 level=-25                                               wlan0:    skip - SSID mismatch                                                                                                           wlan0: 1: 84:db:2f:3c:c7:45 ssid='UNITE-C745' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                         wlan0:    skip - SSID mismatch                                                                                                           wlan0: 2: 86:db:2f:3c:c7:45 ssid='ScrubIsland-Wifi' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                   wlan0:    skip - SSID mismatch                                                                                                           wlan0: 3: 00:26:44:77:fc:e4 ssid='CAMCLARO' wpa_ie_len=28 rsn_ie_len=24 caps=0x11 level=-49 wps                                          wlan0:    skip - SSID mismatch                                                                                                           wlan0: 4: 20:aa:4b:ce:96:42 ssid='Default' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-83 wps                                            wlan0:    skip - SSID mismatch                                                                                                           wlan0: 5: 30:46:9a:10:db:59 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 level=-63 wps                                             wlan0:    skip - no WPA/RSN proto match                                                                                                  wlan0: No suitable network found                                                                                                         wlan0: Setting scan request: 5 sec 0 usec                                                                                                wlan0: Checking for other virtual interfaces sharing same radio (phy0) in event_scan_results                                             wlan0: Starting AP scan for wildcard SSID                                                                                                Scan requested (ret=0) - scan timeout 30 seconds                                                                                         RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])                                                                                         RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added                                                                                        WEXT: if_removed already cleared - ignore event                                                                                          Wireless event: cmd=0x8b19 len=8                                                                                                         wlan0: Event SCAN_RESULTS (3) received                                                                                                   Received 3091 bytes of scan results (6 BSSes)                                                                                            wlan0: BSS: Start scan result update 3                                                                                                   Add randomness: count=13 entropy=12                                                                                                      Add randomness: count=14 entropy=13                                                                                                      Add randomness: count=15 entropy=14                                                                                                      Add randomness: count=16 entropy=15                                                                                                      Add randomness: count=17 entropy=16                                                                                                      Add randomness: count=18 entropy=17                                                                                                      wlan0: New scan results available                                                                                                        wlan0: Selecting BSS from priority group 3                                                                                               wlan0: 0: 00:24:b2:59:f6:4d ssid='CAMSOFT' wpa_ie_len=26 rsn_ie_len=24 caps=0x11 level=-33                                               wlan0:    skip - SSID mismatch                                                                                                           wlan0: 1: 84:db:2f:3c:c7:45 ssid='UNITE-C745' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                         wlan0:    skip - SSID mismatch                                                                                                           wlan0: 2: 86:db:2f:3c:c7:45 ssid='ScrubIsland-Wifi' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-39 wps                                   wlan0:    skip - SSID mismatch                                                                                                           wlan0: 3: 00:26:44:77:fc:e4 ssid='CAMCLARO' wpa_ie_len=28 rsn_ie_len=24 caps=0x11 level=-47 wps                                          wlan0:    skip - SSID mismatch                                                                                                           wlan0: 4: 20:aa:4b:ce:96:42 ssid='Default' wpa_ie_len=0 rsn_ie_len=20 caps=0x11 level=-87 wps                                            wlan0:    skip - SSID mismatch                                                                                                           wlan0: 5: 30:46:9a:10:db:59 ssid='NETGEAR' wpa_ie_len=0 rsn_ie_len=0 caps=0x11 level=-63 wps                                             wlan0:    skip - no WPA/RSN proto match                                                                                                  wlan0: No suitable network found                                                                                                         wlan0: Setting scan request: 5 sec 0 usec                                                                                                wlan0: Checking for other virtual interfaces sharing same radio (phy0) in event_scan_results                                             

Here I pressed Ctrl-Break (if not it will loop forever)

Run Node.js application while booting in raspberry pi

$
0
0

I have to run a node.js application while reboot in raspberry pi.The application uses WIFI and BLE on-board of raspberry pi.

I have tried out the below solutions: 1.Copied my node.js application in the rc.local with full path. Eg:cd path filename.js < /dev/null &

But Still didn't worked.Ref link :(How to run a script (Node.js) at startup)

How do I set up live Twitch streaming from RetroArch on a Pi 3?

$
0
0

I have been tinkering with Raspberry Pi's for a few years now and have some experience with installs, command line and using SSH e.t.c...

I currently have Pi 3 with Retropie 1.6.3 installed and I can SSH into the Pi from my Mac OSX Machine.

I have been searching the internet for about two months in regards to live streaming from RetroArch to Twitch natively (no capture card just the Pi and RetroPie with RetroArch).

I have had no success.

I have some How managed to install FFMPEG (which most tutorials say to use for Twitch live streaming from RetroArch).

But when I try to configure the record/stream I cannot get this to work, (unable to select FFMPEG for RetroArch record driver).

I am going to be doing a fresh RetroPie Install before trying again.

Can someone please help me with this problem.

I need help getting FFMPEG or equivalent Recording for RetroArch and then be able to stream it directly to Twitch.

I want to be able to try this with lr-mgba, lr-gambette, lr-pcsx-rearmed, lr-snes9x2010 & lr-picodrive.

The following are some not all of the tutorials I have found but none have worked. In whole part or any combination. I have not even been able to record a video and save it to the Pi's micro SD card.

https://retroresolution.com/2016/07/06/recording-live-gameplay-in-retropies-retroarch-emulators-natively-on-the-raspberry-pi/

https://retropip.net/retropie/twitch-live-stream-from-retropie/

https://selsine.com/2016/10/16/how-to-live-stream-to-twitch-from-a-retropie/

If anyone can shed any light or point me in the right direction that would be very helpful.

PS

Please don't complain or tell me about video stream quality issues, I really want to know if it can be done and see it in action even if it is a bit laggy and lumpy, seeing a £30 credit card size computer running a GBA for instance and streaming it to Twitch would be very impressive.

GCC version for compiling a loadable kernel module

$
0
0

I am not very familiar with Linux, so may be my question is a little bit foolish.

I would like to compile kernel module without recompiling the kernel (USB Wi-Fi stick driver for MT7106U chip). I have the source code and instructions.

As I understand, the module should be compiled with the same gcc version, that was used for kernel build.Currently I have this configuration:

Linux raspberrypi 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l GNU/Linuxgcc (Raspbian 6.3.0-18+rpi1) 6.3.0 20170516

How to find which compiler version was used to build kernel and how to change gcc version for this correctly?I tried

sudo update-alternatives --config gcc

but I got

update-alternatives: error: no alternatives for gcc

Should I uninstall current version of gcc or it can be installed along with this one?

Also I need Raspberry Pi linux headers using rpi-source. I have found this one:

https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source

Is this correct link?

Thanks.

Installing RStudio on a Raspberry Pi running Ubuntu MATE 16.04

$
0
0

I am planning to do a classroom project using R and RStudio IDE. I am able to run R from command line. I installed the package using the command below sudo apt-get install r-base

Now I am trying to install the RStudio IDE and I found this Installing RStudio link which has a lot of packages and dependencies to be installed.

I have also checked the RStudio source code on GitHub and the GitHub Instructions are different there, will those instructions are applicable to the armhf-based Raspberry Pi Ubuntu MATE.

Any help is appreciated. Thanks in advance.

How to improve wireless throughput on RPi 3 b+ in AP mode?

$
0
0

I've upgraded from 3 to 3 b+ in hopes of improving throughput on wireless network (using built-in wireless chip as AP and wired connection on the other end). I've configured it to work in 802.11ac mode, and my laptop sees it as such with pretty reasonable signal level (-50 dBm signal and -99 dBm noise), but RPi still reports speed as 54 Mbps (my other AC router reports speed as 234 Mbps) and actual speed does not exceed 20 Mbps (tested with iperf3 -t 30 -P 30). Which is even worse than if I use my old 3 in 802.11n mode.

How can I improve Wi-Fi speed on my RPi?

Below is my hostapd.conf. OS is headless raspbian/debiab stretch (9.4 fully updated).

ssid=<redacted>wpa_passphrase=<redacted>country_code=USinterface=wlan0driver=nl80211wpa=2wpa_key_mgmt=WPA-PSKwpa_pairwise=TKIPrsn_pairwise=CCMPlogger_syslog=-1logger_syslog_level=0logger_stdout=-1logger_stdout_level=0hw_mode=aieee80211n=1require_ht=1ieee80211ac=1require_vht=1ieee80211d=1ieee80211h=0ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CK-40][MAX-AMSDU-3839]vht_capab=[MAX-MPDU-3895][SHORT-GI-80][SU-BEAMFORMEE]vht_oper_chwidth=1channel=36vht_oper_centr_freq_seg0_idx=42wmm_enabled=0macaddr_acl=0auth_algs=1ignore_broadcast_ssid=0

Raspivid: 'ES_OUT_SET_(GROUP_)PCR is called too late'& stream keeps freezing

$
0
0

First post here, hopefully i'm in the right place :)

I'm attempting to stream low-latency video from my Raspberry Pi to my Windows PC using Raspivid and VLC. I'm no expert on this stuff and i'm mainly following tutorials and trying to understand what I can. I'm streaming over RTSP.

Here is my code for starting the stream on the Pi. I've used some variations of this that i've found online, but it generally remains the same:

raspivid -o - -t 0 -n -w 600 -h 400 -fps 15 -rot 180 | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:8554/}' :demux=h264

I connect on Windows in VLC using the address:

rtsp://192.168.1.2:8554/

I can start the stream on the Pi and it runs through code, only throwing the following three errors on different lines. In VLC, I can open the stream without issue.

main stream error: unknown query 0x30e in demux_vaControlHelpermain interface error: no suitable interface modulemain libvlc error: interface "globalhotkeys,none" initialization failed

Once I get to the stream in VLC though, it freezes and the Pi's terminal gives the following errors:

 main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1261 ms)

...then buffers to 100% before:

main input error: ES_OUT_SET_(GROUP_)PCR is called too late (pts_delay increased to 2939 ms)

...and this buffering and then error loop repeats continuously until right before I terminate the program where it gives this error:

main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (jitter of 6511 ms ignored)main decoder error: Timestamp conversion failed for 15860001: no reference clockmain decoder error: Could not convert timestamps 0, 0 for h264

Every time the stream buffers, the stream unfreezes and I get some movement in VLC, but nothing usable.

I've tried adding the following flags to my starting command without luck:

  • :network-caching=3000
  • :clock-jitter=0
  • --network-caching
  • --file-caching

Nothing i've found has worked to solve this so far. If anyone has a solution, I would be grateful to hear it. Thanks!

RPI3 WiFi connection is established only when connected to the access point with a LAN cable

$
0
0

enter image description here

I can successfully connect to my RPI using SSH when the RPI is connected to a wireless access point and powered by a Xiaomi battery; but I cannot when I pull off the power and plug in the socket & disconnect from the AP.

My home has 2 wireless access points; my computer and raspberry pi are connected to one which is being used as a hub.

Access point which is directly connected to the internet: 192.168.25.1

Access point used as a hub: 192.168.25.2

My computer: 192.168.25.38

My raspberry pi: 192.168.25.254(wired), 192.168.25.150(wired-manually set), and 192.168.25.54(wireless)

Subnet mask: 255.255.255.0

This is what ifconfig shows w/ wired connection:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.25.254  netmask 255.255.255.0  broadcast 192.168.25.255        inet6 fe80::ba27:ebff:feea:707d  prefixlen 64  scopeid 0x20<link>        ether XX:XX:XX:XX:XX:XX  txqueuelen 1000  (Ethernet)        RX packets 120  bytes 17014 (16.6 KiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 173  bytes 26794 (26.1 KiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536        inet 127.0.0.1  netmask 255.0.0.0        inet6 ::1  prefixlen 128  scopeid 0x10<host>        loop  txqueuelen 1000  (Local Loopback)        RX packets 0  bytes 0 (0.0 B)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 0  bytes 0 (0.0 B)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500        inet 192.168.25.54  netmask 255.255.255.0  broadcast 192.168.25.255        inet6 fe80::e66f:6720:9885:bfe0  prefixlen 64  scopeid 0x20<link>        ether YY:YY:YY:YY:YY:YY  txqueuelen 1000  (Ethernet)        RX packets 146  bytes 18413 (17.9 KiB)        RX errors 0  dropped 0  overruns 0  frame 0        TX packets 39  bytes 6553 (6.3 KiB)        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And this is what iwconfig shows:

eth0      no wireless extensions.lo        no wireless extensions.wlan0     IEEE 802.11  ESSID:"*wap to the internet*"          Mode:Managed  Frequency:2.437 GHz  Access Point: ZZ:ZZ:ZZ:ZZ:ZZ:ZZ            Bit Rate=24 Mb/s   Tx-Power=31 dBm             Retry short limit:7   RTS thr:off   Fragment thr:off          Power Management:on          Link Quality=70/70  Signal level=-37 dBm            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

This is the content of /etc/wpa_supplicant/wpa_supplicant.conf.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1network={        ssid="wap to the internet"        psk=419a1c553c3e97c809ab7e1e4a61b24ec9e41a3e695fdb152b123cb36f8496cc}network={        ssid="wap as a hub"        psk=84f5ad15d48b3eec93640122b573f206d37abdcf8772a5295ea4dea872487f61}

I guess two possible causes:1. Power - Both the iPhone charge adapter and my Macbook are too weak to supply power2. Not booted - The two power sources mentioned above are sufficient but my access point cannot spot my RPI when it's booted up

Would anyone help me figure out what prevents establishing WiFi connection? Any comments will be appreciated a lot.

SSH connection hangs in Mac OS Terminal - No prompt for password

$
0
0

I've been SSH'ing into my Raspi 3 B+ for some time now from my Mac OS with no issues.

I recently set a static IP address for my Pi on a LAN network connected via ethernet cable. I editedsudo nano /etc/dhcpcd.conf

and then added at the bottom;

interface eth0static ip_address=my.desired.ip.addressstatic routers=router.addressstatic domain_name_servers=DNS.address

Where my router address and DNS address were retrieved usingroute -n and cat /etc/resolv.conf respectively.

I successfully SSH'd from a different laptop onto my Pi using this static IP address - this network is not connected to the internet.

Going back to my personal laptop which is on a wireless network (same as Pi) which is connected to the internet. I tried SSH'ing into my Pi as normal but the connection hangs.

I've confirmed my Pi's IP address with ifconfig wlan0 which is 198.123.52.xx. When I try through terminal to SSH using sudo ssh pi@198.123.52.xx -v I get the following;

OpenSSH_7.9p1, LibreSSL 2.7.3debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 48: Applying options for *debug1: Connecting to 198.123.52.xx [198.123.52.xx] port 22.

The connection just hangs there.

  • I've tried reinstalling SSH-server withsudo apt-get purge ssh-server then sudo apt-get install ssh-server.
  • I've tried adding IPQoS cs0 cs0 to the end of my /etc/ssh/sshd_config file.
  • I've # commented out the static ip changes I made.
  • I've run sudo apt-get update and sudo apt-get upgrade - All packages are installed and updated.

Do I need to remove a hostkey or flush something?

I'm not sure what else to do.

Re-appearing login screen after updating to stretch

$
0
0

I found several topics which describe the same issue as I have but none of the solutions worked for me so far. So on boot, the raspberry asks for a username and password (what it shouldn't) and when I enter pi/raspberry the screen quickly gets black and then the login re-appears. This happened after I upgraded my Jessie to Stretch but if I'm correct, rebooting worked a few times.

I can still login through SSH so my credentials are correct.As far as I can tell I only added one line in my .profile which I reverted back already - without change.

The only hint I got so far are the following lines from my .xsession-errors

dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1/usr/bin/x-session-manager: 33: exec: /usr/bin/lxsession: not found

I'm not super experienced with Linux so I'm not sure if just re-installing LXDE would be the right thing here.

Trouble adding a gpio device to the device tree

$
0
0

I'm trying to connect an hx711 to GPIO23 and GPIO24 pins on an RPI3 A+, and I need to specify this in the device tree to have the hx711.ko driver be probed. I've been stuck on this problem for some time now, here is what I have done so far:

-Enabled the hx711 driver using menuconfig and rebuilt the kernel

-Wrote the following device tree overlay based on the suggestion in the hx711 device tree documentation:

/dts-v1/; /plugin/;/{compatible = "brcm,bcm2708";fragment@0 {    __overlay__ {        target = <&gpio>;                   weight_gpio: weight_gpio {                brcm,pins = <0x17 0x18>;                brcm,function = < 0x00 >;                #gpio-cells = < 0x02 >;            };        };    };fragment@1 {    __overlay__ {            target = <&soc>;                weight: weight {                compatible = "avia,hx711";                sck-gpios = <&weight_gpio 0x17 0>;                dout-gpios = <&weight_gpio 0x18 0>;                avdd-supply = <&vdd_3v3_reg>;                status = "okay";            };        };    };};

-Built using dtc giving the following output:

dtc -@ -I dts -O dtb -o hx711.dtbo hx711.dtshx711.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg propertyhx711.dtbo: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property

-added dtoverlay=hx711 line in config.txt

-Examined the currently loaded device tree using dmesg and the dtc command. Here is the output..

I get no information about my overlay. Not even and error saying it wasn't loaded.

I can see that the overlay I wrote for the mpu6050 (i2c device) works fine.

Any suggestions are appreciated.

Rpi3B+ micro USB connector got 15V power. Is it dead? Can I save it?

$
0
0

I accidentally gave 15V to a Raspberry Pi 3 B+ Micro USB slot, when I observed some smoke I instantly removed in from the power supply.

What can I do to restore my Raspberry Pi?

OWFS (One Wire File System) can at most detect four DS18B20 sensors connected to the 8-channel DS2482-800 Host Module Problem

$
0
0

I'm about to build a heating control with DS18B20 1Wire-sensors and the Raspberry Pi 3 Model B+. For the 1Wire-interface I'm using the DS2482-800 multi-channel busmaster (more precisely this pre-assembled board: http://www.sheepwalkelectronics.co.uk/product_info.php?products_id=67).

The sensors are read over OWFS and a Node.js-script (using the owfs-module). I'm using Node.js as the Raspberry is hosting an express-webserver with all the current temperature-values.

Overall this works great, at least for the 11 sensors, which are connected to the first 4 channels of the DS2482. But as soon as I try to connect 2 additional sensors to the 5th channel, these sensors are NOT read by OWFS. Why that?

Moreover I noticed, that the virtual /mnt/1wire directory only shows 9 sensors on the first 2 channels, although I'm able to read 11 sensors (on 4 channels) with the Node.js-script without problems. How's that possible???

<code>/mnt/1wire</code> directory shows 9 sensors but with the Node.js-script I'm able to read 11

For test purposes I tried to connect the 2 "new" sensors to one of the first 4 channels -> reading them works perfectly fine, so no issues with the sensors.
Because of that, I think there's a problem with my configuration of OWFS.
My owfs.conf file looks like this:

# Sample configuration file for the OWFS suite for Debian GNU/Linux.### This is the main OWFS configuration file. You should read the# owfs.conf(5) manual page in order to understand the options listed# here.######################## SOURCES ########################## With this setup, any client (but owserver) uses owserver on the# local machine...! server: server = localhost:4304## ...and owserver uses the real hardware, by default fake devices# This part must be changed on real installation# server: FAKE = DS18S20,DS2405## USB device: DS9490#server: usb = allserver: device = /dev/i2c-1# Serial port: DS9097#server: device = /dev/ttyS1## owserver tcp address#server: server = 192.168.10.1:3131## random simulated device#server: FAKE = DS18S20,DS2405######################### OWFS ###########################mountpoint = /mnt/1wireallow_other######################## OWHTTPD #########################!http: port = 2121####################### OWFTPD ##########################ftp: port = 2120####################### OWSERVER ########################server: port = 4304

I really appreciate your support, as I couldn't find anything helpful via Google and I'm preety stumped right now...

Thanks in advance


Raspberry PI https fails

$
0
0

I have a new Pi Zero W.

I'm trying to install a Debian (DietPi) onto it but it always fails.I don't have a keyboard and external monitor, so I choose a headless install with predefined wifi key and SSID.

The problem is absolutely wierd (wlan0 interface works for sure, because that's the only way now to reach it via SSH and it works):

Pinging an IP address works:

root@DietPi:~# ping 8.8.8.8PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=9.95 ms64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=13.0 ms64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=12.1 ms64 bytes from 8.8.8.8: icmp_seq=4 ttl=53 time=15.0 ms^C--- 8.8.8.8 ping statistics ---4 packets transmitted, 4 received, 0% packet loss, time 7msrtt min/avg/max/mdev = 9.949/12.523/15.039/1.829 ms

Pinging a domain name (using DNS) works too:

root@DietPi:~# ping google.comPING google.com (172.217.19.174) 56(84) bytes of data.64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=1 ttl=53 time=10.1 ms64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=2 ttl=53 time=12.7 ms64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=3 ttl=53 time=12.9 ms64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=4 ttl=53 time=13.2 ms^C--- google.com ping statistics ---4 packets transmitted, 4 received, 0% packet loss, time 7msrtt min/avg/max/mdev = 10.102/12.236/13.163/1.248 ms

Let's download a file from http (works too):

root@DietPi:~# wget http://archive.raspberrypi.org/debian/dists/buster/InRelease--2020-04-24 07:49:31--  http://archive.raspberrypi.org/debian/dists/buster/InReleaseResolving archive.raspberrypi.org (archive.raspberrypi.org)... 176.126.240.86, 46.235.231.151, 46.235.230.122, ...Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|176.126.240.86|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 25112 (25K)Saving to: ‘InRelease.1’InRelease.1                                                 100%[========================================================================================================================================>]  24.52K  --.-KB/s    in 0.1s2020-04-24 07:49:32 (174 KB/s) - ‘InRelease.1’ saved [25112/25112]

Okay, now problem: let's download the same file from https:

root@DietPi:~# wget https://archive.raspberrypi.org/debian/dists/buster/InRelease--2020-04-24 07:49:37--  https://archive.raspberrypi.org/debian/dists/buster/InReleaseResolving archive.raspberrypi.org (archive.raspberrypi.org)... 93.93.135.117, 176.126.240.167, 46.235.231.111, ...Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|93.93.135.117|:443... connected.

This one hangs forever and can not continue. Due to this apt is not able upgrade or install anything.

I did one more step:

root@DietPi:~# wget -d https://archive.raspberrypi.org/debian/dists/buster/InReleaseDEBUG output created by Wget 1.20.1 on linux-gnueabihf.Reading HSTS entries from /root/.wget-hstsURI encoding = ‘UTF-8’Converted file name 'InRelease' (UTF-8) -> 'InRelease' (UTF-8)--2020-04-24 07:52:26--  https://archive.raspberrypi.org/debian/dists/buster/InReleaseCertificates loaded: 128Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 176.126.240.86, 93.93.135.117, 176.126.240.167, ...Caching archive.raspberrypi.org => 176.126.240.86 93.93.135.117 176.126.240.167 46.235.231.111 93.93.135.118 46.235.227.39 176.126.240.84 46.235.231.145 46.235.230.122 46.235.231.151 2a00:1098:88:26::1 2a00:1098:88:26::1:1 2a00:1098:84:1e0::1 2a00:1098:82:47::1:1 2a00:1098:80:56::2:1 2a00:1098:88:26::2:1 2a00:1098:84:1e0::2 2a00:1098:80:56::1:1 2a00:1098:84:1e0::3 2a00:1098:82:47::1Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|176.126.240.86|:443... connected.Created socket 3.Releasing 0x00f0a8d0 (new refcount 1).GnuTLS: Error in the pull function.Closed fd 3Unable to establish SSL connection.root@DietPi:~#

Two more additions:

  1. Same command works fine on another Pi (other physical location).
  2. From the same location where this PiZero is, I can open this link on my computer.

Update (based on comment)

Date seems okay on the Zero. (Although timezone is not yet setup)

Adding --no-check-certificate does not help:

# wget -d --no-check-certificate  https://archive.raspberrypi.org/debian/dists/buster/InReleaseSetting --check-certificate (checkcertificate) to 0Setting --check-certificate (checkcertificate) to 0DEBUG output created by Wget 1.20.1 on linux-gnueabihf.Reading HSTS entries from /root/.wget-hstsURI encoding = ‘UTF-8’Converted file name 'InRelease' (UTF-8) -> 'InRelease' (UTF-8)--2020-04-24 08:15:12--  https://archive.raspberrypi.org/debian/dists/buster/InReleaseCertificates loaded: 128Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 46.235.231.151, 93.93.135.118, 176.126.240.86, ...Caching archive.raspberrypi.org => 46.235.231.151 93.93.135.118 176.126.240.86 46.235.230.122 46.235.227.39 46.235.231.111 46.235.231.145 176.126.240.84 93.93.135.117 176.126.240.167 2a00:1098:84:1e0::3 2a00:1098:88:26::2:1 2a00:1098:84:1e0::1 2a00:1098:82:47::1:1 2a00:1098:88:26::1 2a00:1098:80:56::2:1 2a00:1098:80:56::1:1 2a00:1098:82:47::1 2a00:1098:88:26::1:1 2a00:1098:84:1e0::2Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|46.235.231.151|:443... connected.Created socket 3.Releasing 0x003018e8 (new refcount 1).

Curl seems to work without issues:

# curl https://archive.raspberrypi.org/debian/dists/buster/InRelease > InRelease  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed100 25112  100 25112    0     0  41032      0 --:--:-- --:--:-- --:--:-- 41099

Update2:

The main issue is that apt fails:

# apt updateHit:1 http://raspbian.raspberrypi.org/raspbian buster InReleaseIgn:2 https://archive.raspberrypi.org/debian buster InReleaseErr:3 https://archive.raspberrypi.org/debian buster Release  Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 93.93.135.117 443]Reading package lists... DoneE: The repository 'https://archive.raspberrypi.org/debian buster Release' does not have a Release file.N: Updating from such a repository can't be done securely, and is therefore disabled by default.N: See apt-secure(8) manpage for repository creation and user configuration details.

This is I believe has the same root cause as the wget's one.

Unable to pip install librosa in raspberry pi 3 model b+ (Raspbian stretch)

$
0
0

Respected people,

when I run the command,

pip3 install librosa 

I am stuck here,

Running setup.py bdist_wheel for scipy ... \

It was taking more then 2 hours but it was still continuing the same, finally it was built , but i get a lot of error after that

Can anyone pls suggest me , a better resource or link?

Connecting Raspberry Pi 4 to old VGA monitor

$
0
0

I'm trying to set up an old monitor to use with my Raspberry Pi with Ubuntu 20.04, but whatever options I try, my monitor doesn't detect any signal coming from raspberry.

I have original HDMI cable for RPi, and trying to connect to monitor with some more or less random adapter, precisely one visible here. My monitor is Fujitsu-Siemens L9ZA, but I guess it shouldn't be of any problem, since trying to connect with VGA to my TV (where RPi works fine with HDMI) does not work either.

Are there any configs that should help me with this particular setup? Would it be different from Raspbian's once since I'm using Ubuntu?

/boot/config.txt gpu_mem has no effect

$
0
0

I put

gpu_mem=512

in /boot/config.txt (which file I had to create), and it had no effect.

grep memory /var/log/Xorg.0.log

returned only 2,839kB:

[   132.909] (II) FBDEV(0): hardware: BCM2708 FB (video memory: 2839kB)

Is there a newer way to change GPU memory? I'm on SARPi current with Linux kernel 4.9.70-v7-arm.

There was no /boot/config.txt file originally, but I do have a /boot/boot/config-armv7-5.4.31 file. What is that?

Who has Docker working (pi 4b)? What OS did you use?

$
0
0

First off I am running berryboot on the sd of my raspberry pi 4b so I can load/run raspbian desktop OS off a 480gb SSD. I hate not have running out of storage ever (this works fine). Issues:

Docker will not install on my raspberry pi 4 running Raspbian OS without using the aufs as it's storage driver. I have tried 5 different ways reformatting after each try so any docker stuff is gone. None one seems to be able to tell how to either switch storage drivers for the pi (docker documentation on this failed probably because it was for regular computer + os).

Aufs is a big problem because it is being depreciated and because I can't run anything with aufs as a storage driver apparently because the deamon always seems to fail to mount it appropriately.

So I give up on Raspbian and am dreading the possible errors for the other OS's so I would really like to know who has Docker running appropriately for 2020 fresh stable installs before I throw my raspberry pi at the wall in frustration (not throwing anything just feel like it).

Thank you community and stay safe.

Viewing all 49760 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>