Porting the AN2120/D UDP/IP Code to the Avnet Evaluation Board

Total Page:16

File Type:pdf, Size:1020Kb

Porting the AN2120/D UDP/IP Code to the Avnet Evaluation Board Freescale Semiconductor, Inc. Engineering Bulletin EB390/D 5/2002 Porting the AN2120/D UDP/IP Code to the Avnet Evaluation Board By: Steven Torres . Motorola . SPS TSPG 8-/16-Bit Division c n I , Introduction r o t The Motorola application note Connecting an M68HC08 Family Microcontroller c to an Internet Service Provider (ISP) Using the Point-to-Point Protocol u (AN2120/D) describes a methodology for connecting a Motorola d microcontroller to the Internet using the PPP protocol to exchange UDP/IP n data. UDP/IP (user datagram protocol/Internet protocol) is similar to TCP/IP, o except that being a connectionless protocol, it sends messages to a host c i without establishing a connection. m AN2120/D also includes the code that implements a UDP/IP protocol. This e code was first developed using the Cosmic development environment. Since S then, the UDP/IP code has been ported to Metrowerks CodeWarrior 1 e development environment and onto the 68HC908GP32 Avnet evaluation l board. a c The UDP/IP methodology provides a mechanism to allow a remote device, in s this case an M68HC08 Family microcontroller, to connect to an ISP. When the e remote device has established a connection with the ISP, the remote device e r can broadcast data to other hosts on the Internet. The UDP/IP network F connectivity is illustrated in Figure 1. 1. CodeWarrior is a registered trademark of Metrowerks, a Motorola company. © Motorola, Inc., 2002 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. EB390/D BACKBONE ROUTER MC68HC908GP32 SYSTEM MODEM INTERNET POINT-TO-POINT CONNECTION ROUTER OF LOCAL ISP . c n I , DESTINATION HOST r o Figure 1. Network Framework t c Porting Overview This engineering bulletin describes the porting of the UDP/IP CodeWarrior u code to the Avnet evaluation board. The information provided in subsequent d n sections is organized as a guide to connecting Motorola microcontrollers to the o Internet using the UDP/IP code. c i The demo’s objectives are: m • Connecting an Avnet evaluation board running a CodeWarrior version of e the UDP/IP code on its MC68HC908GP32 MCU to a dial-up server S through a PPP link e • Demonstrating how an ActiveX component can be used as a l destination host to interface with the device running the UDP/IP code a through a dial-up server c s NOTE: This engineering bulletin does not detail the SLIP connection already described e in AN2120/D. e r In subsequent sections, this engineering bulletin describes: F • The Avnet evaluation board hardware • UDP/IP CodeWarrior code modifications that are required for the demo • How to organize, set up, and configure a network to be compatible with a PPP connection • Setting up an ActiveX interface on the destination host to interface with the remote device • Some techniques and tools for debugging an Internet connection between an MCU and a destination host 2 Porting the AN2120 Code to the Avnet Evaluation Board MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. EB390/D Avnet Evaluation Board Setup While this engineering bulletin details using a dial-up server and a subnet to connect a device to a remote host, the UDP/IP code is not limited to this type of connectivity. Variations to this implementation are possible with the correct setup. Application note AN2120/D describes a device, for example, that connects to an ISP, which then allows the device to reach a destination host across the Internet. Demo Development As discussed above, the UDP/IP code can be modified and compiled within the Environment CodeWarrior environment. To program the Avnet evaluation board, the P&E FLASH Programmer can be used. The networking part of the demo was developed and tested using an . . IBM-compatible PC running these Microsoft programs1: c n • Windows 98 SE I • FrontPage 2000 , r • Internet Explorer 5.5 o t • Dial-Up Networking c • Dial-Up Server u d • Winsock version 6 ActiveX component n o The Windows networking setup described below should also be compatible c with Windows 95, 98, NT , and 2000. i m e Avnet Evaluation Board Setup S e Before setting up and configuring the network for the demo, the Avnet board l must be modified to be compatible with the application note AN2120/D a c hardware requirements. In addition, the Avnet board must also be configured s with the correct clock and PLL settings for the demo by setting some jumpers e and switches on the board. e r F 1. Microsoft, Windows, Frontpage, ActiveX, and NT are registered trademarks of Microsoft Corporation in the United States and/or other countries. MOTOROLA Porting the AN2120 Code to the Avnet Evaluation Board 3 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. EB390/D Avnet Evaluation Modifications to the Avnet evaluation board are required so that the Avnet Board Modifications evaluation board will be wired as dictated by application note AN2120/D — see the serial port schematic Figure 2 for the AN2120/D hardware requirements. This schematic can also be found on page 46 of the application note AN2120/D. These wiring requirements are a consequence of the coding of the UDP/IP protocol. U2 MAX220 1 16 C1+ V C5 CC C7 0.1 µF 3 2 0.1 µF C1– V+ 4 6 C2+ V– C8 C6 0.1 µF P1 . µ 0.1 F 5 15 5 . C2– GND 9 . GND 11 14 4 T1In T1Out 8 c 12 R1 R2 8 3 Out In 7 n 9 T2 7 2 I R2Out Out 6 10 R1 13 1 , T2In In r CONNECTOR o DB9 t Figure 2. AN2120/D Serial Port Schematic c u d n Comparing the AN2120/D schematic to the schematic for an Avnet evaluation o board, it is evident that the Avnet board lacks two serial port hardware-wiring c connections. (See Figure 3 below. Please reference the Avnet i ADS-MOT908GP32 for more detailed schematics.) Table 1 summarizes the m schematic observations. The table shows that the unmodified Avnet board e lacks CD and DTR signals. S e l V U1 CC a ADM202 CONNECTOR DB9 c P1 16 15 5 s C1 1 VCC GND 1 9 e µ C2 4 0.1 F 2 2 2 8 6 0.1 µF V+ V– e 3 7 r 1 C1P C2+ 4 2 1 1 C4 6 F C3 0.1 µF 1 0.1 µF 2 3 5 2 C1– C2– CONNECTOR DB9 11 14 P2 T1In T1Out 5 9 PTE0 10 7 4 T2In T2Out 8 3 12 13 7 R1Out R1In 2 6 PTE1 9 8 1 R2Out R2In Figure 3. Avnet Serial Ports Schematic 4 Porting the AN2120 Code to the Avnet Evaluation Board MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. EB390/D Avnet Evaluation Board Setup Table 1. Serial Port Wiring Pin AN2120/D Unmodified Modified Pin Description Requirements Avnet Avnet 3 Rx (= R2) PTE1 PTE1 PTE1 2 Tx (= T2) PTE0 PTE0 PTE0 1 CD (= R1) PTD1 Lacking PTD1 4 DTR (= T1) PTD0 Lacking PTA0 . Table 1 also shows the required signal-to-port serial communication wiring . modifying the Avnet board. The modifications are described in more detail c below. Item 1 resolves the carrier detect (CD) wiring requirements; Item 2 n resolves the data terminal ready (DTR) requirements. Layout schematics of an I unmodified and a modified Avnet board are provided in Figure 4 and Figure 5, , r respectively. o t Modifications: c u 1. Jumpered user interface pin PTD1 (that is Avnet board JP1 pin 9) to d resistor/diode clamp to the Avnet user serial port (PT2) pin 1 n 2. Jumpered the Avnet monitor mode serial port (PT1) pin 2 to the Avnet o user serial port (PT2) pin 4 c i NOTE: The item 2 modification, the DTR resolution, uses a different signal wire than m expected by the UDP/IP code (PTA0 instead of PTD0) and will dictate a e modification in the UDP/IP code. This modification is described in the section S entitled UDP/IP CodeWarrior Code Modifications. e l a c s e e r F MOTOROLA Porting the AN2120 Code to the Avnet Evaluation Board 5 For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc. EB390/D POT POWER LED LCD CONTRAST DS2 POWER DIP LCD CHARACTER DISPLAY SWITCH JACK SPSI 1 x 16 10 pos LED TEMP SENSOR 1 DS1 JP3 JP1 1 . HC908GP32 . J2 . J1 c SW4 SW1 SW2 DB9 FEMALE DB9 FEMALE 1 A0/MMODE SCOISER n I RESET , SPEAKER OUTPUT r Note: This drawing shows general placement only and is not meant as a mechanical representation of the o actual board. t c Figure 4. Unmodified Avnet Board Layout u d POT n POWER LED o LCD CONTRAST c DS2 i POWER DIP LCD CHARACTER DISPLAY SWITCH JACK m SPSI 1 x 16 e 10 pos S e LED l TEMP a SENSOR 1 DS1 JP3 c JP1 s 1 e HC908GP32 PIN 2 PIN 1 PIN 4 J2 e r J1 SW4 SW1 SW2 DB9 FEMALE DB9 FEMALE F 1 A0/MMODE SCOISER RESET SPEAKER OUTPUT PT1 PT2 +5 V 100 kΩ Note: This drawing shows general placement only and is not meant as a mechanical representation of the actual board. Figure 5. Modified Avnet Board Layout 6 Porting the AN2120 Code to the Avnet Evaluation Board MOTOROLA For More Information On This Product, Go to: www.freescale.com Freescale Semiconductor, Inc.
Recommended publications
  • Wireless Local Area Networks: Threats and Their Discovery Using Wlans Scanning Tools Ms
    International Journal of Advanced Networking Applications (IJANA) ISSN No. : 0975-0290 137 Wireless Local Area Networks: Threats and Their Discovery Using WLANs Scanning Tools Ms. Rakhi Budhrani Bhavnagar, Gujarat, India. Dr. R. Sridaran, Dean, Faculty of Computer Applications, Marwadi Education Foundation’s Group of Institutions, Rajkot, Gujarat, India. ----------------------------------------------------------------------ABSTRACT-------------------------------------------------------- Wireless Local Area Networks frequently referred to as WLANs or Wi-Fi networks are all the passion in recent times. Wireless networks offer handiness, mobility, and can even be less expensive to put into practice than wired networks in many cases. But how far this technology is going provide a protected environment in terms of privacy is again an anonymous issue. Realizing the miscellaneous threats and vulnerabilities associated with 802.11-based wireless networks and ethically hacking them to make them more secure is what this paper is all about. On this segment, we'll seize a look at common threats, vulnerabilities related with wireless networks. This paper presents an overview some of the WLANs Scanning, Sniffing and Auditing tools available on the internet. This paper Reviews these tools along with their merits, demerits and how they can be used for hacking, exploiting security holes and their usage characterization in WLANs. Keywords - Current threats in WLANs, Exploiting Security, WLANs Scanning, WLANs Sniffing, Multifunctional, WLANs auditing tools penetrate any wired network via wireless network as Access Point (AP) is bridging between wireless and I. INTRODUCTION wired network. Wireless Networks present a host of issues for network managers. Unauthorized access he Institute of Electrical and Electronics points, broadcasted SSIDs, unknown stations, MITM Engineers (IEEE) provides 802.11 set of attacks such as session hijacking and spoofed MAC standards for WLANs.
    [Show full text]
  • Wireshark User's Guide V1.11.3-Rc1-1721-Gdd4e5fc for Wireshark 1.11
    Wireshark User's Guide v1.11.3-rc1-1721-gdd4e5fc for Wireshark 1.11 Ulf Lamping, Richard Sharpe, NS Computer Software and Services P/L Ed Warnicke, Wireshark User's Guide: v1.11.3-rc1-1721- gdd4e5fc for Wireshark 1.11 by Ulf Lamping, Richard Sharpe, and Ed Warnicke Copyright © 2004-2013 Ulf Lamping , Richard Sharpe , Ed Warnicke Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner. Preface ....................................................................................................................... ix 1. Foreword ........................................................................................................ ix 2. Who should read this document? ......................................................................... ix 3. Acknowledgements ........................................................................................... ix 4. About this document .......................................................................................... x 5. Where to get the latest copy of this document? ....................................................... x 6. Providing feedback about this document ................................................................ x 1. Introduction .............................................................................................................. 1 1.1. What is
    [Show full text]
  • Introducing Network Analysis
    377_Eth_2e_ch01.qxd 11/14/06 9:27 AM Page 1 Chapter 1 Introducing Network Analysis Solutions in this chapter: ■ What is Network Analysis and Sniffing? ■ Who Uses Network Analysis? ■ How Does it Work? ■ Detecting Sniffers ■ Protecting Against Sniffers ■ Network Analysis and Policy Summary Solutions Fast Track Frequently Asked Questions 1 377_Eth_2e_ch01.qxd 11/14/06 9:27 AM Page 2 2 Chapter 1 • Introducing Network Analysis Introduction “Why is the network slow?”“Why can’t I access my e-mail?”“Why can’t I get to the shared drive?”“Why is my computer acting strange?” If you are a systems administrator, network engineer, or security engineer you have heard these ques- tions countless times.Thus begins the tedious and sometimes painful journey of troubleshooting.You start by trying to replicate the problem from your computer, but you can’t connect to the local network or the Internet either. What should you do? Go to each of the servers and make sure they are up and functioning? Check that your router is functioning? Check each computer for a malfunctioning network card? Now consider this scenario.You go to your main network switch or border router and configure one of the unused ports for port mirroring.You plug in your laptop, fire up your network analyzer, and see thousands of Transmission Control Protocol (TCP) packets (destined for port 25) with various Internet Protocol (IP) addresses.You investigate and learn that there is a virus on the network that spreads through e-mail, and immediately apply access filters to block these packets from entering or exiting your network.Thankfully, you were able to contain the problem relatively quickly because of your knowledge and use of your network analyzer.
    [Show full text]
  • Wireshark User's Guide for Wireshark 1.7
    Wireshark User's Guide for Wireshark 1.7 Ulf Lamping, Richard Sharpe, NS Computer Software and Services P/L Ed Warnicke, Wireshark User's Guide: for Wireshark 1.7 by Ulf Lamping, Richard Sharpe, and Ed Warnicke Copyright © 2004-2011 Ulf Lamping , Richard Sharpe , Ed Warnicke Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner. Preface ....................................................................................................................... ix 1. Foreword ........................................................................................................ ix 2. Who should read this document? ......................................................................... ix 3. Acknowledgements ........................................................................................... ix 4. About this document .......................................................................................... x 5. Where to get the latest copy of this document? ....................................................... x 6. Providing feedback about this document ................................................................ x 1. Introduction .............................................................................................................. 1 1.1. What is Wireshark? ........................................................................................
    [Show full text]
  • Wireshark User's Guide 27846 for Wireshark 1.0.0
    Wireshark User's Guide 27846 for Wireshark 1.0.0 Ulf Lamping, Richard Sharpe, NS Computer Software and Services P/L Ed Warnicke, Wireshark User's Guide: 27846 for Wireshark 1.0.0 by Ulf Lamping, Richard Sharpe, and Ed Warnicke Copyright © 2004-2008 Ulf Lamping Richard Sharpe Ed Warnicke Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Ver- sion 2 or any later version published by the Free Software Foundation. All logos and trademarks in this document are property of their respective owner. Table of Contents Preface .....................................................................................................................ix 1. Foreword ......................................................................................................ix 2. Who should read this document? ........................................................................ x 3. Acknowledgements ......................................................................................... xi 4. About this document ...................................................................................... xii 5. Where to get the latest copy of this document? ................................................... xiii 6. Providing feedback about this document ........................................................... xiv 1. Introduction ............................................................................................................ 1 1.1. What is Wireshark? ......................................................................................
    [Show full text]
  • Commview Manual
    TAKE CONTROL IT'S YOUR SECURITY df TAMOSOFT CommView® Network Monitor and Analyzer for Microsoft Windows Help Documentation Version 6.5 Copyright © 1999-2015 TamoSoft Contents Contents ........................................................................................................................................................ 2 Introduction .................................................................................................................................................. 4 About CommView ..................................................................................................................................... 4 What's New ............................................................................................................................................... 5 Overview ................................................................................................................................................... 8 Selecting Network Interface for Monitoring ........................................................................................... 11 Latest IP Connections .............................................................................................................................. 13 Packets .................................................................................................................................................... 16 Logging ...................................................................................................................................................
    [Show full text]