DXARTS 472 - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

DXARTS 472

Description:

RS-232 is relatively slow, serial and operates over short distances -- 15 - 50m max. ... Developed at Center for New Music and Audio Technologies (CNMAT), UC Berkeley. ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 10
Provided by: chadk7
Category:
Tags: dxarts

less

Transcript and Presenter's Notes

Title: DXARTS 472


1
DXARTS 472
  • Lecture 10 Network Software

2
Computer Networking
  • Computer networking can be defined as
    communications between two or more computers.
  • Using the Arudino and Processing, you are already
    familiar with one type of computer networking
    RS-232 communications.
  • RS-232 is relatively slow, serial and operates
    over short distances -- 15 - 50m max.
  • It is a standard that is incorporated into many
    electronic devices -- sensors, computers,
    displays, etc.

3
Network Protocols TCP/IP
  • In order to communicate over larger distances --
    computer to computer -- we typically use either
    TCP/IP or UDP
  • TCP/IP (Transmission Control Protocol/Internet
    Protocol) is a core protocol for Internet
    communications.
  • www
  • E-mail
  • ssh
  • We use it to allow different machines to run
    applications that can connect to each other, and
    exchange streams of data.
  • An application will communicate with TCP, which
    formats data for sending. TCP sends the formatted
    data up the stack to the IP for transmission to
    the other computer.
  • The TCP gives each transmission a sequence
    number, and sends an acknowledgement for any
    received message. This way, both computers TCP
    modules can confirm receipt of whatever data they
    send.
  • This makes TCP/IP robust and reliable, capable of
    recognizing when packets of data are lost or
    damaged.

4
Network Protocols UDP
  • UDP (user datagram protocol) is a simplified
    version of TCP/IP that sends short datagrams
  • It does not authenticate and verify the arrival
    of data packets, making it quicker but less
    reliable than TCP/IP
  • Messages sent via UDP will not necessarily arrive
    in the order they are sent
  • This makes it well suited for fast, lightweight
    applications, such as microcontroller
    communication, real time audio, online games,
    etc.

5
Network Ports
  • In both TCP/IP and UDP, we send data packets to
    specific port addresses on remote computers.
  • This way, different kinds of data can be sent to
    the same machine simultaneously.
  • We use a 16-bit number (1-65535), that is agreed
    in advance between the sending and receiving
    machine.
  • Certain port numbers are reserved
  • FTP(21)
  • Telnet(23)
  • SMTP(25)
  • HTTP(80)
  • Typically ports 1-1023 require authorization to
    use

6
Routing
  • When packets are sent using TCP/IP or UDP, we can
    select a range of different paths for them to
    follow.
  • Anycast
  • one-to-many message is sent to one of several
    possible addresses
  • Broadcast
  • one-to-many message is sent all available
    addresses simultaneously
  • Multicast
  • one-to-many message is sent to a range of
    addresses simultaneously
  • Unicast
  • one-to-one message is sent to one specific
    address

7
OpenSound Control (OSC)
  • Developed at Center for New Music and Audio
    Technologies (CNMAT), UC Berkeley.
  • OSC is a protocol for communication between
    computers, sound synthesizers and multimedia
    devices, particularly audio-related.
  • connect sensors to musical instruments
  • receive data from several performers
    simultaneously
  • networked performances
  • Ported to many software platforms, including
    Processing, MAX/MSP, Python, etc.

8
OSC in Processing
  • Typically OSC messages are sent between computers
    using UDP.
  • In Processing, we can use the oscP5 library
  • http//www.sojamo.de/iv/index.php?n11
  • OSC messages consist of an address in the format
    /bob, followed by type identifiers i
    (integer), f (float), s (string), etc.
  • /bob, f, 0.2

9
Lab Exercise
  • Work with a partner to establish an OSC
    connection between your computers.
  • Write Processing code that makes an event occur
    remotely on each others machine
  • Experiment with communicating with other groups,
    arduinos, etc.
Write a Comment
User Comments (0)
About PowerShow.com