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.
Questions tagged [sockets]
52 questions
3
votes
1 answer
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 save the recording audio into a wav file.
Only issue…
zyeek
- 131
- 1
- 4
3
votes
1 answer
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 work to demonstrate something. For example:
I'm…
Phorce
- 623
- 1
- 8
- 15
2
votes
2 answers
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 work for me.
Brief info on what I'm trying to…
Revam
- 23
- 3
2
votes
1 answer
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 the memory is eaten up by linux quite…
Linus
- 529
- 1
- 7
- 17
2
votes
2 answers
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 to the program, using a reboot button that is…
Diagnosis
- 39
- 4
2
votes
2 answers
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 following error
Please try running this command…
user2005121
- 133
- 1
- 2
- 5
2
votes
1 answer
socket: Address family not supported by protocol error on raspberry pi 3b+ with xenomai
I have been trying to run the xddp-label.c example as given in the xenomai documentation on my raspberry pi model 3b+ with xenomai patched kernel. I can compile the program just fine, but when I try to run it I get the error: socket: Address family…
Yousousen
- 31
- 4
2
votes
2 answers
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 /dev/lirc0 SEND_ONCE devinput-32 KEY_POWER command…
Michail Gorlov
- 33
- 1
- 4
1
vote
1 answer
C++ / javascript Socket controlled car
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 trough socket . I googled , but there are too much…
Forzaferrarileo
- 11
- 2
1
vote
1 answer
Raspberry Pi vs Host computer socket communication
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'
TCP_PORT = 5005
BUFFER_SIZE = 1024
s =…
Anh Tran
- 111
- 3
1
vote
1 answer
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 network) stream this data to my Linux-based…
Ethan McTague
- 111
- 3
1
vote
0 answers
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 Hz from each ADC individually. I would like to…
J_B
- 11
- 1
1
vote
0 answers
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 connected to a relay via gpio which turns the…
Browners
- 11
- 2
1
vote
2 answers
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 point to be a working internet, as long as it…
Marcus
- 31
- 1
- 1
- 8
1
vote
0 answers
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: [WinError 10061] Es konnte keine Verbindung hergestellt…
Flajt
- 71
- 1
- 2
- 10