Initial setting of Raspberry Pi

(G)Launch Raspberry Pi

Please connect HDMI monitor, keyboard, network to Raspberry Pi.

After inserting the SD card and turning on the power to Raspberry Pi for the first time, the following setting screen (raspi-config) is displayed after the display screen of various drivers is displayed.

Note that raspi-config will not be displayed when operating from the PiRT-Unit serial console described below. You can initialize by logging in with the following user name and password and executing the raspi-config command.

  • ID' : pi
  • Password'' : raspberry

 Debian GNU/Linux 7.0 rtunit0 ttyAMA0
 
 rtunit0 login: pi
 Password:
 Last login: Sat Feb  9 03:40:44 UTC 2013 on ttyAMA0
 Linux rtunit0 3.6.11+ #371 PREEMPT Thu Feb 7 16:31:35 GMT 2013 armv6l
 
 The programs included with the Debian GNU/Linux system are free software;
 the exact distribution terms for each program are described in the
 individual files in /usr/share/doc/*/copyright.
 
 Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
 permitted by applicable law. 
 
 NOTICE: the software on this Raspberry Pi has not been fully configured. Please run 'sudo raspi-config'
 $ raspi-config
 
raspi-config2.png
Raspberry Pi initial setting screen

(G)Setting items

The contents of each item are shown below. Please set each item as necessary.

1 Expand Filesystem Extend the partition of the SD card to be used.In the initial state, since you are not using the whole SD card, please extend it unless there is a particular reason.
2 Change User Password Change the password of the initial setting user "pi" Please change to the user's easy-to-understand password.
3 Enable Boot to Desktop/Scratch It is the setting of the screen at the time of starting, and the default is the console use. Set it if you want to change to GUI usage.
4 Internationalisation Options "Locale", "Time zone", "Keyboard layout" settings.
I1 Change Locale Set the locale, please set the keyboard layout to [ja_JP.ECU-JP ECU-JP] etc. If necessary, installation of Japanese fonts seems to be necessary.
I2 Change Timezone Set the time zone When using in Japan, set [Asia]-[Tokyo].
I3 Change Keyboard Layout Set the keyboard layout to match your keyboard Make keyboard settings. Please set it as Japanese keyboard etc. as necessary.
5 Enable Camera Please set it when camera module is connected.
6 Add to Rastrack Registering with Rastrack
7 Overclock Overclocking
8 Advanced Options Other options. We will only cover items necessary for PiRT-Unit environment here.
A6 SPI To use SPI, set it to Enable. (Disable by default)
A7 I2C To use I2C, set it to Enable. (Disable by default)
9 About raspi-config Information about this tool is displayed.

After setting the above items, please select [Finish] with [Tab] key and execute. Raspberry Pi main unit restarts, various settings become effective.

After rebooting, wait for command input and execute "startx", the Raspbian desktop screen will be displayed.

raspberry_xwindow.png
Raspbian desktop screen

To terminate, please stop using the following command, then unplug the power from the main unit.

 $ sudo halt

(G)Wireless LAN settings

By inserting and setting a wireless LAN dongle in Raspberry Pi 's USB, you can wirelessize Raspberry Pi. It is convenient when installing it in a mobile robot.

(G)edit/etc/network/interfaces

First edit/etc/network/interfaces as follows.

 $ sudo vi /etc/network/interfaces

Rewrite the following two places.

 iface wlan0 inet manual
         ↓
 iface wlan0 inet dhcp

 wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
                      ↓
 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

(G)Edit /etc/wpa_supplicant/wpa_supplicant.conf

Next, register the ESSID and key of the wireless LAN.

 $ sudo bash
 # cd /etc/wpa_supplicant
 # wpa_passphrase ESSID pass >> wpa_supplicant.conf

Enter the ESSID of the wireless LAN for SSID and the wireless LAN key for pass. Be careful to use >> (append) instead of > when redirecting. I think that the result is as follows.

 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 update_config=1
 network={
         ssid="OpenRTM"
         #psk="4332221111"
         psk=142914b76be167767055ff945898baaaf83c42b3ad3b99afb0ae531e8fb15e5e
 }

Depending on the wireless LAN access point settings, additional configuration may be necessary. An example is shown below.

 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 update_config=1
 network={
         ssid="OpenRTM"
         proto=WPA2
         key_mgmt=WPA-PSK
         pairwise=TKIP CCMP
         group=TKIP CCMP
         #psk="4332221111"
         psk=142914b76be167767055ff945898baaaf83c42b3ad3b99afb0ae531e8fb15e5e
 }

Finally, initialize the interface.

 # ifdown wlan0
 # ifup wlan0
 Internet Systems Consortium DHCP Client 4.2.2
 Copyright 2004-2011 Internet Systems Consortium.
 All rights reserved.
 For info, please visit https://www.isc.org/software/dhcp/
  : Omission
 DHCPREQUEST on wlan0 to 255.255.255.255 port 67
 DHCPOFFER from 192.168.11.1
 DHCPACK from 192.168.11.1
 bound to 192.168.11.26 -- renewal in 34810 seconds.

If you can not connect to the wireless LAN here, please review the settings in /etc/network/interfaces, /etc/wpa_supplicant/wpa_supplicant.conf.

 
 # ifconfig wlan0
 wlan0     Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
           inet addr:192.168.11.26  Bcast:192.168.11.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:1218 errors:0 dropped:0 overruns:0 frame:0
           TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:250608 (244.7 KiB)  TX bytes:4506 (4.4 KiB)

Illegally, IP address was assigned to wireless LAN wlan0. 無事、無線LAN wlan0 に IPアドレスが割り振られました。

(G)Remotely connect with host name

When you operate Raspberry Pi with remote login with ssh, if you do not allocate a fixed IP address, you usually need to consult the Raspberry Pi's IP address in the console and connect.

So install the service called avahi compatible with Bonjour. Bonjour is a service to automatically search and use services on the network advocated by Apple. If you use avahi, you can also access Raspberry Pi allocating IP address by DHCP by host name.

(G)Setting the host name

Select and set a host name that does not conflict with other host names.

 $ sudo vi /etc/hostname

Write the host name in /etc/hostname in the first line. The initial value is raspberrypi. In addition, rewrite the portion of 127.0.1.1 raspberrypi in /etc/hosts to the host name you decided above.

 $ sudo vi /etc/hosts

(G)Installation of avahi-daemon

Install the avahi daemon with the following command.

 $ sudo apt-get update
 $ sudo apt-get install avahi-daemon

I will try pinging my host. Use the host name followed by .local.

 $ ping myhost.local

If ping is returned in this way, avahi is almost correctly set.

(G)Installing Bonjour (Windows only)

In order to access RaspberryPi with avahi set from PC, avahi or Bonjour must also be installed on the PC side.

On Linux, you can use it by installing avahi-daemon like RaspberryPi. Also Bonjour is installed by default on Mac, so you do not need to do anything in particular.

On Windows, Bonjour is not installed by default. The easiest way to install Bonjour is to install iTunes.

If you really do not want to install iTunes, you can also extract BonjourSetup.exe by unpacking the downloaded iTunesSetup.exe in an archiver application or the like.

Bonjour is also included in the following Apple Bonjour printing service. (The version seems to be slightly older than what is shipped with iTunes.)

Currently Applie does not distribute Bonjour for Windows alone, but there are also some sites redistributing things that were once distributed. (However, it seems that you can get only the old version.) Below are Bonjour download sites other than Apple site. Please use at your own risk.

(G)Bonjour does not work well

Bonjour may not work well if the firewall is running. In that case, please open UDP port 5353 or turn off the firewall.

(G)Installation of TeraTerm

In order to login via ssh from Windows to RaspberryPi, you need to install the ssh client. There are many clients available on Windows, but here we introduce Tera Term.

After installing TeraTerm, when starting up, a connection dialog will appear. Enter the host name+.Local set earlier in the "Host" text box and press OK. If the password has not been changed,

  • ID: pi
  • Password: raspberry

You can login with. In addition, Linux and Mac open a terminal window

 $ ssh pi@myhost.local
Connect as follows.

Download

latest Releases

For Begginers

Windows msi(installer) package (only trying samples)

C++,Python,Java,
Toolsを含む
1.2.1-RELEASE

Development environment is required for RT-Component development. See download page for details.

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK