Setup DreamPlug

From Meteohub Wiki
Jump to navigation Jump to search

Initial Setup of DreamPlug

To setup the DreamPlug to boot from SD card, you have to change the uboot environment. This is done via a serial console connection provided by the necessary JTAG board for your DreamPlug and by a Linux PC.

  1. Download Meteohub installer from here.
  2. Login as user "root" on your Linux PC. If you don't have one, make use of one of the live Linux CDs that allow to use Linux right from a CD without having to install something on your hard disk. Take one of the major distributions that works well with your PC's hardware.
  3. Goto to directory "/home" by giving the command
    cd /home
  4. Copy downloaded installer archive "dreamplug-installer.tgz" to directory "/home" and extract the files with command
    tar xzpf dreamplug-installer.tgz
  5. Goto to directory "dreamplug-installer" by command
    cd dreamplug-installer
  6. Connect DreamPlug with 4-wire cable to the JTAG board. Corresponding connectors on DreamPlug and JTAG board are labeled "UART". Make sure JTAG board is in UART-mode (check Dip switch on the JTAG board's top).
  7. Connect JTAG board with USB cable to a USB port of your PC.
  8. Check system messages of your Linux PC to find out which devices maps to the JTAG Board. Give command
    dmesg | tail
    There you will find information that Linux has discovered a new USB serial device named "/dev/ttyUSB??". In the following steps I assume it is mapped to "/dev/ttyUSB0".
  9. Change environment settings by calling command
    ./dreampatch /dev/ttyUSB0 meteohub.env
  10. Program is now waiting for a DreamPlug starting to boot. Therefore, power-up the DreamPlug or press the reset button, if it is already up and running. Shortly after this dreampatch program should printout a successful log like this:
    Waiting for DreamPlug boot process...
    Boot process identified.
    Boot loader halted.
    [......]
    6 Environment settings changed (0 failed).
    Environment settings permanently stored.
  11. From now on DreamPlug will try to boot your Meteohub software from the SD card first. If there is no SD card there, DreamPlug will boot preinstalled Ubuntu Linux GlobalScale is shipping it with. You can now disconnect the JTAG board.


Setup of SD card

You need a 4GB SLC SD card like Transcend TS4GSDHC150 or Integral Endurance 4GB. As you need a Linux Box for the previous step, only Linux way to write SD card is described. First step is to download the lates Meteohub SD card image for DreamPlug from here. Unrar the file "mhdreamplug-vxyz.rar" to get the 4GB image file "mhdreamplug-vxyz.img". Please insert the SD card into your Linux box and check via "dmesg" what device the SD card has been mapped to. In the following example it has been mapped to "/dev/sdg"

# dmesg
...
[4249761.783380] sd 7:0:0:3: [sdg] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
[4249761.792619] sd 7:0:0:3: [sdg] Assuming drive cache: write through
[4249761.806113] sd 7:0:0:3: [sdg] Assuming drive cache: write through
[4249761.806116]  sdg: sdg1 sdg2 sdg3

We are just looking for "sdg" and are not interested in the partitions recognized on the SD card (sdg1, sdg2, sdg3). The print out above tells that "/dev/sdg" is the target device. To make sure that the device ist not mounted by some background processes you should manually unmount all partitions by "umount". In the given example this will be

umount /dev/sdg1; umount /dev/sdg2; umount /dev/sdg3

When this throws errors about not mounted file systems that is fine. Don't worry. Now it is time to bring the Meteohub image onto the SD card. In the example above this will be done by

dd if=mhplug-vxyz.img of=/dev/sdg bs=1M

Please be careful with that command. When you choose the wrong "of=" target (i.e. your system drive) this will be overwritten without further notice and you will have to restore your Linux box! As dd has to transport 4GB of data to the SD card this will take a few minutes. When finished dd will report number of written blocks. If it reports that not all blocks could be written, something is wrong with your SD card (may be less than 4GB in size?).
When "dd" has completed without error, this step is finished and you can pull the SD card from your Linux box. Insert SD card into the DreamPlug, connect inner ethernet port with your LAN (outer port is not operational with Meteohub) and power cycle your DreamPlug.


Start Meteohub

  1. You can now reach the Meteohub system by your desktop's/laptop's browser at the emergency IP 192.168.1.77 ("http://192.168.1.77") and if you have a DHCP server in your LAN you also can find your Meteohub at the address given by the DHCP server. [b]User name is "meteohub", password is "meteohub"[/b]. To reach the emergency IP with your browser you probably have to do reconfigure the IP address of your desktop/laptop as described in #Setup of unmodified NSLU2 in your LAN (explains how to bring you desktop into the same subnet as Meteohub). Having reached the Meteohub web interface you can set the IP persistently.
  2. Furthermore, the Windows tool "ipscan" (download here might be helpful to examine the IP that the router has given Meteohub via DHCP, if Meteohub is configured to make use of a dynamic IP via DHCP.
  3. About a minute after reboot Meteohub signals its IP by blinking LEDs.


Read the Blinks

About one minute after starting reboot Meteohub signals its IP by LED blinking, as it has no buzzer attached.

Signaling of the IP starts about one minute after boot. Sequenze begins with blue LED opposite to green power LED going off, then each of the four numbers (delimited by a dot) will be signaled one by one via blue blinks of the LED next to the green power LED. The dot between the numbers will be signaled by a blink of the blue LED opposite to the power LED. Each number is signaled by blinking digit per digit. Each digit is represented by a short blue blink of the LED next to the power LED repeated as often as the digit tells us. The zero digit is signaled by ten blinks. After having done this for all digits of all numbers of the IP, the sequenze is done, an the LED opposite to the power LED is constantly turned on blue again.

Example: IP 192.168.10.77 Legend: N = blue LED next to power LED, O = blue LED opposite to power LED, _ = LED is dark

Signal:                                          Comment
OOOO___N___N_N_N_N_N_N_N_N_N___N_N___O           192
___N___N_N_N_N_N_N___N_N_N_N_N_N_N_N___O         168
___N___N_N_N_N_N_N_N_N_N_N___O                   10
___N_N_N_N_N_N_N___N_N_N_N_N_N_N___OOOO          77

When Meteohub does not have a valid IP this will be signaled with three blinks shortly following each other.