Class Notes Sept 17th

Discussion of Readings

  • You start with the core of your network. The web, for example, but any network in which links are directed. The core is those nodes which are linked both ways.
  • inward directed links: node which there are no connects to them, but there are plenty from there. ex. being on nyu's servers
  • outward directed links: those that have links from the center but don't actually link to anything
  • islands - links that aren't connected to the center at all. in some cases they're connected to each other but not to the center. ex., security cameras
  • 4 Continents: Pg 166 in Linked
  • There are a lot of nodes on the internet are like islands, although more of the internet are the first three, i.e. connected elsewhere.

Whole point of scale free networks is that it's the same at every scale. Two factors that go into choosing links on a network:

  1. how many other nodes does that node have connection to. desire to connect.
  2. growth in general. desire to connect with someone w/ more links to you.

Majority of links are contained in a small number of nodes and the rest are spread out in other nodes.

Autonomous Systems - doesn't mean it's not connected, it's a group of machines on a network that can function on their own when detached form it. We divide the net into these functioning AS zones. AS around AT&T, etc., which will handle all the routing within that AS than the routing across to another AS.

What happens when nodes disappear from the network? You see longer message trails. Phase change is the point when all nodes in a given collection have connections between them....phase change can become undone when major hubs get disconnected.

Discussion of Google, NSA, internet traffic and regulatory bodies. Bruce Schneir, ICANN, IANA, BGP, One of the reasons Google is interested in maintaining openness is b/c they want to lessen the effect of one regulatory body effecting their work.

-----

Sockets

what are they used for?

Path to connection from a client to a server.

Keyhole

Portal to sessions - when we set up a socket connection to two sides, we assume it will stay open until we're finished. http connection to a server = port 80. we exchange information, then close the session

Low numbers reserved for applications that are popular and common.

As more applications come on they take a higher number.

Custom applications head into ever higher numbers.

Default is to close of most ports that are not in use.

Processing Net Game

ip address: 128.122.151.236 to get in, open terminal and type

telnet 128.122.151.236 8080

Think about network communication.

Build a physical client for this game.

Build something that connects to it and at the very least you push a button to control it.

Even if they can't see the screen, it should tell them if they're connected or not.

How else could you change the rules on the client side

Functions of the net class and possible net clients you could build this with. You could build a device that could connect to your computer

  • several wifi shields
  • ethernet shield
  • Rasb pi, beagle bone, yum

Think about user experience and how it can be improved

Processing libraries on Tom's github.

A socket is only active if there's a program listening for it.

When we talk about breaking into a server we try to get the program to break down and use its error messages to speak to other parts.

Wifi client Different approaches to each board.

Wifi shield

  • Using SPI. Making different requests to wifi shield about network connection status and data coming over it. BAsic setup and loop.

Rasp Pi

  • Linux box. Using sysfs - part of file system.

Beagle Bones

  • Have analog inputs. You can write a script to read from the physical I/O and then do network connections exactly as you would on a Linux box.

Arduino Yun

  • Arduino Leonardo speaking serially to a Linux processor.

The model for using it is that the linux processor will do network things. The I/O will be done physically.

From a UI perspective, what model works well with different client groups?

Arduino-based Network Connection A3, INPUT_PULLUP - joystick pushbutton, another example of resistor wiring

Arduino Shield communication

ssid: talk to Marlon or Karl pw: talk to Marlon or Karl

The network is mac-address filtered. In order to get on it, the device you're using has to be preregistered.

Talk to Karl or Marlon and when you have a device give them the mac address.

Set up client, set up the server, give it the IP address (128,122,151,236).

Wifi status is always are we connected or not.

Code is here

Arduino YŚN

arduino.local/ in browser to get the configuration screen

designed so that you should be on the same wifi as what you're connecting

OS's take a while to start so don't restart that much

YŚN has a separate processor on board - can go to appropriate ip address as the YŚN

ssh root@ipaddressofYŚN

login with password

then you have a command line for the YŚN

WifiStatus arduino library

blocking function - one that will stop the program running until it's finished doing its business. can leave telnet running and then get bytes back curl is a command line script to get a http request. can also do GET and PUT requests

Raspberry Pi

The cheap way Need an SD card. Level shifter that adapt 5V to 3V parts To connect a Raspberry Pi

  • 4 wires - power, ground, transmit, receive.
  • plug it in
  • connect to it serially, open a serial terminal
  • ex. screen ls /dev/tty.*
  • screen/dev/tty.usbserial 112500
  • login: pi
  • pw: raspberry

Adafruit's tutorials here

dmes (dmessage) if you need to review it

sudo ifconfig

A few useful links for setting up embedded systems:

Adafruit's pages on: