Raspberry PI User Guide


Thing+ Integragtion Guide for Raspberry Pi

  1. Environment Setting
  2. Install Thing+ Embedded Package
  3. Gatway Registration
  4. How to configure the Wifi Dongle



1. Environment Setting


0) Go to shop to buy the GrovePi+ Starter Kit


1) Micro SD card(8GB+ storage) is required.


2) Download Raspbian image from below link.

  • In case of RaspberryPi 2
    • Raspbian Image Download Link - Raspbian Image
    • We recommend 2015-09-24-RASPBIAN JESSIE version one.
  • In case of RaspberryPi 3
    • Raspbian Image Download Link - Raspbian Image
    • We recommend 2016-05-27-RASPBIAN JESSIE version one.


3) Intall OS on the micro SD card with the donwloaded image. Please refer the below link for more deails about the OS installation.

  • It can take few minutes to install the Raspbian image to the Micro SD card
  • https://www.raspberrypi.org/documentation/installation/installing-images/


4) Telnet/SSH Client is required for controlling the Raspberry Pi from your PC.

  • If you are a Mac or Linux user, please use the default terminal utility.
  • If you are a Windows user, we recommend that you use the “Putty” client to access your Raspberry Pi.
  • Putty Download link - http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe


5) Insert the Micro SD card into the Micro SD card slot of the back panel of your Raspberry Pi. Raspberry Pi + Micro SD card


6) Connect Ethernet(LAN cable), and Power Cable to Raspberry Pi.

For stable Power supply, we recommend that you connect the power cable not USB hub.If the power supply is unstable, the file resource can be broken.

Raspberry Pi + Ethernet & power cable


7) Please wait your Raspberry Pi is booted up completely, and then Connect to it by using SSH Client(for Windows, the Putty)

  • When you can NOT get the IP Address of your device, please refer the Troubleshooting section.

  • ID: pi
  • Password: raspberry

    $ ssh pi@<IP Address>
    pi@<IP Address>'s password: raspberry
    
  • Example for Mac & Linux

    $ ssh pi@192.168.1.XXX
    pi@<IP Address>'s password: raspberry
    
  • Example for Windows

    • Run the putty, and Insert your IP Address, and then, Click the button Open and Enter a password. Raspberry Pi putty login Raspberry Pi putty login

Notice: In case of Windows, you have to re-launch putty, when Raspberry Pi is rebooted.


8) Update time of Raspberry Pi.

  • While installing an application, please Enter y for installation questions.

    @Pi:$ sudo su
    @Pi:$ apt-get update
    @Pi:$ apt-get install -y --force-yes ntp ntpdate
    @Pi:$ ntpdate -u ntp.ubuntu.com
    
  • If you failed to update the time, Update it directly.

    • UTC Time zone (Link): ex) 2015/01/01 00:00:00 => 2015-01-01 00:00:00

      @Pi:$ date --set '20XX-XX-XX XX:XX:XX'
      


9) To distinguish your Raspberry Pi, you need to modify the hostname of it.

Notice: You MUST use arrow buttons on your keyboard, when you want to move a cursor

  • Modify /etc/hostname.

    @Pi:$ sudo nano /etc/hostname
    
  • Change the raspberrypi in the file to your own name(letter, number and hyphen(-) allowed only) like the below image. Raspberry Pi Modify hostname

    • Press CTRL-O and press ENTER to save the changes and press CTRL-X to close the current file you opened and modified.


  • Modify /etc/hosts.

    @Pi:$ sudo nano /etc/hosts
    
  • Change the raspberrypi in the file to the same name you changed at before step. Raspberry Pi Modify hosts

    • Press CTRL-O and press ENTER to save the changes and press CTRL-X to close the current file you opened and modified.
  • To apply your modification, please reboot your Raspberry Pi.

    @Pi:$ sudo reboot
    

10) Re-connect to your Raspberry Pi. (Refer #7 step)

11) To use micro SD card which has storage bigger than 4GB, Run raspi-config.

@Pi:$ sudo su
@Pi:$ raspi-config
  • To use micro SD card which has storage bigger than 4GB, Choose 1. Expand Filesystem. Raspberry Pi + Grove Pi

  • To use I2C, Choose 8. Advanced Options –> A7. I2C, and then please Select Yes for all the following questions. Raspberry Pi + Grove Pi Raspberry Pi + Grove Pi

  • Press Tab key on your keyboard and choose Finish, and then please Select No for the question about Rebooting the device. Raspberry Pi Choose Finish Raspberry Pi Choose Finish

  • Open /etc/modules file and add two new lines(i2c-dev, i2c-bcm2708) on that file.

    @Pi:$ nano /etc/modules
    

    Raspberry Pi Add i2c settings

    • i2c-dev could be already added, because it depends on Raspbian’s version.
    • Press CTRL-O and press ENTER to save the changes and press CTRL-X to close the current file you opened and modified.

12) Reboot Raspberry Pi

@Pi:$ sudo reboot



2. Install Thing+ Embedded Package

1) Connect Grove Pi+ shield, Sensors to Raspberry Pi without Ethernet(LAN cable) and Power Cable.

Reference : LED polarity

LED polarity

Raspberry Pi + Grove Pi Raspberry Pi + Grove Pi

2) Connect Ethernet(LAN cable), and Power Cable to Raspberry Pi. Raspberry Pi + Grove Pi + Power + Ethernet

3) Connect to your Raspberry Pi.

4) Download a install script file.

@Pi:$ wget http://support.thingplus.net/download/install/thingplus_embedded_sdk_pi_install.sh

5) Grant a run permission to the script you downloaded and Install the Thing+ Embedded Package.

  • It can take few minutes to install the Thing+ Embedded Package.

    @Pi:$ sudo su
    @Pi:$ chmod 755 thingplus_embedded_sdk_pi_install.sh
    @Pi:$ ./thingplus_embedded_sdk_pi_install.sh
    

6) Reboot Raspberry Pi

@Pi:$ sudo reboot

3. Gateway Registration

Plesase refer Gateway Registration


[Optional] How to configure the Wifi Dongle

How to configure the Wifi Dongle

This docuement is based on TP-LINK TL-WN727N but you can refer this for other kinds of Wifi dongle

Remark: You should reboot your Raspberry Pi after you plug the Wifi dongle into the Raspberry Pi



1. How to configure the Wifi Dongle


1) reboot your Raspberry Pi after you plug the Wifi dongle into the Raspberry Pi


2) Connect to your Raspberry Pi over SSH


3) Check Wifi Interface Name

@shell:$ iwconfig
wlan0

lo        no wireless extensions.

eth0      no wireless extensions.

usb0      no wireless extensions.
  • In this guide, The Wifi Interface Name is wlan0. The interface name can be different per each Wifi Dongle like wlan#or ra# (‘#’ stands for Number)


4) Network Configuration

  • open /etc/network/interfaces with nano editor

    @shell:$ sudo nano /etc/network/interfaces 
    
  • Configure the Wifi SSID and password at the next line of wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf in auto wlan0 paragraph

  • wlan0 is the WiFi interface name

    ...
    
    auto wlan0                    # If WiFi interface name is 'ra0',
    allow-hotplug wlan0           # Change 'wlan0' to 'ra0' in this paragraph
    iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    wpa-ssid "WiFi SSID"        # Input your Wifi SSID Name 
    wpa-psk  "WiFI password"    # Input your Wifi Password
    
    ...
    
    
  • When you complete the edit task, press CTRL-O and Enter for saving the updates. Press CTRL-X to close the nano editor.


5) Reboot your device

Remark: Connection between your device and DC 5V Power Adaptor is required for using the Wifi Dongle because a Wifi Dongle consumes much more power than normal