Close

Event Capture and Recording with Raspberry Pi (Part 2a)

A project log for Cosmic Array

An array of cosmic ray detectors across a landscape that demonstrates in light and sound how cosmic rays are constantly all around us.

paul-schulzPaul Schulz 07/02/2017 at 14:330 Comments

Transmitting Events over the Network

I thought that I would split this next series off log entries into short pieces that I can write up as they are completed.

Programs and code seen here will be made available via a Github repository in due course.

The following image shows the program on the Raspberry Pi3 (udpsend) transmitting data across the network to a server (called 'block') which is listening for the packets (on UDP port 333, via the netcat/nc program) and printing the data as it is received.

The udpsend program is currently sending one packet per second of test data. The next version will be triggered by a pulse on a GPIO line (see previous log entry) which will then transmit a packet with the details to a listening server.

The choice to use UDP packets instead of TCP means that there is no additional overhead in the reception of data across the network, and also allows incoming data to be received form multiple sources.

Wifi and Ethernet collision detection, avoidance and re-transmission should handle the case of small cosmic ray detection cascades, The affect of congestion on packet loss when large numbers of detectors (100's) and events are present will need to be investigated in due course. In the first instance, It may be necessary to reduce the data sent in an event packet.

The next log entry in this series will discuss the capture and transmission of actual events from a single detector.

Discussions