Skip to content

Manufacturer Bare Metal Testing Procedure

Greg Corey edited this page Sep 12, 2013 · 10 revisions

Manufacturer Bare Metal Testing Procedure

Updated 09/12/13 09:32

This is the procedure for testing Hauntbox boards from the bare metal off the assembly line. This is not intended for normal users.

Things you'll need:

  • an AVRISP mkII programmer ($35)
  • a hauntbox
  • a formatted and blank microSD card
  • a microUSB cable
  • a 12V power supply
  • a wired ethernet connection for the Hauntbox. DHCP must be running on your network or you need to set a static IP.
  • a working installation of the Arduino IDE (from http://arduino.cc/en/Main/Software)
  • a computer with Bonjour/zeroconf installed. This is built in on all Macs. For windows, install iTunes.
  • software libraries discussed below

Bootloader

Using Arudino IDE 1.0.2

  1. Plug in AVRISP mkII to ICSP header port on the Hauntbox
  2. Plug in a 12V power supply to the Hauntbox
  3. Tools > Board > Arudino Mega 2560 or Mega ADK
  4. Tools > Programmer > AVRISP mkII
  5. Tools > Burn Bootloader (This should take 2-3 minutes)
  6. It should say "Done burning bootloader"
  7. Unplug the AVRISP mkII and set aside. All firmware updates from now on will occur though the microUSB cable

Firmware

Required Arduino libraries

Installation instructions are found here: http://arduino.cc/en/Guide/Libraries

If you get an error "The library xxx cannot be used. Library names must contain only basic letters and numbers. ASCII only and no spaces, and it cannot start with a number" the usual fix is to Uncompress the zip and remove -master from the downloaded folder. Then re-compress it into a zip.

Hauntbox Firmware & Installation

Again, using Arduino IDE 1.0.2

  1. Plug in micro USB to Hauntbox and USB to computer
  2. Plug in a 12V power supply to the Hauntbox
  3. Download the SD Web Files folder from our github at https://github.com/Aylr/theHB
  4. Put all the contents of that folder (not the folder itself) onto the root directory of an empty, formatted SD card
  5. Insert that SD card into your hauntbox (or arduino if you are bringing your own hardware)
  6. Download the latest firmware file Hauntbox_Firmware.ino from https://github.com/Aylr/theHB
  7. Open the file Hauntbox_Firmware.ino with the Arduino IDE
  8. Tools > Board > Arudino Mega 2560 or Mega ADK
  9. Tools > Serial Port > Choose your serial port (usually .tty not .cu)
  10. In the Arduino program: File > Upload. This compiles the firmware and updates your Hauntbox (or arduino).
  11. Make sure you have the libraries installed listed in Required Arduino Libraries
  12. After 10-60 seconds of compiling, the Arduino program should say "uploading" and you will see the yellow Tx and Rx LEDs directly below the microUSB port on the Hauntbox flash rapidly.
  13. After the flashing stops, you should see the message "Done uploading."

Quick Network/LED Testing

  1. Ensure that NO SD card is in the microSD slot.
  2. Plug the Hauntbox into your network with an ethernet cable.
  3. Power the Hauntbox with a 12V power supply via the black power jack
  4. You should see the following LEDs turn on:
    • "On" (green): directly right of the CAT5 jack
    • Inputs A-F (green)
    • Outputs 1-6 (green)
    • Various network LEDs on the CAT5 jack and hauntbox (green and yellow)
  5. Open the Arudino > Tools > Serial Monitor. Set the baud rate to 115200. You should see the following:
    • "Starting up Hauntbox. Free RAM: nnnn KB"
    • "Setting up SD card..."
    • "Setting up the Ethernet card..."
    • "Web server starting..."
    • "Ready to accept web requests at http://hauntbox.local or at http://xxx.xxx.xxx.xxx" (the IP address assigned by your network's DHCP)
  6. All input and output LEDs will remain flashing indicating that there is no SD card.
  7. Open your browswer (on the same network) and go to http://hauntbox.local
  8. You should see a plain page titled "SD Card Failed"
  9. At this point you've verified that the network is working and that the IO LEDs are working.

Full Network/SD/IO Testing

  1. Plug the Hauntbox into your network with an ethernet cable.
  2. Power the Hauntbox with a 12V power supply via the black power jack
  3. You should see the following LEDs turn on:
    • "On" (green): directly right of the CAT5 jack
    • Inputs A-F (green)
    • Outputs 1-6 (green)
    • Various network LEDs on the CAT5 jack and hauntbox (green and yellow)
  4. Open the Arudino > Tools > Serial Monitor. Set the baud rate to 115200. You should see the following:
    • "Starting up Hauntbox. Free RAM: nnnn KB"
    • "Setting up SD card..."
    • "Setting up the Ethernet card..."
    • "Web server starting..."
    • "Ready to accept web requests at http://hauntbox.local or at http://xxx.xxx.xxx.xxx" (the IP address assigned by your network's DHCP)
  5. At this point you should see all the input & output LEDs go off indicating a ready state.
  6. Open your browswer (on the same network) and go to http://hauntbox.local
  7. Wait approximately 30-45 seconds for the interface to fully load. The initial load is slow due to the limits of the microprocessor.
  8. Navigate to the override page.
  9. Turn all outputs ON. All output LEDs should turn on.
  10. Turn all outputs OFF. All output LEDs should turn OFF.
  11. At this point you've verified:
    • That the network is working
    • SD card functions correctly
    • IO indicator LEDs function

Static IP address

Use only if you don't have DHCP on your network

If you do not have a network with DHCP, which is fairly uncommon, or if you want your hauntbox to have a static IP address do the following:

  1. Using a text editor (Notepad on Windows, TextEdit on Mac, nano on Linux) make a new text file called ip.txt. This file should have a static ip in the format of "192.168.1.1" on the first line and nothing else.
  2. Put the file ip.txt on the SD card of the hauntbox.
  3. Put the SD card back into the hauntbox
  4. Reset the hauntbox.