Questions tagged [sockets]

A network socket is network interface- and endpoint of an inter-process communication flow across a computer network. As sockets are the basis of all networking, this is for questions about how to use this low-level interface when programming on the Pi, in any language.

Filter by
Sorted by
Tagged with
3
votes
1answer
2k views

Communicating between two Raspberry Pi's

I'm working on a project that uses two Raspberry Pi's. The idea is that I have one running at home, which stores all the files that I need to execute. I will take the other Raspberry Pi along to ...
3
votes
1answer
5k views

Having trouble sending audio data over TCP using Sockets to raspberry pi

I am trying to do something like a walkie talkie. 1 device is my laptop and the other being the raspberry pi. What I have working. I am able to record the microphone, transmit it over a socket and ...
2
votes
1answer
10k views

Freeing up cache when memory is low

I have my raspberry pi A+ in my embeeded project and every byte of memory is important when I've only got 128 MB to my CPU (I need 128 MB for the GPU because I use the camera module). Unfortunently ...
2
votes
2answers
84 views

LIRC could not connect to socket

After installing on Raspberry lirc-0.10.1 according to this instruction (Setup IR Remote Control Using LIRC for the Raspberry PI (RPi)), when you try to send data from any config file, the irsend -d /...
2
votes
2answers
1k views

using try-catch to catch gpio interrupts

Is it possible to interrupt a try-except code in python with gpio interrupt to generate exception? In the "try" part i'm openning a socket and use socket.serve_forever(). I want to make a hard-reboot ...
2
votes
2answers
294 views

I'm trying to run a python script at boot but keep getting “socket.error: [Errno 111] Connection refused” error

I've bought my first Raspberry Pi 3B+ last week and started working on my project but I seem to be stuck at this point. I've looked through a hundred different posts but none of the solutions seem to ...
1
vote
1answer
43 views

When socket programming on raspberry pi, getting ConnectionRefusedError

I am working on a simple project where I need two raspberry pi's communicating each other with an ethernet cable. I connect one end of ethernet cable to let's say first pi and the other end to second ...
1
vote
1answer
88 views

Can I use the USB connector to transfer plaintext data (via serial console / socket) to a linux PC?

I have a script on my pi that currently simply outputs some numbers from a sensor to the console, several times a second. I am using this for a demonstration, and need a way to reliably (not over the ...
1
vote
2answers
8k views

TCP Communication with Android via wifi

I will be creating an Android app to control the brightness of a LED. For this, I will want the Raspberry Pi and Android Phone to communicate with one another via Wifi. I don't need the RPI3 access ...
1
vote
1answer
3k views

Unix Domain Sockets: errno 111 Connection refused

RPi3, Raspian Jessie, Python 2.7. Hello all, I am struggling trying to do an IPC using Unix Domain Sockets. I had it working some months ago, but alas, I can't seem to put my hands on those images ...
1
vote
2answers
2k views

Permission denied opening UDP socket with static IP

I have made a Linux program that sends UDP packets to a lighting controller. This works under both Ubuntu and Mac OS X. I configured an ethernet port to have a static IP address (with the correct ...
1
vote
1answer
1k views

C++ / javascript Socket controlled car [closed]

I'm trying to use C++ sockets to control my rpi car/tank , but I'm a bit confused . My goal is to have an html interface with a onscreen joystick , and use javascript to send X and Y coordinates ...
1
vote
1answer
175 views

Raspberry Pi vs Host computer socket communication [closed]

So I got the connection timed out error (error 110) This is the IP address I got from ipconfig /all: And this is the code I use for client (the RasPi): import socket TCP_IP = '192.168.2.52' ...
1
vote
0answers
46 views

Using RPi as DAQ for PC

I am quite new to using RPi, but my experience has been great so far. I am hoping to achieve just one more thing. I have 4 ADCs hooked up to my RPi using I2C, and I am sampling at roughly 800 - 1000 ...
1
vote
0answers
459 views

Sockets stopped working

I have set up a home automation using a raspberry pi b+ V3 as the brains main part and raspberry pi zero's located around the house at different points. I have one pi zero beside my heating, this is ...
1
vote
0answers
655 views

Can't connect to my Raspberry Pi 3 with a socket

I want to use my Raspberry Pi 3 as a server so I want to connect it via a socket. At first time everything was fine but now I cant connect any more. I get this error: ConnectionRefusedError: [...
1
vote
2answers
6k views

running npm install throws permission error

Following these directions to install nodeJs and socketIO on a Raspberry Pi http://www.bartbania.com/index.php/build-your-own-google-tv-using-raspberrypi/ When I try running npm install get the ...
0
votes
1answer
318 views

Perfornance communicating through local loopback

I have a Client/Server application where the Server runs on one rpi and communicates with a client running on another rpi. They communicate using Tcp Sockets. I'm going to do a spin-off application ...
0
votes
1answer
9k views

how to receive incoming data from tcp socket

I need to catch incoming data from tcp socket at any time and then execute a python script on my Raspberry Pi. How do I do that? I hope that you understand what i need to do.
0
votes
1answer
439 views

TCP server on raspberry pi not connecting to android tcp client [closed]

I am creating a TCP server on raspberry pi so that i can control it from my android phone over WIFI. I have connected both the pi and the phone to my WIFI router. import socket from cookieLED_FINAL ...
0
votes
1answer
354 views

How to stream data to device using adhoc connection?

I have a Raspberry Pi Zero W running Raspbian OS which is connected to a few sensors. I can broadcast the sensor data from the Pi to my Android tablet for display. I've written a UDP socket/client ...
0
votes
2answers
2k views

SD Card Socket from Raspberry Pi 3 - Part Number

Does anyone know the part number of the Micro SD Memory Card Socket Slot for the raspberry or where can I buy the same socket so to replace it?
0
votes
1answer
585 views

Sending IP by email on sturtup [closed]

I'm trying to make my RP accessible over shh on WIFI, but I don't have control over my router (I live in student dorms) and I cannot config a static IP, so I wrote a python script that will get the ...
0
votes
1answer
4k views

How can transfer files between RPI and Windows PC via Bluetooth_OBEX?

I try to build computer program that trasfer files use Bluetooth and OBEX technology between Windows and RPI. I use BLuetooth RFCOMM Server @ Windows Side. RPI is @ client side. I use pybluez and ...
0
votes
0answers
36 views

Python socket.accept not getting connections?

I run the same Python program on Raspberry and Windows laptop to listen to a blood pressure device over peer2peer UTP cable (no router). import socket s = socket.socket(socket.AF_INET, socket....
0
votes
0answers
64 views

Sending data between PC and Raspberry Pi

I have been trying to send data from my Windows PC to my Raspberry Pi 3 for a python controlled speaker project. I am using TCP sockets which I don't know much about. Client code (PC): import ...
0
votes
0answers
32 views

Cannot turn web streaming into a function

I'm working on a project with my Raspberry Pi 0 and a camera. I'm writing my code in Python using the PiCamera module. This file handles setting up the camera and Starting Web streaming. I had no clue ...
0
votes
0answers
19 views

How to send data across usb0 to use in pygame?

So i have a pi3b+ and a zero hooked up to a tft ili9341 display. I can run pygame on boot and it works fine. I have also started using python sockets and successfully sent data (my wlan0 ip) from my ...
0
votes
0answers
34 views

How do I make my RPi talk to my PC over an Ethernet Cable?

My PC is running Windows 10. I'm working on establishing communications from my RPi to my PC via an ethernet cable. I've set up static IP addresses for both the PC and RPi on their respective ethernet ...
0
votes
0answers
256 views

2 way Socket communication over bluetooth using python

Is there any way to make communication with 2 RBI over bluetooth using python Socket? Do you have some tips how can i do it? Should i use multithreading? Right now i'm using this lib -> https://...
0
votes
0answers
119 views

Not receiving any data via Bluetooth connection

I'm trying to send data from a ps3 controller to my Raspberry Pi, but the code I'm using does not pick up any data sent from the controller. The controller is connected yet nothing happens when I ...
0
votes
1answer
174 views

Camera feed sent through TCP socket gets stuck sometimes

I am getting the camera feed from a camera on a Raspberry PI to the computer using a TCP socket to use it for openCV. It works well with minimal delay. However, sometimes the frame gets stuck(freeze) ...
0
votes
1answer
35 views

Socket Over Non-Internet Access Point

I want to use a Raspberry Pi as an access point that is not linked to the internet. If I connected one other device to that access point, how could I connect a socket between this access point and the ...
0
votes
2answers
145 views

When I try to call port 80 python program stop and says permission denied when ms.bind((host,port))

import socket ms=socket.socket(socket.AF_INET,socket.SOCK_STREAM) host="192.168.0.159" port=80 ms.bind((host, port)) ms.listen(5) while True: conn,addr=ms.accept() data=conn.recv(1000) if not ...
0
votes
0answers
138 views

Simple socket server taking up 75% cpu

I've made a socket server to listen for data to play a sound for a length of time. All is working fine, except I see that cpu runs constantly at 75%, and after some time I get an overheat warning. I'...
0
votes
1answer
1k views

script works in command line but doesn't in shell

I am using scapy to send a packet. which works fine in command line under the code. send(IP(dst="www.google.com")/ICMP()) But when I try to send it inside shell it throws an error. The code I am ...
0
votes
1answer
691 views

ultrasonic sensor stops after giving some reading when running in thread on tornado websocket python

I am using Ultrasonic sensor to get reading and am using python program for getting reading. And am using Raspberry pi for this. when am running python program independently its giving me reading ...
-1
votes
1answer
167 views

AF_BUS on Raspbian

Dear RPI SO Community :), I want to try the AF_BUS Patch but I don't get what I need exactly for it. AF_BUS optimizes the performance of D-Bus in latency and throughput and I am working on a ...