Dr. Dobb's Journal - November 2008 - (Page 31) mounting holes on the NB PCB. Drill these holes for #6 machine screws. 4. Layout the positions of the two switches and the two LEDs on the bottom front portion of the box. Drill holes of the appropriate sizes for mounting. Glue the LEDs into place and mount the switches. 5. File two holes in the top rear portion of the box to allow the power and network cables to protrude. 6. Mount the NB PCB into the box using appropriate screws. The screw heads should be on the outside of the box; nuts on the inside. Tighten the screws but not so tightly as to cause the PCB to bend. 7. Carefully unsolder surface-mounted LEDs 8 and 9 from the PCB. Unsolder and remove the reset switch as well. Led8 is the furthest right in the row of eight LEDs. Led9 is located to the left of the dip-switches. The reset switch is located above the row of eight LEDs. 8. Cut the connector off of the supplied power cable. Pay attention to the polarity of the cable. There was a white strip on the + side of the cable on the unit I used. If you cannot tell which is the + side of the cable. use a multimeter to determine it. 9. You will probably have to extend the power cable by soldering other wires onto it. A sixinch extension will probably do it. Again. be careful of the polarity. 10. Solder the – end of the power cable to the GND terminal on the PCB. Solder the + end to one side of the power switch. 11. Solder one side of another wire to the other switch connection and the other side to the “7to18V” terminal on the PCB. 12. Determine the + side of the power LED by holding the leads to a 9V battery and noting which orientation causes the LED to light. Note which lead of the LED is connected to the + side of the battery. 13. Solder a wire from the + side of the power LED to the + connection on the PCB for Led9, which was removed earlier. Solder another wire from the other lead of the LED to the other connection for Led9. 14.If you are feeling lucky, plug in the wall wort and turn the power switch on, if all is well you should see the power LED come on. Turn power back off and unplug the wall wort. Designation MOD5270LC Value NB development kit hardware. Part #: NNDK-MOD5270LC-KIT Serpac Model #271 or #271-I Dimensions: 7”x 4 3/4”x 1 3/4” Any brand off/on switch Any brand pushbutton switch Any brand LED Any brand LED Notes Available directly from NetBurner, Inc. Box See www.serpac.com SPST power switch SPST momentary contact pushbutton switch LED power on indicator LED access indicator I used a miniature toggle switch This is the server’s reset switch I used a green LED for power on I used a red LED as access indicator For mounting NB module Misc. hardware Screws, nuts and spacers, etc. SD memory card Memory Card 64 GB max; 1 GB usually adequate Table 1: Webster2 parts list. 15. Solder two wires from the reset switch to the two pads on the PCB from which the reset switch was removed. Polarity is not important here. 16. Determine the + side of the access LED as you did for the power LED. 17. Solder a wire from the + side of the access LED to the + connection on the PCB for Led8, which was removed earlier. Solder another wire from the other lead of the LED to the other connection for Led8. 18. Connect an Ethernet cable to the RJ-45 connector on the MOD5270 module and route it and the power supply cable out of the box. 19. Place the top on the box and screw it to the bottom using the screws provided. That’s it with the hardware. Plug Webster2’s power cable in and plug the network cable into a network port. Flip the power switch to on and you are ready to go. Webster2’s Software You will need some of the tools provided by NB on the CD that comes with the development kit to download the web server software to your server. Install the development kit on your computer. Also, get the ZIP file containing the Webster2 code from the DDJ website (see “Resource Center,” page 5). First, it is necessary to verify your server is running and available via the network. The easiest way to do this is to bring up the NB IPSetup program. If all is well you should see a MOD5270 device listed in the right pane and see the networking parameters your server has adopted in the left. If you don’t see your server, make sure the server is plugged in, the power switch on, power indicator lit, and the network port you plugged into is active. Once you can see your server, bring up the NB AutoUpdate tool. The IP address you saw in the IPSetup program should again be displayed. Click the Browse button and navigate to the directory you unzipped the Webster2 code into. Find the file Webster2_APP.s19 in the release directory. Click the Update button and the web server code will be transferred to your server. Before Webster2 can be used it must be configured. Webster’s operation is controlled by the config2.dat configuration file that must reside in the root directory of the server’s flash drive. Webster will blink all eight on-board LEDs and halt operation if the configuration file is not found, or if an error is detected in its format. Example 1 is a typical configuration file. The configuration file is a human-readable text file with each line terminated by carriage-return, linefeed characters. The code (in config.cpp) that parses this file is not very forgiving so it is important to not deviate from the format shown. Most entries in the configuration file are probably self-explanatory. If Use Logging is “yes” and Logging Hostname is specified, UDP packets are sent the specific host. If Use Logging is “yes” and 31 November 2008 l www.ddj.com l Dr. Dobb’s Journal http://www.serpac.com http://www.ddj.com
Table of Contents Feed for the Digital Edition of Dr. Dobb's Journal - November 2008 Dr. Dobb's Journal - November 2008 Contents Friday Night Fish Fry Alia Vox Developer Diaries Developer's Notebook Saving Open Source Conversations iPhone Building Your Own Web Server Green Telnet What's New In Boost Threads? Testing Service Oriented Architectures Test Case Generation, UML, and Eclipse Unit Testing Web Services C3 Programming The Agile Edge Swaine's Flames Effective Concurrency Dr. Dobb's Journal - November 2008 Dr. Dobb's Journal - November 2008 - (Page BB1) Dr. Dobb's Journal - November 2008 - (Page BB2) Dr. Dobb's Journal - November 2008 - Dr. Dobb's Journal - November 2008 (Page Cover1) Dr. Dobb's Journal - November 2008 - Dr. Dobb's Journal - November 2008 (Page Cover2) Dr. Dobb's Journal - November 2008 - Dr. Dobb's Journal - November 2008 (Page 1) Dr. Dobb's Journal - November 2008 - Dr. Dobb's Journal - November 2008 (Page 2) Dr. Dobb's Journal - November 2008 - Dr. Dobb's Journal - November 2008 (Page 3) Dr. Dobb's Journal - November 2008 - Contents (Page 4) Dr. Dobb's Journal - November 2008 - Contents (Page 5) Dr. Dobb's Journal - November 2008 - Friday Night Fish Fry (Page 6) Dr. Dobb's Journal - November 2008 - Friday Night Fish Fry (Page 7) Dr. Dobb's Journal - November 2008 - Friday Night Fish Fry (Page 8) Dr. Dobb's Journal - November 2008 - Friday Night Fish Fry (Page 9) Dr. Dobb's Journal - November 2008 - Alia Vox (Page 10) Dr. Dobb's Journal - November 2008 - Alia Vox (Page 11) Dr. Dobb's Journal - November 2008 - Developer Diaries (Page 12) Dr. Dobb's Journal - November 2008 - Developer Diaries (Page 13) Dr. Dobb's Journal - November 2008 - Developer's Notebook (Page 14) Dr. Dobb's Journal - November 2008 - Developer's Notebook (Page 15) Dr. Dobb's Journal - November 2008 - Saving Open Source (Page 16) Dr. Dobb's Journal - November 2008 - Saving Open Source (Page 17) Dr. Dobb's Journal - November 2008 - Saving Open Source (Page 18) Dr. Dobb's Journal - November 2008 - Saving Open Source (Page 19) Dr. Dobb's Journal - November 2008 - Conversations (Page 20) Dr. Dobb's Journal - November 2008 - Conversations (Page 21) Dr. Dobb's Journal - November 2008 - iPhone (Page 22) Dr. Dobb's Journal - November 2008 - iPhone (Page 23) Dr. Dobb's Journal - November 2008 - iPhone (Page 24) Dr. Dobb's Journal - November 2008 - iPhone (Page 25) Dr. Dobb's Journal - November 2008 - iPhone (Page 26) Dr. Dobb's Journal - November 2008 - iPhone (Page 27) Dr. Dobb's Journal - November 2008 - Building Your Own Web Server (Page 28) Dr. Dobb's Journal - November 2008 - Building Your Own Web Server (Page 29) Dr. Dobb's Journal - November 2008 - Building Your Own Web Server (Page 30) Dr. Dobb's Journal - November 2008 - Building Your Own Web Server (Page 31) Dr. Dobb's Journal - November 2008 - Building Your Own Web Server (Page 32) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 33) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 34) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 35) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 36) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 37) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 38) Dr. Dobb's Journal - November 2008 - Green Telnet (Page 39) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 40) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 41) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 42) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 43) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 44) Dr. Dobb's Journal - November 2008 - What's New In Boost Threads? (Page 45) Dr. Dobb's Journal - November 2008 - Testing Service Oriented Architectures (Page 46) Dr. Dobb's Journal - November 2008 - Testing Service Oriented Architectures (Page 47) Dr. Dobb's Journal - November 2008 - Testing Service Oriented Architectures (Page 48) Dr. Dobb's Journal - November 2008 - Test Case Generation, UML, and Eclipse (Page 49) Dr. Dobb's Journal - November 2008 - Test Case Generation, UML, and Eclipse (Page 50) Dr. Dobb's Journal - November 2008 - Test Case Generation, UML, and Eclipse (Page 51) Dr. Dobb's Journal - November 2008 - Test Case Generation, UML, and Eclipse (Page 52) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 53) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 54) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 55) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 56) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 57) Dr. Dobb's Journal - November 2008 - Unit Testing Web Services (Page 58) Dr. Dobb's Journal - November 2008 - C3 Programming (Page 59) Dr. Dobb's Journal - November 2008 - C3 Programming (Page 60) Dr. Dobb's Journal - November 2008 - C3 Programming (Page 61) Dr. Dobb's Journal - November 2008 - C3 Programming (Page 62) Dr. Dobb's Journal - November 2008 - C3 Programming (Page 63) Dr. Dobb's Journal - November 2008 - The Agile Edge (Page 64) Dr. Dobb's Journal - November 2008 - The Agile Edge (Page 65) Dr. Dobb's Journal - November 2008 - The Agile Edge (Page 66) Dr. Dobb's Journal - November 2008 - The Agile Edge (Page 67) Dr. Dobb's Journal - November 2008 - Effective Concurrency (Page 68) Dr. Dobb's Journal - November 2008 - Effective Concurrency (Page 69) Dr. Dobb's Journal - November 2008 - Effective Concurrency (Page 70) Dr. Dobb's Journal - November 2008 - Effective Concurrency (Page 71) Dr. Dobb's Journal - November 2008 - Swaine's Flames (Page 72) Dr. Dobb's Journal - November 2008 - Swaine's Flames (Page Cover3) Dr. Dobb's Journal - November 2008 - Swaine's Flames (Page Cover4)
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.