Thursday, August 30, 2018 2:21 am

Working Outside the Box: A to Z NetBurner Startup Guide

Written by
Rate this item
(1 Vote)

This post provides a start to finish description of how to go from opening your first NetBurner Network Development Kit (NNDK) box to getting your first application running. While every NetBurner kit comes with a "Quick Start Guide", we've been asked on occasion to provide a more visual and detailed step by step guide and this is it!

Our focus is on the System on a Module (SOM) line found in the NNDK-MOD part numbers. The NNDK-MOD-54415LC-KIT is one of the most popular. Here is our full selection.

  1. Unpacking Your New NetBurner Module

    1. First, go ahead and crack open the box and get a whiff of that new embedded module smell.
    2. Remove the Red Product Licence card. This red card contains the unique serial number you will need to create your support account and to install the software. This is a keeper… once we finish using it in this tutorial safely store it with your gold doubloons and faberge eggs.
    3. Netburner product card

    4. Upon removing the cardboard separator you will find a static-pack bag with the NNDK assembly inside. It includes a NetBurner System on a Module (SOM), also known as a Core Module, which is factory-mounted to a development board with goodies specifically designed for easier development.
    5. Beneath that you will find a serial cable, a mini-USB cable for power and/or serial communications, 4 rubber footing pads, and a standard Ethernet cable. If all arrived as it should have, it will look like the assortment below.
    6. NetBurner SOM Development Kit

  2. Hooking Up Your Device

    1. Note on static safety: Electrostatic Discharge (ESD) safeguards are never a bad idea when handling sensitive electronics. NetBurner's devices have little history of users reporting ESD damage and many users engage in little to no ESD mitigation. That said we certainly don't recommend rubbing your shoes heavily on carpet, rubbing balloon in your hair, or installing a Tesla coil nearby! An ounce of prevention is probably good practice.
    2. Remove the development kit from the static bag and place on your bench. Optionally, feel free to apply the rubber footing pads to the bottom of the carrier board if you like. It will just help prevent slipping and sliding of the board on your table's surface.
    3. Unwrap the mini-USB and Ethernet cables and connect them to the device as shown below.
    4. Dev Kit hooked up

  3. Installing Netburner Software and Tools on your PC or Mac

    1. The Netburner Network Development Kit includes a complete suite of software, tools and documentation needed to develop an application for NetBurner hardware. To begin, let's install the software, drivers and documentation required to write an application and learn about the hardware.
    2. In order to download the NNDK software and tools you will need to register at https://support.netburner.com/SelfService/Tools.html. Doing this will also allow you to submit support tickets should you run into any stumbling blocks you can't quite get through. Six months of support is included with any development kit purchase. Click "New User".
    3. Tools login

    4. Fill in the fields as appropriate. You will need to specify the product and the NNDK Serial Number for the specific product you wish to register. That information is found on the previously unpacked Red Product Card. You can take that out of the safe for now!
    5. Registration

    6. Next navigate to the link for the latest NNDK software release for your computer's OS and click "Download".
      1. Note: 32-bit Java Runtime Environment (JRE) 1.6 + is required.
      2. If you need to upgrade your JRE download it here: https://java.com/download
    7. Select install file

    8. After the download is complete, navigate to the downloaded installer file, open it and click the installer executable to install the software tool kit. A setup wizard will appear and then guide you through the process. Click "Next".
    9. Set up

    10. Read and accept the license agreement and click "Next" to proceed.
    11. agreement 1

    12. Read and agree to the second page of the licensing agreement. Check the applicable boxes and click "Next" to proceed.
    13. agreement 2

    14. Select your installation directory and name. You can click on the folder icon to browse for a location. For most users the default location is recommended.
    15. A quick aside to users who might be upgrading their NNDK to a different version: You can have multiple versions of the NDDK installed on your machine. To do this, just rename your currently installed NNDK directory to something else. If you do not want to keep the old version around, please make sure you back up any projects you have, and then remove the old NNDK install directory completely before installing the new one. Installing over the top of an older version of the NNDK is a good way to run into all sorts of confusing and ambiguous issues. We love you too much for that.
    16. Click "Next".
    17. install directory

    18. Next, allow the setup wizard to install the necessary driver software. Select "Yes" and then click "Next".
    19. Driver software

    20. In the Platform Installation Key Input screen, add the appropriate Platform type and Serial Number from the Red Card included with the product. Use the following format: PlatformNumber:SerialNumber. If you have more than one device to register, go ahead and enter all of them in this screen. It will save you a good deal of time, and will be necessary for development if your devices are not the same model. After this you can file the Red Card someplace safe for the next year or so.
    21. NetBurner Platform Number and Serial Number

    22. Final chance to stop the installation. Click "Next" to proceed.
    23. Ready to install NNDK

    24. Success! Just click "Finish" and your are done!
    25. Completed Install NNDK

    26. It is a good idea to restart your PC at this time.
    27. Here's a sampling of what is included in that NNDK software:
      1. Tools

      2. NBEclipse

        IDE (Integrated Development Environment) used to develop, download and debug applications. Most of the below tools are also accessible through this IDE.

        AutoUpdate, TCPUpdate, SerialLoad

        Dowload new applciation to module (SerialLoad for MOD5213)

        MTTTY

        PC to NetBurner Serial communication

        Application Wizard

        Auto-generate basic applications

        TaskScan

        Monitor applications currently running on modules

        TFTP Server

        Host a TFTP Server

        UDPTerminal

        Send and receive UDP packets

        WinAddr2Line

        Decipher trap messages to get source location of program faults

      3. Documentation

      4. Documents can be found in on your PC at /nburn/docs folder. There you will find a variety of documentation, schematics, and guides. It's a great offline resource.

      5. Examples

      6. Numerous examples (over 100) can be found at /nburn/examples. These cover using all manner of peripherals, protocols, and basic functionality, and are a fantastic starting point for your projects.

  4. It's Alive!!! Running the Factory Application

    Your first step should be to bring life into your new Dev Kit. Turning on your device, and letting it run the NetBurner factory application is like a first slap on the bum. Besides there some neat microapps in there for you to test drive.

    1. As per the prior steps we have already connected the Ethernet and mini-USB to the NetBurner board, install the software and restarted our PC.
    2. Now it's time connect the USB cable to your PC. You should see the board red power LED's become active.
    3. Connect the Ethernet cable to your network router, hub or switch.
    4. TIP: Everything is much easier if you just plug your device into the network, and don't try to connect it directly to your PC with a crossover cable. If you do that, you would need to assign a static IP, Gateway, Mask, and DNS server, and there is a lot of opportunity for failure there.
    5. Connect your PC to the same network. A WiFi connection to the same network should be sufficient. If you have issues try using an Ethernet cable to connect to the network.
    6. Open the NBEclipse application on your PC (located at <your_nburn_install_dir>\NBEclipse). Accept the default Workspace directory on the Workspace Launcher and click "OK".
    7. new workspace nburn

    8. A blank IDE window will appear. In the bottom left corner, you will find a window labeled as "NBFind". If powered on and connected to the network, your device should be listed there, along with its IP address, MAC Address, and the Application that it is running. If you do, congratulations! You just found your device. If for some reason you don't see the "FBFind" view you can enable it in "Window" > "Show View" > "NBFind". There are many other useful views you can try in there too.
    9. blank NBEclipsewindow

    10. Open your favorite browser, and type in the IP address of your module where the URL goes. This should open with the default NetBurner Factory Application. If you see the the webpage below, you know that your NetBurner is working properly and serving dynamic web pages over the network. Go ahead and poke around the UI and explore the factory application.
    11. NeBurner Factory Application

  5. Rolling up your sleeve to make your first project

    1. The factory app is a good baby step, but let's get going and show you how you can get started down the road of embedded IoT design freedom. To do this you'll need to understand how to create your first project.
    2. First, if it not already open, go ahead and open the NBEclipse IDE application on your PC.
    3. Then go to "File" > "New" > "Project".
    4. New project

    5. In the Select a wizard window choose "NetBurner" > "NetBurner Project". Click "Next".
    6. Project Selector

    7. In the C++ Project window, type a name for your project. Select "Use default location" unless you have some other preference. In "Project type", select "NetBurner Device Executable". The default selection for "Toolchains" is "NetBurner Device", which is desired. Click "Next".
    8. C++ project selection

    9. In the Select Configurations Window, you should see the two options below checked by default. Continue by clicking "Next".
    10. Configuration Selection

    11. In the NetBurner Platform Options Window, click "Search" to find your device.
    12. Search for device

    13. A popup window will then appear with the search results. Select your device and click "OK".
    14. IP Selection

    15. The above steps should have you return to the previous window with the "Target Platform" and "IP Address" fields populated automatically. This will allow us to load our application on our device without any additional configuration. Click "Next".
    16. Autofill Target Platform

    17. In the NetBurner Project Options Window, check off the options shown below. "AutoUpdate", "DHPC", and "WebServer" should be checked, then click "Finish".
    18. Checkboxes for options

    19. You will return to a clean project in the main NBEclipse IDE window. You will notice that there is a lot going on right off the bat in the console window on the bottom right. This is because NBEclipse will automatically build projects for you as changes to the source code are saved, which includes when it is first created.
    20. build

    21. If you click on the project folder you'll see that a variety of project folders have been auto-populated for you. As the name would suggest, main.cpp is the primary file you would edit as you customize your application.
    22. Go ahead and open main.cpp and you'll see some auto generated code, as well how the Outline window helps you see the code structure. This is very helpful for longer code.
    23. project folder

    24. This application is pretty boring… It literally initializes the device, starts the web server, and then does nothing. Let's add a (very) small change to give it a dash more flavor, and to make sure that we can correctly modify, build, and load our application. Inside of the main while() loop in UserMain(), you can see we've added a call to iprintf() that will proclaim our mastery of project creation and manipulation to the world. Notice again that after you save your changes, the project is automatically rebuilt.
    25. Here's that code snippet:
      iprintf("I did it!\r\n");
    26. Add code snippet

    27. Before we load the application, however, let's set up a serial terminal so that we can observe the output as the program restarts. Open up MTTTY, which can be found at <your_nburn_install_dir>\pcbin. You should see a window pop up that looks a lot like the one below.
    28. MTTTY

    29. Select the proper "Port" from the dropdown above, and hit the "Connect" button in the middle of the terminal. The default values for everything else should work just fine.
    30. Now, back in NBEclipse, go to the Run Button. It looks like a green play button with a downward carrot to the right of it. Select "Run as" > "2 NB Application". Because we already set the IP address of our device when configuring the project, NBEclipse can go ahead and take care of loading the application to the device. After we select "2 NB Application", a completion window should pop up briefly on the screen and fill in as the application is downloaded. It shouldn't take longer than a few seconds for it to finish and go away.
    31. Run

    32. At this point, let's return to our MTTTY terminal. We should see some startup text come up as our device boots, followed by a continual repetition of our phrase of success, "I did it!"
    33. Success MTTTY

    34. If you point your browser at the device now, you should see a plain web page that says, "The main page for the MyFirstProject project." This was auto generated by NBEclipse during the project's creation, and we can change what is displayed here by modifying index.html, which is found in the html directory of the project.
    35. Congratulations! With those all of those steps under your belt, you now know how to turn on your device, locate it on your network, access it through a web browser, and how to create, modify, build, and load an application onto your device using NBEclipse. This is just the beginning, however. With the NetBurner's libraries and examples that come with the development kit, you can get started on anything from an FTP server, to a remotely controlled LED strip, to an Autonomous Car.
Read 212 times Last modified on Thursday, August 30, 2018 8:46 am

Leave a comment

NetBurner Learn

The NetBurner Learn website is a place to learn faster ways to design, code, and build your NetBurner based product. Sign-up for our monthly newsletter!

Latest Articles

We use cookies to help us provide a better user experience.