Here's a simple test client for the Arduino Ethernet shield and Ethernet board. You'll need Arduino 1.0 beta4 or beyond.

Network from Matt’s home with a chimney to NYU :

Clear on how the bits got from matt’s to nyu through his router through isp through tiers... through nyu’s router through nyus provider to the server

DCHP : advantages: Dynamic, easier to juggle between routers (check this)

disadvantage: harder to track indiv. clients and be secure time warner owns routers facing outwards

telco hotels - travelling over wires under ground - ISP (internet service provider) routers

MAC addresses : A Media Access Control address (MAC address) is a unique identifier assigned to network interfaces for communications on the physical network segment. MAC addresses are used for numerous network technologies and most IEEE 802 network technologies including Ethernet. Logically, MAC addresses are used in the Media Access Control protocol sub-layer of the OSI reference model.

-the hardware

 has IP or an  address... for that device, given by a company, to have that code linked to that device - (an actual ethernet hardwares address)

DHCP does it dynamically, but if this doens’t happen - then it is assigned an ethernet address (this is why palm server easy to run each year - it has the same address) -you have to register your MAC through the network ID

-arduino ethernet controller - on the back it has its MAC address / ethernet address (so you’ll go to maroln and give him that number so he’ll assign it that IP address so you can use it on the nyu network)

A router is a device that forwards data packets between telecommunications networks, creating an overlayinternetwork.

tier 1 networks

(FYI - T mobile is not a tier 1 network) -people are upset tmobile is merging with AT and T at and t used to be the entire network - (remember last week what he was saying about them not having to please the clients because they had entire control)

The map of the internet

TRACEROUTE: Tool to use how data goes across the network traceroute is a computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network.

in Terminal:

172-26-15-34:~ administrator$ traceroute

.ly = libya -

traceroute to (, 64 hops max, 52 byte packets

 1  * * *
 2  * * *
 3  *

(traceroute turned off on wireless)

looking at the route between and ITP visual trace rt - youget signal -

did not finish - *** got these signals some people turn off diagnostics, perhaps to optimize...

paul beren and the beginning of the internet - network with totally decentralized traffic - so if something blows out one hub, network can be redirected through another hub -similar with eisenhower hiway system we should have used his model of decentralized hubs

There are physical wire connections - phones (remember the 1988 storm story) - telephone wires: relays would switch from one to the other - massively inefficient - from a data standpoint - but from quality... it is ok

SO - what happens when we change all that out? (like automate everything) -see how routers monitor roads and traffic lights etc - sensors built in... -an IP network - that is independent of the internet : the city has laid all wire fiber from far edge of queens to staten island with no connection to providers like AT&T in middle

why: (don’t trust AT and T, don’t want people to know, you pay for investment then it’s free...)

Tom started teaching this class when there was nothing but telephones between subways

Isenberg’s stupid network: He was writing about it at a time when TELCOs were take voice tracking to data tracking - just had broken out with monbell communication?

Barabasi: “LINKS” - example: webt down because of bad routing table - link failure in order to optimize - routers trade info with each other Therefore, one mistake propagates....

TCP and UDP assempble the packets of information- packets are given numbers Session: any packets between the two endpoints (transmitter - receiver) is a session Number the packets: the sender should number those packets, in case they are received out of order Limit: overload: can lead to denial of service attack - can happen if you jam too many packets at it

UDP : broadcast address: .255 broadcasted to every other machine on your subnet

Serial to Ethernet: WiPort: Lantronix provides device networking and remote access products for remote IT management allowing remote computer access and offsite device control.

you can find any lantronix device on subnet by send out packet on UDP with .255 sent to every device on that port - these devices respond to that particular address, and say who they are... so, if device on a network doesn’t have a ?.. you can easily see the only way to see it is by sending it a msg through the netwk

PING sends a message to a network to say are you alive Ping is a computer network administration utility used to test the reachability of a host on an Internet Protocol (IP) network and to measure the [[|round-trip time] for messages sent from the originating host to a destination computer.

In Terminal: ping ping -c (-c is a flag which is a parameter)

commands: nslookup, ping, traceroute - diagnostic tools to look at machines, see how tracking is going

who decides what names go with what numbers? '''ICANN Internet Corporation for Assigned Names and Numbers '''-assigns name to numbers, to register your address

So, from Matt’s home, when the server wasn’t up we can’t communicate to pong - why not? either: -firewall: so can’t go from port 80 to other ports... -machine turned off: we had an address to the machine go into account with nyu, start a session, login to nyu ? then start command session then start ssh or use telnet

what is telnet: just a program that opens a TCP socket Telnet is a network protocol used on the Internetor local area networks to provide a bidirectional interactive text-oriented communications facility using a virtual terminal connection. User data is interspersed in-bandwith Telnet control information in an 8-bit byte oriented data connection over the Transmission Control Protocol (TCP).

one problem: not getting feedback - no way to know what’s happening

But if there server were giving us feedback : there’d be lots of traffic -

SO: how to manage traffic - therefore how to get feedback out so it seems like real time

'''how can we get to internet: tom shows us examples of boards''' tiny board DALLAS semi conductor - write a java server, burn server onto board with connector - then had embedded net control to put in project. running like a full on computetr - multi threading etc just slow.somewhat inconvenient

other devices:

small -internet connector: read pins in parallel, form those into bytes, then extract from the bytes the packets you need - can get anything but lots of work

ethernet controller chips - many out there on the market basic stamp

PIC attached to old school wifi card written a full TCP stack with the PIC

“jeremy benthem” wrote book how to do it (also wrote in the 1700’s on panopticon)

SERIAL to ethernet converted - serial on one side, ethernet on the other through serial port - connect to ethernet devices. (wiport)

adafruit ethernet shield - Xport to wiznet arduino ethernet shield or ethernet instead of usb adaptor it has ethernet - processing libraries power over ethernet P.O.E controller - needs two of the extra lines to connect

beware of fake power of ethernet - standard p.o.e. device it wont work - because only sends like 12 or 5 V not 40

What is a switch / hub switch: way to manage traffic to beyond devices hubs are like repeaters - take in info and pass them on

'''MAKE controller IXP connect between hosts''' An Internet exchange point (IX or IXP) is a physical infrastructure through which Internet service providers (ISPs)exchange Internet traffic between their networks (autonomous systems). (one of the places where the internet is plugged in - see heavy hubs - telco hotels)

USB serial adaptors: FTDI serial adaptors. Have chip and pinout lots of companies start to use that a standard for USB to serial but you need a usb-to-serial converter to do it: plug in to jack, not to the ftdi (side note: chip manufacturers are moving away from DIP) throughole is so... stock up!

Now: program Arduino using 1.0 beta changes from 0022 make it incompatible

ALL code is in github repo:

Arduino examples :

 serial to ethernet

webclient - web request, bring you back results chat server web server

THe ethernet shields and boards can be readdressed, so you can change them

Arduino example webServer.ino

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };//give it the mac address IPAddress ip(192,168,1, 177); //that marlongives me

up and running, then go to 192,168,1,177(or tom’s address - THEN see screen with “analog input is...”.... (just html, see it in view source)

-say you want graph over time - must save it on arduino (values) because that is the server client needs to save the info itself or write JS that constantly reads it and graphs it... or arduino can be client... with tinkr shield and a joystick - two analog pins, a0 and a1

see in code - reads once - then prints it

when we get a client : terminal: telnet 128.122. 151.0 80 get http header then what came after

in Arduino : see that client is available, then make a connection

 while (client.connected()) {
      if (client.available()) {
        char c =;
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, (so we’ve just had TWO new lines in a row... (GET /HTTP/1.0)

new line

//the http request has ended,

        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");//look for an HTTP request 
          client.println("Content-Type: text/html");

//send out an http header then print out values

          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            client.print("analog input ");
            client.print(" is ");
            client.println("<br />");

  if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;

-the two blank lines at the end, say, ok i’ll give you all i’ve got: then write to the page

take a look at: Making Things Talk 2: Chapter 3, on getting host requests and: chapter 10 - responds to host requests reads sd cart for html files

clinet.println("H1 color=#00FF00>HI there class!</H1>");//basically you

            //can write your own html here

use this page as a collector of urls NOTE: once you’ve connected to a network - you can have the power to write everything else on the network to work with

GITHUB is a versioning tool many people can write code, all upload to the repository, it sinks everyone’s code you can look at the commits -

-through a git client, you can subscribe to a repository, just hit sink and pull down new code

IP Address server (128, 122, 151, 161) connect at port 8080

+ serial.write - binary serial.print - ascii+


SO NOW through the serial port you can write to it and pong moves

marlon can set up a hub so many us can connect think about how to manage traffic flow - add some tolerance, … or look for peak - With peak - have to go to edge, whereas with tolerance, it can go slightly over -Any network - set up so even in the most basic program it doesn’t send your characters all the time - put a short delay (10) -so make a controller: with phone or ethernet shield or laptop client - -it will be left up all week so you can test it if it is quit - “balldrop server” .161 is address

for multple paddles, you need multiple logins

so, if you’re going to use hardware - give marlon the MAC address

as long as write to internet and get to that address - thats good pachube-

online service that alows you to do data logging and visualize it now: .ino is arduino

'''Command line: '''BASIC movement of file on the command line connect to a server and upload files fetch, transmit, cyberduck - a gui client eclipse, coda - a text editor that connects directly Terminal: uses the same ssh and .. protocols

pwd, ls, ls-l gives me a list or a detailed list; print working directory d are directories, who owns them and what they can do

file listing and permission so get to know pwd, ls, and ls -l also “ls -al”

. files are invisible usually you can see all the stuff on the command line since opened session

less .bash_history less is a program the shows you a test file less .ssh

how to find out if it’s a directory or a file ls -la .ssh

less -la .ssh/known_hosts is what they use to encrypt stuff in between list files and see whats in between files

hit q to get out

server programs like this on a server - if the server PROGRAM is not running it will not respond if you try to connect to it -

pong server test to see if you get the protocol right - if that works itp/student check to see how to log in