# the NSA selector

Eurorack module that listens into Ethernet

- **Seller:** [wenzellabs](https://lectronz.com/stores/wenzellabs), Rosenheim, Germany
- **Price:** €84.00 (EUR, before shipping and taxes)
- **Availability:** In stock
- **Categories:** Synth, Ethernet
- **HS code:** 92099400
- **Product page:** https://lectronz.com/products/thensaselector

## Options

**Kit or fully assembled**

- Kit (15 left)
- fully assembled, no soldering required [Add €11.00] (10 left)

## Links

- [Documentation](https://github.com/wenzellabs/the_NSA_selector)

## Images

![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5NzgsInB1ciI6ImJsb2JfaWQifX0=--f166963d6ca75e66154c5a309130fdc4bb1a6190/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/NSA_selector_lemon.jpg)
![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5ODIsInB1ciI6ImJsb2JfaWQifX0=--e2c004cdd9cb77440d374cdffac4c91da51874eb/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/NSA_top.jpg)
![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5NjUsInB1ciI6ImJsb2JfaWQifX0=--cfff2d453e91d04ba494156659abb79fdc468fb8/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/NSA_back.jpg)
![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5NjEsInB1ciI6ImJsb2JfaWQifX0=--fb2d60990c6edc0ce80976f782307479e252a49c/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--970c165836a83091725a1a0fd4f37ce9408da1bf/NSA_front.jpg)
![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5ODYsInB1ciI6ImJsb2JfaWQifX0=--578633d1ae518d4c21d191cec124783a250b0a33/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--605f1da017bcbb03ce31845cd0e81d97e3b3c574/NSA_selector_switch_schematic.png)
![the NSA selector](https://lectronz-images.b-cdn.net/lectronz/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6Mjk5OTAsInB1ciI6ImJsb2JfaWQifX0=--69bc7a21a0eeb2d2752cb6de689d50585c82c694/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls5NjAsNjQwXSwic2F2ZXIiOnsic3RyaXAiOnRydWV9fSwicHVyIjoidmFyaWF0aW9uIn19--605f1da017bcbb03ce31845cd0e81d97e3b3c574/NSA_selector_LAN_flow.png)

## Description

# the NSA selector

![the NSA selector top](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_top.jpg)
![the NSA selector front](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_front.jpg)
![the NSA selector back](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_back.jpg) 

## the video

watch [the NSA selector video](https://www.youtube.com/watch?v=vfgySTaM1TI)

## what is it

the NSA selector is a eurorack module with two ethernet jacks and one audio output.
any bit on the network will be sent to the audio output.

![the NSA selector schematic](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_selector_switch_schematic.png)

## what it's not

this is not an "audio interface". we do not play back any "format" such as RTP
or MP3 or WAV ot the like. the eurorack module does not "speak" any protocol.
all traffic is forwarded from one network jack to the other unmodified.
it's just tapped, intercepted to convert it to audio.

## examples

watch [the NSA selector video](https://www.youtube.com/watch?v=vfgySTaM1TI)

![the NSA selector LAN flow](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_selector_LAN_flow.png)

### sequencer script

in the folder [`sequencer/`](https://github.com/wenzellabs/the_NSA_selector/tree/main/sequencer) you find a very simple shell script, that mimics a
sequencer by network pings of different size.

### plain image transfer

if we transfer uncompressed, unencrypted images e.g. in the .bmp format,
we can hear the pixels. together with a small http server which is available
in the [`fileserver/`](https://github.com/wenzellabs/the_NSA_selector/tree/main/fileserver) folder. you can listen to your photos or drawing from
gimp (or photoshop in case you're a rich musician).

### encode audio to NSA's native format

the NSA selector's native format is 4 bits and 25MS/s which originates from the
typical PHY MAC interface called [MII](https://en.wikipedia.org/wiki/Media-independent_interface).

at first glance 4 bit audio appears to be really crappy, but we can use the
ridiculously high sample rate. what we need is called a delta-sigma modulator.
this lets us convert a simple mono 16 bit 48kHz .wav file to a 4 bit 25MHz
.nsa file.

note that this saturates the link and through the added headers from ethernet,
IP, UDP or TCP and HTTP you'll get artifacts. and happy litte retransmissions.

far from HiFi quality, but the method adds a lot of spice and excitement.

there's a converter in the [`upconverter/`](https://github.com/wenzellabs/the_NSA_selector/tree/main/upconverter) folder.

### network overhead

here's what a network packet can look like on the wire:

![the NSA selector network packet](https://raw.githubusercontent.com/wenzellabs/the_NSA_selector/refs/heads/main/pics/NSA_selector_network_packet.png)

and we're listening in on the "4B" side of the "4B5B encoding" layer.
so the first bits we hear are [the preamble of the ethernet frame](https://en.wikipedia.org/wiki/Ethernet_frame#Preamble_and_start_frame_delimiter) and we follow up the stack. e.g. ethernet, IP, TCP, HTTP, BMP.

### delay, oversaturation

there's a neat little idea I had during development to add a delay to say a
sequencer pattern. actually it's more like an echo than a delay since it lacks
precise timing control.
ssh log into the remote machine that creates the e.g. ping traffic. then dump
the network traffic to the text console to double it. you can increase verbosity
levels of the dump to crank up the echo until total saturation of the link
and lost captured packets. see the video if this explanation is not clear to you.

commands I usually use:

`tcpdump -ni eth0`

`tcpdump -nvi eth0`

`tcpdump -nvi eth0 icmp`

`tcpdump -nvxi eth0`

`tcpdump -nxi eth0`

`tcpdump -nxi eth0 not port ssh`

### other network traffic

be creative!

there's so much I hadn't been listening into, like

- online games - I guess a wide variety is waiting here, and some will be very distinctive
- doomscrolling on the various platforms
- network backup
- IoT stuff
- remote desktop protocols
- write your own code
- bundle together ping, netcat, socat, nmap and whatnot and make them MIDI controllable through a software registered MIDI client

if possible disable encryption, then you can profit from not only timing
pattern (of white noise), but also listen in on the plaintext payload.
the NSA loves plaintext.

## the tech bits

the NSA selector is a fast ethernet (FE=100Mbps) network switch with three
ports. the two front ports are switched, and the third port is only available
internally as 4 bit MII bus. it is configured as mirror port of the two front
ports and wired to a 4 bit DAC and a low-pass-filter.

- 4 HP wide
- 55 mm deep, not exactly skiff friendly :(
- current consumption:
    -  12V : 100mA
    -   5V : nothing
    - -12V :   2mA

## assembling the kit

both versions are available in my store, a fully assembled eurorack module
and a kit version where you have to solder on the front plate.

watch my [NSA selector kit assembly](https://www.youtube.com/watch?v=SXlfyeYuZuQ) video on youtube.


## Shipping policy

We will try to ship in-stock products within two to three business days.
For international customers outside the EU: Import duties, taxes and all other fees are the recipient's responsibility.
