-
Notifications
You must be signed in to change notification settings - Fork 6
Manufacturer Bare Metal Testing Procedure
darrencorey edited this page Aug 29, 2013
·
10 revisions
This is the procedure for testing Hauntbox boards from the bare metal off the assembly line. This is not intended for normal users.
- 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
Using Arudino IDE 1.0.2
- Plug in AVRISP mkII to ICSP header port on the Hauntbox
- Plug in a 12V power supply to the Hauntbox
- Tools > Board > Arudino Mega 2560 or Mega ADK
- Tools > Programmer > AVRISP mkII
- Tools > Burn Bootloader (This should take 2-3 minutes)
- It should say "Done burning bootloader"
- Unplug the AVRISP mkII and set aside. All firmware updates from now on will occur though the microUSB cable
Installation instructions are found here: http://arduino.cc/en/Guide/Libraries
- Ethernet library from Arduino (included in the IDE)
- SD library (included in the IDE)
- EthernetBonjour library https://github.com/neophob/EthernetBonjour
- Note: EthernetBonjour does not support version 1.0 or higher of the Arduino IDE. You must make the following changes in order to compile it:
- In EthernetBonjour.cpp: Remove
#include "wiring_private.h", and add#include Arduino.houtside of theextern C {}declaration. - In utility/EthernetCompat.cpp, do the same, this time removing
#include "wiring.h".
- In EthernetBonjour.cpp: Remove
- Note: EthernetBonjour does not support version 1.0 or higher of the Arduino IDE. You must make the following changes in order to compile it:
- TinyWebServer https://github.com/ovidiucp/TinyWebServer
- Flash (required by TinyWebServer) http://arduiniana.org/libraries/flash/
Again, using Arduino IDE 1.0.2
- Plug in micro USB to Hauntbox and USB to computer
- Plug in a 12V power supply to the Hauntbox
- Download the SD Web Files folder from our github at https://github.com/Aylr/theHB
- Put all the contents of that folder (not the folder itself) onto the root directory of an empty, formatted SD card
- Insert that SD card into your hauntbox (or arduino if your are bringing your own hardware)
- Download the latest firmware file Hauntbox_Firmware.ino from https://github.com/Aylr/theHB
- Open the file Hauntbox_Firmware with the Arduino IDE
- Tools > Board > Arudino Mega 2560 or Mega ADK
- Tools > Serial Port > Choose your serial port
- In the Arduino program: File > Upload. This compiles the firmware and updates your Hauntbox (or arduino).
- 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.
- After the flashing stops, you should see the message "Done uploading."
- Ensure that NO SD card is in the microSD slot.
- Plug the Hauntbox into your network with an ethernet cable.
- Power the Hauntbox with a 12V power supply via the black power jack
- 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)
- 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)
- All input and output LEDs will remain flashing indicating that there is no SD card.
- Open your browswer (on the same network) and go to http://hauntbox.local
- You should see a plain page titled "SD Card Failed"
- At this point you've verified that the network is working and that the IO LEDs are working.
- Plug the Hauntbox into your network with an ethernet cable.
- Power the Hauntbox with a 12V power supply via the black power jack
- 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)
- 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)
- At this point you should see all the input & output LEDs go off indicating a ready state.
- Open your browswer (on the same network) and go to http://hauntbox.local
- Wait approximately 30-45 seconds for the interface to fully load. The initial load is slow due to the limits of the microprocessor.
- Navigate to the override page.
- Turn all outputs ON. All output LEDs should turn on.
- Turn all outputs OFF. All output LEDs should turn OFF.
- At this point you've verified:
- That the network is working
- SD card functions correctly
- IO indicator LEDs function
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:
- 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.
- Put the file ip.txt on the SD card of the hauntbox.
- Put the SD card back into the hauntbox
- Reset the hauntbox.