-------------------------------------------------------------------------- Homenet3D for OpenWRT (v0.1): Startup (released 22nd Jan 2014) -------------------------------------------------------------------------- This document is part of Homenet3D for OpenWRT: http://caia.swin.edu.au/urp/homenet3d/openwrt It provides instructions for installing OpenWRT firmware and Homenet3D package on the TP-Link WR-1043ND. For instructions on installing firmware, see: http://caia.swin.edu.au/urp/homenet3d/downloads/homenet3d-installing-firmware-v0.1.txt INTRODUCTION ------------ This guide provides instructions on how to start and access the Homenet3D virtual world after installing Homenet3D OpenWRT firmware on a TP Link WR1043ND (or other) router. To run the firmware in a QEMU emulated ARM or MIPS environment please see section STARTING THE SERVER (ARM/MIPS). STARTING THE SERVER ------------------- The Homenet3D server and it's helper scripts are triggered to start as daemons with the system start. The three executables are: - /bin/homenet3D-server - /bin/sys-state - /bin/datarate The 'homenet3D-server' executable is a C program that provides communication between to clients and the router over WebSockets(10001) as well as accepting constant updates about system state from the 'sys-state' script on local UDP port 27960. The 'sys-state' script checks system state every second and sends the updates to 'homenet3D-server'. Every 30 seconds the script will send all system state information in full, in order to make sure all information is correct. The 'datarate' script calculates the average data being passed through the ethernet ports and writes this to files which are read by the system state script and in turn sent as an update to the homenet3d-server Then the Homenet3D world will be accessible on your router. Use the router's IP: (e.g) http://192.168.1.1/w3b/w3bworld.html Known Issue ----------- There is a minor issue with the system state script and the homenet3d server in that the entities of the virtual world are only initialised after a client connects. However, the system state script runs from the get go but it's updates are ignore until a client connects. This means that initially most system state in the virtual world is inaccurate or missing. But once the full system state information update is sent (every 30 seconds) the inconsistencies are corrected. STARTING THE SERVER (ARM/MIPS) ------------------------------ In order to get an idea of how this server would run on embedded architecture you can use a emulation program called QEMU to run the firmware. For more information on QEMU, please visit: http://www.qemu.org You will need a QEMU version of 1.5.1 or later. From the command the following commands will give you a command line based emulation: For ARM: ~: qemu-system-arm -M realview-pbx-a9 -kernel openwrt-realview-vmlinux.elf \ -m 128m -nographic -redir tcp:2200::22 -redir tcp:8080::80 -redir tcp:10001::10001 For MIPS: ~: qemu-system-mipsel -M malta -kernel openwrt-malta-le-vmlinux-initramfs.elf \ -m 128m -nographic -redir tcp:2200::22 -redir tcp:8080::80 -redir tcp:10001::10001 Once the system has fully started you will need to run one command to bind the man network interface to a NAT: ~: udhcpc -i br-lan Then the Homenet3D world will be accessible at: http://localhost:8080/w3b/w3bworld.html IF SOMETHING GOES WRONG ----------------------- In order to troubleshoot and resolve issues with Homenet3D you will need SSH access to the router. You may need to enable this via the OpenWRT web interface (under Administration). CONTRIBUTIONS ------------- We welcome your feedback and contributions! If you have discovered a bug, have a request for a new feature, have produced a code patch or a new classifier model, please contact: Grenville Armitage (garmitage@swin.edu.au) Dominic Allan (dallan@swin.edu.au) CONTACT ------- The Homenet3D website is: http://www.caia.swin.edu.au/urp/homenet3d If you have any questions or want to report any bugs please contact: Grenville Armitage (garmitage@swin.edu.au) Dominic Allan (dallan@swin.edu.au) Centre for Advanced Internet Architectures Swinburne University of Technology Melbourne, Australia CRICOS number 00111D http://www.caia.swin.edu.au