Sonification of Wifi Packets

by chaotic*neutral @ 9:12 pm 30 January 2011

I used the stock Carnivore Library for processing to sniff wifi packets in local coffee shops to create a sonification of the data. An ideal situation would be to pump the sound back into the coffee shop sound system. In doing this, my collaborator and I came up with a few more wifi intervention ideas. But I will save those for a later date.

The next step after this is using LIWC, text-to-speech, to add more content to the project instead of abstracting the data.



//
// + Mac people:      first open a Terminal and execute this commmand: sudo chmod 777 /dev/bpf*
//                    (must be done each time you reboot your mac)
 
import java.util.Iterator;
import org.rsg.carnivore.*;
import org.rsg.carnivore.net.*;
import org.rsg.lib.Log;
 
HashMap nodes = new HashMap();
float startDiameter = 150.0;
float shrinkSpeed = 0.99;
int splitter, x, y;
CarnivoreP5 c;
 
boolean packetCheck;
 
//************************** OSC SHIT
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress myRemoteLocation;
 
void setup(){
  size(800, 600);
  ellipseMode(CENTER);
 
  Log.setDebug(true); // Uncomment this for verbose mode
  c = new CarnivoreP5(this);
  c.setVolumeLimit(4);
  myRemoteLocation = new NetAddress("localhost", 12345);
}
 
void draw(){
    drawMap();
}
 
void drawMap(){
  background(255);
  drawNodes();
}
 
 
// Iterate through each node 
synchronized void drawNodes() {
  Iterator it = nodes.keySet().iterator();
  while(it.hasNext()){
    String ip = (String)it.next();
    float d = float(nodes.get(ip).toString());
 
    // Use last two IP address bytes for x/y coords
    String ip_as_array[] = split(ip, '.');
    x = int(ip_as_array[2]) * width / 255; // Scale to applet size
    y = int(ip_as_array[3]) * height / 255; // Scale to applet size
 
    // Draw the node
    stroke(0);
    fill(color(100, 100, 100, 200)); // Rim
    ellipse(x, y, d, d);             // Node circle
    noStroke();
    fill(color(100, 100, 100, 50));  // Halo
 
 
    // Shrink the nodes a little
    if(d > 50)
      nodes.put(ip, str(d * shrinkSpeed));
  }  
}
 
// Called each time a new packet arrives
synchronized void packetEvent(CarnivorePacket packet){
// println("[PDE] packetEvent: " + packet);
 
  String test = packet.ascii(); //convert packet to string
  if(packetCheck=test.contains("fuck")){ // check for key phrase then send OSC msg
    OscMessage on = new OscMessage("/fuck");
    on.add(1.0); /* add an int to the osc message */
    OscP5.flush(on,myRemoteLocation);
    OscMessage off = new OscMessage("/fuck");
    off.add(0.0);
    OscP5.flush(off,myRemoteLocation);
    // delay(30); // test for latency
    }
 
 
 
 
  // Remember these nodes in our hash map
  nodes.put(packet.receiverAddress.toString(), str(startDiameter));
  nodes.put(packet.senderAddress.toString(), str(startDiameter));
  String sender = packet.senderAddress.toString();
  String sender2 = sender.substring(0,8); //pseudo anonymizing end user ip address
    OscMessage on = new OscMessage("/node_" + sender );
    println( sender2);
    on.add(1.0); /* add an int to the osc message */
    OscP5.flush(on,myRemoteLocation);
    OscMessage off = new OscMessage("/node_"+ sender );
    off.add(0.0);
    OscP5.flush(off,myRemoteLocation);
//    
//    
  println("FACEBOOK HIT = " + packetCheck);
  println(packet.ascii()); // print packet to debug
  println("---------------------------\n"); 
}

3 Comments

  1. Comments 1.

    ACRONYMS

    Haha video and all :)
    How do the packets get translated to a hig/low/repeated sound?
    The premade sound patterns sounded good.
    The PA system idea would be quite interesting to see/hear.

    I kinda wish this’d call the people out on what they’re doing? Like if you are going to pump stuff back in, why not pump in calling them out on the sites? An audible, vocal call of “facebook”? Maybe too unsubtle.

    I was thinking that, a way to subtly announce what people are searching for.

    Interesting. I wonder what kind of sonic patterns does packets create. If someone’s running a long poll, it would probably trigger a super high frequency beats or something.
    >> Interesting. The facebook chat effect.
    >> Also—Meg and Riley should share data. I want to hear what this sounds like on the entire CMU network.

    Cool. I like the sound, though I don’t quite understand how the packes generate particular notes.. what’s the criteria?

    Greate project! Thanks for sharing the code with all of us to play with :)

    I like the sound output. Good choice of beats and harmonies. Visualization could have been more dynamic.

    Neat idea. This is an interesting approach to the visualization since it is more sound based than visual. I wish that the significance of the sound was made clearer somehow, maybe through the visual component?

    Comment by Golan Levin — 4 February 2011 @ 2:59 pm
  2. Comments 2.

    The video is a little opaque — it’s difficult to understand what the sounds and spots “represent” in terms of the wifi traffic. Are you responding to certain words? What are your strategies for setting up packet filters such that you actually produce good/meaningful results. For a project that involves such “unethical” activities, you had a very timid touch.

    I think speech synthesis may be a big help — as you suggested. It produces a psychological event, rather than (“merely”) a musical one.

    Interesting idea to filter based on site url. Similar to the newstweak project. What was the processing visual supposed to represent? Was it necessary?

    Video was a little hard to follow – I was not sure whether we were listening to a single stream of the program, or if it was cutting as you were cutting the video footage. Not knowing much about the technical side of what you were doing, I do like the representation of wireless to sound. Listening to Golan’s comment, I think that the “subversive” nature of this project was definitely not as apparent as it could have been.

    I’m not totally clear on what the computer display is showing. Is each spot a packet? But I do like that the video shows your project in a real world location.

    Do each of the sounds correspond to different types of data?

    I think it would be worth while to delve deeper into the relationship between semi-anonymus web-serfing and a collective group experience in a cafe/restaurant/place

    I like your data source; I think the above comments are pretty spot on when they focus on the need to have a stronger connection between the sounds and the data.

    Fun idea that seems well-executed technically. Demo video would have been more impressive if it more clearly showed the ability of the program to play different sounds related to search queries or other types of packet information.

    Comment by Golan Levin — 4 February 2011 @ 3:00 pm
  3. Comments 3.

    Carnivore … promiscuous mode = slutty wifi card?
    need more video of it running, can’t tell relevant sound/visual mappings
    whats the x/y position and size of each node?
    could you search for image links and display them relative to the node, make a realtime layout with images

    pretty cool idea. I like the choices of sound. perhaps the sound could have been conversation chatter in a room, and the more activity, the more chatter you get. does the amount of notes correlate to activity at all?

    I had no idea there was a processing library for this – pretty cool stuff. I feel like there was a lot of opportunity to see the traffic divided up by host. It would have been fun to assign a different sound to each host on the network. Then you could alter the sound of the music by increasing your network activity. Just to echo Golan, location / color of nodes could have represented something.

    agree w/ the other comments here: cool technology behind it, the visualization could do more to reflect that. an idea: if there were some way to sniff out people looking at certain sites/types of data (fbk?), the visuals can still be abstract, but work to map out people doing a certain activity.

    very interesting use of Processing and onboard hardware. I agree with the timid aspect. If you are going to sniff peoples stuff via wifi I feel like it should be a little scary.

    cool idea, but can develop more. Maybe you can do something with the content of the packets.

    Comment by Golan Levin — 4 February 2011 @ 3:01 pm

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2019 Interactive Art & Computational Design / Spring 2011 | powered by WordPress with Barecity