ENGG*44200 Real Time System Design Lab3 Implement VoIP on ARM Outline



Similar documents
Application Note 132. Introduction. Voice Video and Data Communications using a 2-Port Switch and Generic Bus Interface KSZ MQL/MVL

4. H.323 Components. VOIP, Version 1.6e T.O.P. BusinessInteractive GmbH Page 1 of 19

CS 326e F2002 Lab 1. Basic Network Setup & Ethereal Time: 2 hrs

Networking Basics for Automation Engineers

Internet Architecture and Philosophy

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Internetworking and IP Address

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

Computer Organization & Architecture Lecture #19

Vocia MS-1 Network Considerations for VoIP. Vocia MS-1 and Network Port Configuration. VoIP Network Switch. Control Network Switch

How To Monitor And Test An Ethernet Network On A Computer Or Network Card

Computer Systems Structure Input/Output

Exhibit n.2: The layers of a hierarchical network

Integration of Voice over Internet Protocol Experiment in Computer Engineering Technology Curriculum

Strata CTX IP Telephone Programming Guidelines

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

UVOIP: CROSS-LAYER OPTIMIZATION OF BUFFER OPERATIONS FOR PROVIDING SECURE VOIP SERVICES ON CONSTRAINED EMBEDDED DEVICES

Chapter 5. Data Communication And Internet Technology

Management Software. Web Browser User s Guide AT-S106. For the AT-GS950/48 Gigabit Ethernet Smart Switch. Version Rev.

SVP307 SIP VoIP phone User Manual

Transport and Network Layer

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

VoIP Glossary. Client (Softphone client): The software installed in the userâ s computer to make calls over the Internet.

Understanding IP Faxing (Fax over IP)

WSNetServer User Manual. Date: July

UPPER LAYER SWITCHING

TOE2-IP FTP Server Demo Reference Design Manual Rev1.0 9-Jan-15

Linux Driver Devices. Why, When, Which, How?

7a. System-on-chip design and prototyping platforms

LANs and VLANs A Simplified Tutorial

A Research Study on Packet Sniffing Tool TCPDUMP

Network Installation Guide. WorkForce 600 Series Artisan 700 Series Artisan 800 Series

1 Serial RS232 to Ethernet Adapter Installation Guide

Easy H.264 video streaming with Freescale's i.mx27 and Linux

Life of a Packet CS 640,

Understanding IP Faxing (Fax over IP)

VOIP-211RS/210RS/220RS/440S. SIP VoIP Router. User s Guide

Voice Gateway with Router

NCS 416 Paul Brennan Mohammed Haque IAX2 Trunking

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Voice Over Internet Protocol (VoIP) Configuration

VOI-7000 VOI-7100 SIP IP Telephone

How To Set Up A 9339 Voip Phone For The First Time

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

Smoking and any food or drinks are not permitted in the Applications Lab!

Product Description. Licenses Notice. Introduction TC-200

What communication protocols are used to discover Tesira servers on a network?

- Hubs vs. Switches vs. Routers -

Traditional Telephony IP Telephony Voice, Data, Video Integration. Media Convergence. IP Router Server IP Router. Video Distribution Fax

VoIP telephony over internet

Packet Sniffing on Layer 2 Switched Local Area Networks

Using Ladder Logic Instructions to Communicate with an Ethernet IP Nexus Unit

Process Control and Automation using Modbus Protocol

Active-Active Servers and Connection Synchronisation for LVS

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Follow these steps to prepare the module and evaluation board for testing.

VoIP ATA series (ATA171plus, ATA172plus, ATA-171, ATA-172, ATA-171M, ATA-171P)

VLAN 802.1Q. 1. VLAN Overview. 1. VLAN Overview. 2. VLAN Trunk. 3. Why use VLANs? 4. LAN to LAN communication. 5. Management port

Network Installation Guide. Artisan 810 Series

KE1020A INSTALL GUIDE

EXTENDED FILE SYSTEM FOR FMD AND NANO-10 PLC

ML310 VxWorks QuickStart Tutorial. Note: Screen shots in this acrobat file appear best when Acrobat Magnification is set to 133.3%

DEVICE DRIVERS AND TERRUPTS SERVICE MECHANISM Lesson-14: Device types, Physical and Virtual device functions

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

PIXMA MX920. series. Setup Guide

A DIY Hardware Packet Sniffer

Beckhoff TwinCAT. Assigning IP Addresses to Beckhoff Ethernet Devices

Note: these functions are available if service provider supports them.

Audio Over IP. Building Pro AolP Systems. with Livewire. Skip Pizzi. Steve Church. Focal. Press ELSEVIER AMSTERDAM BOSTON HEIDELBERG LONDON

AKD EtherNet/IP Communication

Pre-lab and In-class Laboratory Exercise 10 (L10)

The IP Transmission Process. V1.4: Geoff Bennett

I/O. Input/Output. Types of devices. Interface. Computer hardware

Chapter 11 I/O Management and Disk Scheduling

How To Program A Talkswitch Phone On A Cell Phone On An Ip Phone On Your Ip Phone (For A Sim Sim) On A Pc Or Ip Phone For A Sim Phone On Iphone Or Ipro (For An Ipro) On

Router Architectures

USER GUIDE. MyNetFone USB VoIP Phone with Soft Phone Software User Guide. Table of Contents

smxusbd USB Device Stack

Introduction to VoIP Technology

Azatel Communications Inc. 2-Port Multi-Protocol VOIP Gateway Device Administrator Guide

Internet Packets. Forwarding Datagrams

Application Note: AN00121 Using XMOS TCP/IP Library for UDP-based Networking

Pen Drive to Pen Drive and Mobile Data Transfer Using ARM

Network Attached Storage. Jinfeng Yang Oct/19/2015

Programming PCI-Devices under Linux

Access the Test Here

ACU-1000 Manual Addendum Replacement of CPM-2 with CPM-4

Redundant Serial-to-Ethernet Data Connections for Mission-critical Devices

Ethernet. Ethernet. Network Devices

Lab 2 - Basic Router Configuration

Getting Started. 16-Channel VoIP Gateway Card. Model No. KX-TDA0490

6.40A AudioCodes Mediant 800 MSBG

Introduction to Analyzer and the ARP protocol

Gigabit Ethernet Packet Capture. User s Guide

IP SAN Best Practices

Network Programming TDC 561

Transcription:

ENGG*44200 Real Time System Design Lab3 Implement VoIP on ARM 1 Outline Features of VoIP IP Communication Device Examples Phone Protocol of the Lab 2

VoIP Voice Calls are transmitted over Packet Switched Network instead of Public Switched Telephone Networks (PSTN) Modes of Operation: PC to PC (MSN, Yahoo Messenger) PC to Telephone (Net2Phone home page) Telephone to Telephone 3 Why VoIP? Cheaper Call More Applications Security 4

5 6

7 LCD KEYPAD SOFTWARE I/O CODEC TCP/IP uc/os-ii RTOS A/D & D/A S3C44B0X S3CEV40 ETHERNET PORT VOICE ETHERNET8

Lab3 Architecture Applications (tasks and FSM) Communication Protocol (TCP/IP our own protocol) Real Time Operation System Kernal (UCOS-II) and Device Drivers (Ethernet.c, IIS.c, LCD.c, etc.) Boot loader (44binit.s, etc.) Communication Hardware (Embest HW including RTL8019, IIS chip, etc.) \ 9 Voice In Voice Out A/D D/A CODEC CODEC Buffering Buffering Text In Transmit Receive Text Out Ethernet 10

Functional Requirements Broadcast your phone status (online/busy) to other groups. Use the PC keyboard to introduce a group number to be called to establish a connection. Use the PC keyboard to send short messages to a group once connection is established. LCD is used to show information like on-line groups, send message, received messages, sending and receiving status, states, connection time. Use the LCD or UART0 to display the time passed while communicating with a MAC address (i.e. a specific group once connected). 11 Functional Requirements Cont. The 7-segment display is used to display the group currently connect to, up to a maximum of 15 (F). For groups larger than 15, rollover back to 1 and continue from there (i.e. group # 16 = group #1, group #2 = 17, etc..) Use the microphone and the earphones to perform a duplex audio communication. Use a packet length of 1000 for voice communication and recording length of 0x8000. At the minimum, you should at least be able to send a prerecorded sound to a connected group (doesn t necessarily have to be recorded and sent in real time) 12

Protocol Format The protocol format should be in the format of: DESTINATION ADDRESS[6] + SOURCE ADDRESS[6] + LENGTH[2] + MESSAGE TYPE[1] + PACKET NUM[2] + MESSAGE[?] MESSAGE TYPE is the first byte of your data to be sent. 0x10: Broadcast AVAILABLE, followed by your group number. 0x11: Broadcast BUSY, followed by your group number. 0x12: REQUEST a connection, followed by the group number to be connected. 0x13: ACCEPT a connection, followed by your group number. 0x14: Send a TEXT MESSAGE, followed by the text message. 0x15: Corresponds to voice data 0x16: Corresponds to the last portion of buffered voice data, begin playback after receiving 0x17: CLOSE a connection, followed by your group number. 13 MAC Address You have to setup you own NIC MAC address in the format of: 00-20-05-44-20-XX XX is your group number, Hex number For example, your group number is 0x12, then you should use 00-20-05-44-20-12 as your NIC MAC address. 14

System Constrains The system broadcast its status every 10-15 seconds (some give here depending on how busy the network gets). The maximum length of message to be sent is 1514 bytes. One board can communicate to only one another board simultaneously. 15 Deadlines and Marking Lab 3 is worth a total of 16% 2% for the demo requirements (3.3.2, review of template code), 2% for the Petri Net Diagram (included with report), 6% for the Demo, 6% for the Report The Lab 3 Demo is Due Nov 20/22 in your lab The report is due along with the demo (i.e. Nov 20/22) 16

FAQ1: How do I Send and Receive Data? This functionality is located in the predefined functions located in Ethernet.c. Initialization is handled by NicInit(), sending is performed by EtherOutput(), and receiving is done using EtherInput(). There are at least two ways of integrating these functions. One is including the Ethernet.c file to your project. The other is copying the functions from Ethernet.c and placing them in your main code. 17 FAQ2: What do I need to change In NicInit(void) function? Check to make sure the following changes are made in your NicInit(void) code: /* set MAC address */ change to your MAC address here /* broadcast address is 0x0 */ change from 0x0 to 0xff /* only accept destination address message */ change from 0x0 to 0x4 (accept broadcast addresses) 18

FAQ3: What do I need to change in the EtherOutput() function? Eliminate the eh structure. Define a unsigned char packet_to_send[1514]; Set destination MAC address */ Set source MAC address */ Calculate length Assemble data (header and message) Send package ***Note: if you re assembling your packet in the fashion outlined in the template before sending it to EtherOutput(), you shouldn t need to make any changes. (for details, please refer to the template function EtherOutput()) 19 FAQ4: What About the EtherInput() Function? Function takes in a pointer to an array of characters (i.e. a string), where the received data will be copied to. Returns length as an integer value (length should be at least 17 for a valid packet, 6+6+2+1) Can do your processing on the received packet within EtherInput() or within the main code (for more details, please refer to the template function EtherInput()) 20

FAQ5: How do I Send Voice Data? General Process: Record a sound sample of length specified by recording length parameter After recording is finished, copy the recorded sample to a DIFFERENT MEMORY LOCATION than your recording location. This can be done using the memcpy() function memcpy((void *)0x0C400000+2*REC_LEN, (void*)0x0c400000,rec_len); Divide the recorded sound into sound packets based on your maximum packet length. Mark each packet with the identifier 0x16, except for the last, which should be 0x17, sending them to EtherOutput(), allow for some delay between packets. 21 FAQ6: How do I Receive Sound? General Process: Look for a packet with Voice as it s type Copy the data portion of that packet to a specified memory location (once again, use memcpy()) Wait until a packet of LastVoice is received Copy from the storage location to the memory destination defined in Playwave() Call Playwave() 22

FAQ 7: How and When Do I Do DMA? Since you re transferring data from an peripheral (the microphone) to a memory location, the type of DMA being performed is Bridge DMA (BDMA) Iis_wav.c already has some BDMA functions in place. Depending on your implementation, you may need to move and change them. 23 FAQ 8: What do I Need to Change in Record_Iis()? You ll need to change the IIS register settings You ll notice that Record_Iis() also plays back the recorded sound. You probably want to take that part of the code out. Be careful with the interrupt masking as problems can arise from it. Also: Remember to change your REC_LEN!! 24

FAQ 9: What do I Need to Change in Playwave()? Once again, be careful with the interrupt masking (rather than strictly working with the bits, use the BDMA functions) Make sure your copying the sound data from the memory location you stored it in Change the sound length to the defined recorded length (i.e. sound_len = 0x8000) After copying from the memory location to the playback buffer, you ll need to perform a BDMA done check before actually playing the sound You ll need to change the values of the IIS registers 25 FAQ 10: Where do I get Information About the IIS and DMA Registers? Information about the DMA and IIS registers can be found in the S3C44B0X PDF 26

Other Notes Don t try to send packets while you re receiving sound. Due to the volume of data, the Ethernet port will likely crash The TA boards at the back have code flashed on to them. If something isn t working, try turning the board off and back on. If things are still broken, email me and I ll come in as soon as I can to take a look/reflash the program If no one is working with the TA boards, please turn them off 27 Other Notes Cont. A user s guide can be found with each of the TA boards. If the guide is missing, please let me know and I ll print off a new copy and replace it Once everyone is working on their labs and sending information, the network will likely become very slow. This will likely cause problems with voice communication. It may be worthwhile consulting with other groups and establishing work slots for different groups. 28