MiraBoxUser Guide –page1 / 27 MiraBox User Guide -Sep18, 2012 Contents A. Package contents .............................................................................................................................................. 2 B. MiraBox appearance and connecting ports................................................................................................... 4 C. LED indication ...............................................................................................................
MiraBoxUser Guide –page2 / 27 A. Package contents 1. Standard package contents 2 5 1 MiraBoxstandard content List Remark 1 MiraBox 1 unit Mirabox main unit 2 AC-DC Power Adapter 1 pc Input 90-240VAC / output 5V,3A DC 3 Ethernet Cable 1 pc Cat 5e 4 USB3.
MiraBoxUser Guide –page3 / 27 2.
MiraBoxUser Guide –page4 / 27 B.
MiraBoxUser Guide –page5 / 27 7 9 8 Mirabox ports description Connection port Description Remark 1 Power Port DC 5V/3A port 2 RJ45 #1 Gigabit Ethernet port1 3 RJ45 #2 Gigabit Ethernet port2 4 USB 3.0 port#1 USB 3.0 high speed host 5 USB 3.0 port#2 USB 3.0 high speed host 6 Mini USB console port Debug console Connect to PC USB port 7 Multi-I/O port JTAG and GPIO port Connect to external JTAG/GPIO box for system development.
MiraBoxUser Guide –page6 / 27 C.
MiraBoxUser Guide –page7 / 27 D. System console and debugging 1. Driver and tool installation. (1) Prepare one Windows PC (2) Download the serial communication tool “putty.exe”. (3) Downloadthe driver “2KXPVDock.exe”forProlific-USB-to-Serial-Comm-Portat our Website. http://www.globalscaletechnologies.com/t-downloads.aspx (4) Install driver on your PC (only for the first time) (4-1) Connect Mirabox to your Windows PC Connect Mini USB cable here.The other end connects to computer’s USB port.
MiraBoxUser Guide –page8 / 27 (4-3) Run file “2KXPVDock.exe”and the driver will be installed to the PATH C:\cabs\2KXPVDock”. Click “Next” to complete t (5) Find out the com port of your debugger on your windows PC.
MiraBoxUser Guide –page9 / 27 (5-2) Find out your com port as below (here is com3 for example) (6) Run “putty.exe”and configure as below on yourWindows PC.
MiraBoxUser Guide –page10 / 27 2. Go into debugging console. (1) Power on the MiraBoxand you will see messages on screen as below (2) You can press any key to stop auto-boot when you see the bootdelay timer is counting down. After entering the uboot prompt, you can also change the uboot environment variables such asbootdelaytime, Ipaddr,serverip and so on.
MiraBoxUser Guide –page11 / 27 (4) Now you are the root user and have the full control of the mirabox 3. WiFi AP mode testing MiraBoxServer has a built-in WiFi module which is in compliance with 802.11 b/g/n standard. The WiFican work as client or AP modebut only one at a time. The default mode is AP modeevery time when it powers on, and the indication light D6 is blinking blue. Here are steps for testing: (1) Enter command and you will see message for uap0 device.
MiraBoxUser Guide –page12 / 27 2. Select “View Available Wireless Networks” 3. Choose name with “mira-uAP-6344”, here digits”6344” is the last four digits of MAC address for the MiraBoxWiFi Then click “Connect”. 4. Successfully connected.
MiraBoxUser Guide –page13 / 27 4. WIFI Client mode testing (1) Switchto WiFiclient mode by giving command as following. # wlan.sh When done successfully, the LED(D7) is blinking green and mlan0 is activated.
MiraBoxUser Guide –page14 / 27 (3) Scan for WiFi AP near-by # iwlist mlan0 scan
MiraBoxUser Guide –page15 / 27 (4) Connect to WiFi AP # iwconfig mlan0 essid # dhclient mlan0 # ifconfig mlan0 #ping 192.168.1.1 The below screenshot is a example for how to connect a mlan device. If you can see IP address (for example: 192.168.1.102) means you have already connected and got an IP. (5) Switch back to WiFi AP mode There are two useful script files: Client_ap.sh – switch from wifi client mode to wifi AP mode Wlan.
MiraBoxUser Guide –page16 / 27 5. Gigabit ethernet ports (1) Connect the two Gigabit Ethernet ports to Gigabit switch by Network cables. Normally it will get an IP address assigned by DHCP.
MiraBoxUser Guide –page17 / 27 6. USB 3.0 port (1) Plug in the usb3.0 hard disk or flash disk to the USB port then you can see some driver messages as below of this device (2) View the usb3.0 hard disk #fdisk-l you will see below messages of the usb3.0 devicewhich is usually shown as /dev/sdb*、/dev/sdc*. (3) Testing the access speed of the usb3.
MiraBoxUser Guide –page18 / 27 7. Multi-IO port Connect the MIRABOX JTAG/GPIO box to the Multi-IO port via Multi-IO cable. Multi‐I/O port Multi‐I/O Cable MiraBox JTAG/GPIO box (1) JTAG interface Please connect the debugger to the 20‐pin JTAG slot as shown below, here we use the Marvell BlackStone debugger and XDB(Marvell eXtreme Debugger 5.1) software on Windows PC for example.
MiraBoxUser Guide –page19 / 27 Debugger connection Marvell BlackStone debugger MiraBox JTAG GPIO Run XDB on Windows PC
MiraBoxUser Guide –page20 / 27 (2) GPIO interface and control (2-1) There is a demo program to show the GPIO LEDs by entering command as below: #ledtest1 This will light up the LEDs for 3 seconds then light off. (2-2)Control the LED by yourself The other side is GPIO port 0 GPIO port 4 GPIO port 3 GPIO port 2 GPIO port 1 \
MiraBoxUser Guide –page21 / 27 a. preparation 1. Prepare a host pc with linux (as:fedora 14) installed, and download the cross tool chain “arm-marvell-linux-gnueabi-vfp.tar.bz2” from our websitehttp://www.plugcomputer.org/downloads/d2plug/ or http://www.globalscaletechnologies.com or 2. Install and configure the tool chain Copy “arm-marvell-linux-gnueabi-vfp.tar.bz2” to directory /opt #cd /opt #tar -jxfarm-marvell-linux-gnueabi-vfp.tar.bz2 #ls #vim /root/.
MiraBoxUser Guide –page22 / 27 b. compile the program Here has an example “i2c_led.c” for you to debugging /*i2c_led.c*GTI‐‐Globalscaletechnologies.,INC**/ #include #include #include #include #include #include #include #include
MiraBoxUser Guide –page23 / 27 struct i2c_rdwr_ioctl_data e2prom_data; fd=open("/dev/i2c‐0",O_RDWR);/* /dev/i2c‐0 is registered to the system */ if(fd<0) { perror("open error"); } e2prom_data.nmsgs=2; e2prom_data.msgs=(struct i2c_msg*)malloc(e2prom_data.nmsgs*sizeof(struct i2c_msg)); if(!e2prom_data.msgs) { perror("malloc error"); exit(1); } ioctl(fd,I2C_TIMEOUT,1);/*timeout */ ioctl(fd,I2C_RETRIES,2);/*retries times*/ /***write data to e2prom**/ e2prom_data.nmsgs=1; (e2prom_data.msgs[0]).
MiraBoxUser Guide –page24 / 27 /*********** control the GPIO OP‐2 **************************************/ //turn on LED (e2prom_data.msgs[0]).buf[0]=0x1a;// e2prom write address (e2prom_data.msgs[0]).buf[1]=0x0;//the data to write ret=ioctl(fd,I2C_RDWR,(unsigned long)&e2prom_data); if(ret<0) { perror("ioctl error3"); } //turn off LED sleep(1); //delay 1 second (e2prom_data.msgs[0]).buf[0]=0x1a;// e2prom write address (e2prom_data.msgs[0]).
MiraBoxUser Guide –page25 / 27 /*********** control the GPIO OP‐4 **************************************/ //turn on LED sleep(1); (e2prom_data.msgs[0]).buf[0]=0x1c;// e2prom write address (e2prom_data.msgs[0]).buf[1]=0x0;//the data to write ret=ioctl(fd,I2C_RDWR,(unsigned long)&e2prom_data); if(ret<0) { perror("ioctl error5"); } //turn off LED sleep(1); (e2prom_data.msgs[0]).buf[0]=0x1c;// e2prom write address (e2prom_data.msgs[0]).
MiraBoxUser Guide –page26 / 27 8. Reset 6、GPIO reset button hole. (1) GPIO reset button The reset button is connected to one GPIO which means controlled by software. When you press down this button by using a sharp pin, it arouses attention of CPU then CPU asserts the master reset low signal to start the system reset session. Below is the reboot screen after reset Note: Since this reset function is controlled by software so it will not be handled during boot-up session.
MiraBoxUser Guide –page27 / 27 9. Download sites To download the files for MiraBox server, please visit: http://www.globalscaletechnologies.com/t-downloads.aspx Other useful resource links are: http://www.plugcomputer.org/ http://plugcomputer.org/plugwiki/index.php/GuruPlug 10. FCC STATEMENT 1. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) This device may not cause harmful interference.