<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Category%3ARPI_Setup</id>
	<title>Category:RPI Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Category%3ARPI_Setup"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Category:RPI_Setup&amp;action=history"/>
	<updated>2026-07-22T00:27:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=Category:RPI_Setup&amp;diff=28118&amp;oldid=prev</id>
		<title>Chao: Created page with &quot;* RPI === Install OS Raspbian === * Use Noobs or Raspbian, can [http://www.raspberrypi.org/downloads/ download from here] * Default pasword for user pi is raspberry * Use...&quot;</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Category:RPI_Setup&amp;diff=28118&amp;oldid=prev"/>
		<updated>2020-09-23T04:03:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;* &lt;a href=&quot;/w/RPI&quot; class=&quot;mw-redirect&quot; title=&quot;RPI&quot;&gt;RPI&lt;/a&gt; === Install OS Raspbian === * Use Noobs or Raspbian, can [http://www.raspberrypi.org/downloads/ download from here] * Default pasword for user pi is raspberry * Use...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;* [[RPI]]&lt;br /&gt;
=== Install OS Raspbian ===&lt;br /&gt;
* Use Noobs or Raspbian, can [http://www.raspberrypi.org/downloads/ download from here]&lt;br /&gt;
* Default pasword for user pi is raspberry&lt;br /&gt;
* Use USB-TTL cable connect, and setup wifi&lt;br /&gt;
* enable SSH in raspi-config, then you can SSH login via wlan&lt;br /&gt;
&lt;br /&gt;
=== Headless Setup ===&lt;br /&gt;
==== Config via UART, SSH ====&lt;br /&gt;
* To enable it, add enable_uart=1 to config.txt. &lt;br /&gt;
* After set wifi, also set SSH on by raspi-config&lt;br /&gt;
==== Use Wifi ====&lt;br /&gt;
* run ifconfig to check ip address of wlan0&lt;br /&gt;
* To scan for WiFi networks, use the command: sudo iwlist wlan0 scan&lt;br /&gt;
* note: 1. '''Make sure enough power for wifi card''', 2. '''SSID and password are case sensitive'''&lt;br /&gt;
* After setup you can connect by SSH via Wifi&lt;br /&gt;
* You can set multiple wifi configuration, open the wpa-supplicant configuration file in nano: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf&lt;br /&gt;
Go to the bottom of the file and add the following:&lt;br /&gt;
 network={&lt;br /&gt;
     ssid=&amp;quot;he_work&amp;quot;&lt;br /&gt;
     psk=&amp;quot;Your_wifi_password&amp;quot;&lt;br /&gt;
     scan_ssid=1 # auto find and connect&lt;br /&gt;
 }&lt;br /&gt;
 network={&lt;br /&gt;
     ssid=&amp;quot;hechao&amp;quot;&lt;br /&gt;
     psk=&amp;quot;Your_wifi_password2&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Use RealVNC ====&lt;br /&gt;
* Default install in RPI from 2016 September.&lt;br /&gt;
* [https://www.realvnc.com/docs/raspberry-pi.html#raspberry-pi-connect or follow instruciton manually install here.]&lt;br /&gt;
* Install for old debian 7 Wheezy:&lt;br /&gt;
 curl -L -o VNC.tar.gz https://www.realvnc.com/download/binary/latest/debian/arm/&lt;br /&gt;
 tar xvf VNC.tar.gz&lt;br /&gt;
 sudo dpkg -i &amp;lt;VNC-Server-package-name&amp;gt;.deb [&amp;lt;VNC-Viewer-package-name&amp;gt;.deb]&lt;br /&gt;
* Start service and set it on boot&lt;br /&gt;
 sudo /etc/init.d/vncserver-x11-serviced start&lt;br /&gt;
 sudo update-rc.d vncserver-x11-serviced defaults&lt;br /&gt;
&lt;br /&gt;
==== Use FTP (also can use SSH default) ====&lt;br /&gt;
* install vsftpd, and then edit the conf file:&lt;br /&gt;
 sudo apt-get install vsftpd&lt;br /&gt;
 sudo nano /etc/vsftpd.conf&lt;br /&gt;
* The setup&lt;br /&gt;
 anonymous_enable=NO // default, no need change, do not allow anonymous&lt;br /&gt;
 local_enable=YES // default, no need change, allow local user login&lt;br /&gt;
 write_enable=YES // allow upload&lt;br /&gt;
 local_umask=002 // set upload file right 663, folder 775 , or set to 000&lt;br /&gt;
* Allow root login to FTP, comment root line&lt;br /&gt;
 sudo nano /etc/ftpusers&lt;br /&gt;
* restart service after edit&lt;br /&gt;
 service vsftpd restart&lt;br /&gt;
Now you can login in to RPI FTP with pi or root user.&lt;br /&gt;
&lt;br /&gt;
==== Use Bluetooth for RPI2 ====&lt;br /&gt;
* install software: apt-get install bluetooth bluez-utils bluez-compat blueman&lt;br /&gt;
* check devices, after plug in USB Bluetooth adapter: lsusb&lt;br /&gt;
See there is no proper equipment to identify Bluetooth Dongle, For instance,&lt;br /&gt;
Bus 001 Device 005: ID 0a12: 0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)&lt;br /&gt;
&lt;br /&gt;
* Then run&lt;br /&gt;
 / Etc / init.d / bluetooth status or # service bluetooth status&lt;br /&gt;
Bluetooth service to see whether the normal operation.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Normal, then it should be&lt;br /&gt;
 [Ok] bluetooth is running.&lt;br /&gt;
&lt;br /&gt;
* Use this command to view visibility around the address and name of the device:&lt;br /&gt;
 Hcitool scan&lt;br /&gt;
        aa: bb: cc: dd: ee: ff Wireless Keyboard&lt;br /&gt;
        ff: ff: bb: cc: dd: aa Nokia XXXX&lt;br /&gt;
&lt;br /&gt;
Run (later replaced with your device's address):&lt;br /&gt;
 Bluez-simple-agent hci0 aa: bb: cc: dd: ee: ff&lt;br /&gt;
Enter a password (0000) here, Enter.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the Bluetooth keyboard, Bluetooth devices go over there to enter the password you just set (0000) Enter.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Success should say&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
......&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 Release&lt;br /&gt;
&lt;br /&gt;
...... Like: Creating device failed if the failure occurs. Please try again. Verify the Bluetooth device is in pairing request state.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
............&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Use this command (do not forget to replace the correct address) will this new device is added to the trusted list:&lt;br /&gt;
 Bluez-test-device trusted aa: bb: cc: dd: ee: ff yes&lt;br /&gt;
&lt;br /&gt;
* Use this command to manually start the connection:&lt;br /&gt;
 Bluez-test-input connect aa: bb: cc: dd: ee: ff&lt;br /&gt;
&lt;br /&gt;
=== Normal setup ===&lt;br /&gt;
==== Use Monitor ====&lt;br /&gt;
* Connect your RPI to TV via HDMI port, and power it up.&lt;br /&gt;
* Plug the wireless device, setup your wireless environment in the graphic desktop&lt;br /&gt;
* Now you can leave the TV and start with SSH, opened default in SSH&lt;br /&gt;
* Install the following VNC tool for further visualization.&lt;br /&gt;
&lt;br /&gt;
==== Raspi-config ====&lt;br /&gt;
Options:&lt;br /&gt;
* enter into graphic desktop or text console&lt;br /&gt;
* Disable overscan to enter fullscreen for some LCDs&lt;br /&gt;
* Overclocking to get better performance!&lt;br /&gt;
==== HDMI setup ====&lt;br /&gt;
* choose output type for audio&lt;br /&gt;
 amixer cset numid=3 x&lt;br /&gt;
in which&lt;br /&gt;
 0 = auto&lt;br /&gt;
 1 = analog&lt;br /&gt;
 3 = HDMI&lt;br /&gt;
* or edit in raspi-config audio option&lt;br /&gt;
* force to turn on HDMI audio in /boot/config.txt&lt;br /&gt;
 hdmi_drive=2&lt;br /&gt;
&lt;br /&gt;
=== Other Settings ===&lt;br /&gt;
* for new raspbian version, USB stick should be auto load to directory /media/disk/&lt;br /&gt;
* '''turn on root account'''&lt;br /&gt;
# set root password: sudo passwd root&lt;br /&gt;
# unlock it: sudo passwd --unlock root&lt;br /&gt;
* safely shutdown&lt;br /&gt;
# reboot system: sudo shutdown -r now&lt;br /&gt;
# Halt system: sudo halt, or: sudo shutdown -h now&lt;br /&gt;
==== Sources.list ====&lt;br /&gt;
* Sources List Update&lt;br /&gt;
* Backup the orgin sources list and edit current list&lt;br /&gt;
 pi@raspberrypi:~$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak  #back up to sources.list.bak&lt;br /&gt;
 pi@raspberrypi:~$ sudo nano /etc/apt/sources.list     #edit sources.list&lt;br /&gt;
&lt;br /&gt;
* copy paste following sources and apt-get update upgrade:&lt;br /&gt;
 deb http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib&lt;br /&gt;
 deb-src http://mirrors.aliyun.com/raspbian/raspbian/ wheezy main non-free contrib&lt;br /&gt;
* for jessie:&lt;br /&gt;
 deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib&lt;br /&gt;
 deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib&lt;br /&gt;
* Qinghua:&lt;br /&gt;
 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib&lt;br /&gt;
 deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main non-free contrib&lt;br /&gt;
* Disk backup - use win32 disk imager, read or write image of SD card&lt;br /&gt;
* remove or comment raspi.list source: /etc/apt/sources.list.d/raspi.list, or use another raspi source: &lt;br /&gt;
 deb http://mirrors.aliyun.com/debian/ jessie main ui&lt;br /&gt;
 deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ jessie main ui&lt;br /&gt;
* Key update: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 7638D0442B90D010&lt;br /&gt;
&lt;br /&gt;
== obsolete ==&lt;br /&gt;
&lt;br /&gt;
=== Use tightVNC (obsolete, direct setup in RPI raspi-config or desktop) ===&lt;br /&gt;
* Install tightVNC: apt-get install tightvncserver&lt;br /&gt;
* Run the service, be aware of the empty capspace in between the vncserver: '''vncserver :1'''&lt;br /&gt;
* In the command above 1 is the port, so you can connect to address like 192.168.1.100:1 &lt;br /&gt;
==== Method 1 ====&lt;br /&gt;
Create a new file in the init.d directory:&lt;br /&gt;
 sudo nano /etc/init.d/tightvncserver&lt;br /&gt;
Enter the following details:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Arduino&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# /etc/init.d/tightvncserver&lt;br /&gt;
VNCUSER='pi'&lt;br /&gt;
case &amp;quot;$1&amp;quot; in&lt;br /&gt;
    start)&lt;br /&gt;
        su $VNCUSER -c '/usr/bin/tightvncserver :1'&lt;br /&gt;
        echo &amp;quot;Starting TightVNC Server for $VNCUSER &amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
    stop)&lt;br /&gt;
        pkill Xtightvnc&lt;br /&gt;
        echo &amp;quot;TightVNC Server stopped&amp;quot;&lt;br /&gt;
        ;;&lt;br /&gt;
    *)&lt;br /&gt;
        echo &amp;quot;Usage: /etc/init.d/tightvncserver {start|stop}&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
        ;;&lt;br /&gt;
esac&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Give the script executable permission:&lt;br /&gt;
 sudo chmod 755 /etc/init.d/tightvncserver&lt;br /&gt;
We can now start or stop the service manually:&lt;br /&gt;
 sudo /etc/init.d/tightvncserver start&lt;br /&gt;
 sudo /etc/init.d/tightvncserver stop&lt;br /&gt;
But let's make Tight VNC Server start every time the Raspberry Pi starts up:&lt;br /&gt;
 sudo update-rc.d tightvncserver defaults&lt;br /&gt;
Now just power off the Raspberry Pi. Make sure it's connected to the network and power back on. You can now connected across the network using the VNC Viewer!&lt;br /&gt;
&lt;br /&gt;
==== Method 2 obsolete====&lt;br /&gt;
There is a known issue about the login request at booting, if you have this problem, check the section below.&lt;br /&gt;
&lt;br /&gt;
* Run VNC at startup&lt;br /&gt;
 cd /home/pi&lt;br /&gt;
 cd .config&lt;br /&gt;
 mkdir autostart&lt;br /&gt;
 cd autostart&lt;br /&gt;
 nano tightvnc.desktop&lt;br /&gt;
* Type the follow contents, see how to use [[Nano Editor]]&lt;br /&gt;
 [Desktop Entry]&lt;br /&gt;
 Type=Application&lt;br /&gt;
 Name=TightVNC&lt;br /&gt;
 Exec=vncserver :1&lt;br /&gt;
 StartupNotify=false&lt;br /&gt;
===== Boot issue =====&lt;br /&gt;
1. Boot your R-Pi&lt;br /&gt;
2. SSH log in with your user account (normally user: pi, password: raspberry)&lt;br /&gt;
3 Enter your home directory by typing&lt;br /&gt;
 cd ~&lt;br /&gt;
 and&lt;br /&gt;
 ls -A&lt;br /&gt;
 and &lt;br /&gt;
 mv .Xauthority .Xauthority.backup&lt;br /&gt;
 and &lt;br /&gt;
 sudo chmod 777 /home/pi&lt;br /&gt;
 and finally reboot&lt;br /&gt;
 sudo reboot&lt;br /&gt;
== Setup List ==&lt;br /&gt;
* [[Linux Disk]] Management, for portable device&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category:Raspberry Pi]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>