You are here

Configuring The Guru Plug

Here's a list of steps to get you started with the Guru Plug. It's basically a summary of information scattered across various websites. I'm mainly using this as a reference for myself but I'm posting it here in case you might find it useful, too. This page may be updated without warning.

  • Since the OS that comes installed with the device is outdated, you should update. Get the latest U-Boot (uboot.guruplug.bin), Kernel (uImage-guruplug) and RootFS (rootfs.ubi.img) images from the official download site and copy them to a FAT formatted USB stick.

  • Connect the JTAG adapter to the Guru Plug and your computer. Use screen or any other terminal emulator to access the plug:


    screen /dev/ttyUSB0 115200
  • Plug in the plug (hehe). When prompted, hit any key to interrupt the booting process. Update U-Boot with the following commands (taken from here):

    usb start
    fatload usb 0:1 0x0800000 uboot.guruplug.bin  #type 1:1 if you're using the lower USB port
    nand erase 0x0 0xa0000
    nand write 0x0800000 0x0 0xa0000
    reset
  • Interrupt the boot process again, then update the kernel (see here for more info):

    usb start
    fatloat usb 0:1 0x6400000 uImage-guruplug
    nand erase 0x100000 0x400000
    nand write.e 0x6400000 0x100000 0x400000
  • Finally, update the rootfs. After you enter the first command the image size will be printed on the screen. Convert this number into the Hexadecimal format, you'll need it later. Don't worry about bad blocks, this is nothing unusual as long as there aren't too many of them.

    fatload usb 0:1 0x6400000 rootfs.ubi.img
    nand erase 0x500000 0x1fb00000
    nand write.e 0x6400000 0x500000 0x(SIZE_IN_HEX)
    reset

The plug should reboot into the new operating system. Login as root via WiFi or JTAG (user: root, pass: nosoup4u), then perform the following maintenance tasks.

  • Set a new root password:

    passwd
  • As my friend Jan pointed out, the plugs are shipped with the same SSH host keys on each one. You should generate new host keys immediately since this is a major security flaw:

    rm /etc/ssh/ssh_host_*
    dpkg-reconfigure openssh-server
  • If you want to use the plug as a WiFi access point, edit /root/init_setup.sh to set the encryption as explained here. Edit the following line to set your own SSID:

    /usr/bin/uaputl sys_cfg_ssid $SSID

Right below that, insert the following lines to set up WPA2 encryption:


    /usr/bin/uaputl sys_cfg_protocol 32
    /usr/bin/uaputl sys_cfg_wpa_passphrase "yourpassword"
    /usr/bin/uaputl sys_cfg_cipher 8 8
  • Set your timezone:

    dpkg-reconfigure tzdata
  • Set your hostname:

    echo "newhostname" > /etc/hostname
  • By default, the system time is set to some day in 2021 which renders the Debian repository keys invalid. I use rdate to set the system time:

    aptitude install rdate
    rdate ptbtime2.ptb.de
  • Reboot the plug to apply the new settings. Log back in and update the software via the APT repository:

    aptitude update
    aptitude upgrade

Remember that you just changed the SSH host keys so you should get a warning when you try to log in using SSH. Remove the violating keys from your ~/.ssh/known_hosts file and you should be fine.

Unfortunately, there is a serious problem that causes the plug to crash and reboot once both LAN ports are in use and one of them is attached to a Gigabit device, even with the latest images. Thus using it as a combined WiFi/LAN router is currently impossible. Discussions in various forums suggest that this may be caused by the plug overheating which I can confirm. I cooled the plug using a large desktop fan, plugged in the Gigabit and it worked without problems.

Content Topics: