Skip to content

Commit

Permalink
update rpi-setup text
Browse files Browse the repository at this point in the history
  • Loading branch information
SunFounder committed Jan 9, 2023
1 parent f376f38 commit b91f20c
Show file tree
Hide file tree
Showing 52 changed files with 466 additions and 141 deletions.
3 changes: 1 addition & 2 deletions docs/source/appendix/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Appendix
.. toctree::

filezilla
i2c_configuration
remote_desktop
get_ip


18 changes: 18 additions & 0 deletions docs/source/appendix/get_ip.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _get_ip:

Get the IP address
=========================

There are many ways to know the IP address, and two of them are listed as follows.

**Checking via the router**

If you have permission to log in the router(such as a home network), you can check the addresses assigned to Raspberry Pi on the admin interface of router.

The default hostname of the Raspberry Pi OS is raspberrypi, and you need to find it. (If you are using ArchLinuxARM system, please find alarmpi.)

**Network Segment Scanning**

You can also use network scanning to look up the IP address of Raspberry Pi. You can apply the software, **Advanced IP scanner** and so on.

Scan the IP range set, and the name of all connected devices will be displayed. Similarly, the default hostname of the Raspberry Pi OS is raspberrypi, if you haven’t modified it.
2 changes: 1 addition & 1 deletion docs/source/appendix/remote_desktop.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Remote Desktop
n-Remote Desktop
=====================

There are two ways to control the desktop of the Raspberry Pi remotely:
Expand Down
44 changes: 44 additions & 0 deletions docs/source/python/preparation/enable_i2c_camera.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Enable I2C and Camera Interface
========================================

Here we are using the Raspberry Pi's I2C and Camera interfaces, but by default they are disabled, so we need to enable them first.

#. Input the following command:

.. raw:: html

<run></run>

.. code-block::
sudo raspi-config
#. Choose **3** **Interfacing Options** by press the down arrow key on your keyboard, then press the **Enter** key.

.. image:: media/image282.png
:align: center

#. Then **P5 I2C**.

.. image:: media/image283.png
:align: center

#. Use the arrow keys on the keyboard to select **<Yes>** -> **<OK>** to complete the setup of the I2C.

.. image:: media/image284.png
:align: center

#. Go to **3 Interfacing Options** again and select **P1 Camera**.

.. image:: media/camera_enable.png
:align: center

#. Again select **<Yes>** -> **<OK>** to complete the setup.

.. image:: media/camera_enable1.png
:align: center

#. After you select **<Finish>**, a pop-up will remind you that you need to reboot for the settings to take effect, select **<Yes>**.

.. image:: media/camera_enable2.png
:align: center
14 changes: 6 additions & 8 deletions docs/source/python/preparation/installing_the_os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ Select the SD card you are using.

**Step 6**

Press **Ctrl+Shift+X** to open the **Advanced options** page to enable
SSH and configure wifi, these 2 items must be set, the others depend on
your choice . You can choose to always use this image customization
options.
To open the advanced options page, click the setting button (appears after selecting operating system) or press Ctrl+Shift+X.
Enable ssh and set the username and name. You can choose to always use this image customization options.

.. note::
When the Set hostname box is not checked, the default hostname will still be ``raspberrypi``, and we will use this hostname to access the Raspberry Pi remotely.

.. image:: media/image15.png
:align: center
Expand All @@ -100,10 +101,7 @@ Then scroll down to complete the wifi configuration and click **SAVE**.

.. note::

**wifi country** should be set the two-letter `ISO/IEC alpha2
code <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements>`__ for
the country in which you are using your Raspberry Pi, please refer to
the following link: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
**wifi country** should be set the two-letter `ISO/IEC alpha2 code <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements>`_ for the country in which you are using your Raspberry Pi.

.. image:: media/image16.png
:align: center
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/python/preparation/media/image15.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/python/preparation/media/image16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image282.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image283.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image284.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image287.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image288.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image290.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image291.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image292.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/image293.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/python/preparation/media/mac_vnc2.png
Binary file added docs/source/python/preparation/media/mac_vnc5.png
Binary file added docs/source/python/preparation/media/mac_vnc6.png
Binary file added docs/source/python/preparation/media/mac_vnc7.png
Binary file added docs/source/python/preparation/media/mac_vnc8.png
Binary file modified docs/source/python/preparation/media/sp211112_112507.png
3 changes: 2 additions & 1 deletion docs/source/python/preparation/quick_guide_on_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ If you are familiar with Raspberry Pi and can open the command line successfully

what_do_we_need
installing_the_os
set_up_your_raspberry_pi
set_up_your_raspberry_pi
enable_i2c_camera
download_and_run_code

55 changes: 55 additions & 0 deletions docs/source/python/preparation/remote_linux.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Linux /Unix Users
==========================


#. Go to **Applications**->\ **Utilities**, find the **Terminal**, and open it.

.. image:: media/image21.png
:align: center

#. Check if your Raspberry Pi is on the same network by type in ``ping <hostname>.local``.

.. code-block::
ping raspberrypi.local
.. image:: media/mac-ping.png
:width: 550
:align: center

* If terminal prompts ``ping: cannot resolve <hostname>.local``, it is possible that the Raspberry Pi failed to connect to the network. Please check the network.
* If you really can't ping ``<hostname>.local``, try to :ref:`get_ip` and ``ping <IP address>`` instead. (e.g., ``ping 192.168.6.116``)
* If multiple prompts like ``64 bytes from <IP address>: icmp_seq=0 ttl=64 time=0.464 ms`` appear, it means your computer can access the Raspberry Pi.




#. Type in ``ssh <username>@<hostname>.local`` (or ``ssh <username>@<IP address>``).

.. code-block::
ssh pi@raspberrypi.local
#. The following message may appear.

.. code-block::
The authenticity of host 'raspberrypi.local (192.168.6.116)' can't be established.
ECDSA key fingerprint is SHA256:7ggckKZ2EEgS76a557cddfxFNDOBBuzcJsgaqA/igz4.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Input \"yes\".

.. image:: media/mac-ssh-login.png
:width: 550
:align: center


#. Input the password you set before. (Mine is ``raspberry``.)


#. We now get the Raspberry Pi connected and are ready to go to the nextstep.

.. image:: media/mac-ssh-terminal.png
:width: 550
:align: center
217 changes: 217 additions & 0 deletions docs/source/python/preparation/remote_macosx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@

Mac OS X user
==========================

For Mac users, accessing the Raspberry Pi desktop directly via VNC is more convenient than from the command line. You can access it via Finder by entering the set account password after enabling VNC on the Raspberry Pi side.

Note that this method does not encrypt communication between the Mac and Raspberry Pi.
The communication will take place within your home or business network, so even if it's unprotected, it won't be an issue.
However, if you are concerned about it, you can install a VNC application such as `VNC® Viewer <https://www.realvnc.com/en/connect/download/viewer/>`_.

Alternatively it would be handy if you could use a temporary monitor (TV), mouse and keyboard to open the Raspberry Pi desktop directly to set up VNC.
If not, it doesn't matter, you can also use the SSH command to open the Raspberry Pi's Bash shell and then using the command to set up the VNC.


* :ref:`have_temp_monitor`
* :ref:`no_temp_monitor`


.. _have_temp_monitor:

Have Temporarily Monitor (or TV)?
---------------------------------------------------------------------

#. Connect a monitor (or TV), mouse and keyboard to the Raspberry Pi and power it on. Select the menu according to the numbers in the figure.


.. image:: media/mac_vnc1.png
:align: center

#. The following screen will be displayed. Set **VNC** to **Enabled** on the **Interfaces** tab, and click **OK**.

.. image:: media/mac_vnc2.png
:align: center


#. A VNC icon appears on the upper right of the screen and the VNC server starts.

.. image:: media/mac_vnc3.png
:align: center


#. Open the VNC server window by clicking on the **VNC** icon, then click on the **Menu** button in the top right corner and select **Options**.

.. image:: media/mac_vnc4.png
:align: center

#. You will be presented with the following screen where you can change the options.

.. image:: media/mac_vnc5.png
:align: center

Set **Encryption** to **Prefer off** and **Authentication** to **VNC password**.

#. When you click the **OK** button, the password input screen is displayed. You can use the same password as the Raspberry pi password or a different password, so enter it and click **OK**.

.. image:: media/mac_vnc16.png
:align: center

You are now ready to connect from your Mac. It's okay to disconnect the monitor.

**From here, it will be the operation on the Mac side.**

#. Now, select **Connect to Server** from the Finder's menu, which you can open by right-clicking.

.. image:: media/mac_vnc10.png
:align: center

#. Type in ``vnc://<username>@<hostname>.local`` (or ``vnc://<username>@<IP address>``). After entering, click **Connect**.

.. image:: media/mac_vnc11.png
:align: center


#. You will be asked for a password, so please enter it.

.. image:: media/mac_vnc12.png
:align: center

#. The desktop of the Raspberry pi will be displayed, and you will be able to operate it from the Mac as it is.

.. image:: media/mac_vnc13.png
:align: center

.. _no_temp_monitor:

Don't Have Temporarily Monitor (or TV)?
---------------------------------------------------------------------------

* You can apply the SSH command to open the Raspberry Pi's Bash shell.
* Bash is the standard default shell for Linux.
* The shell is a command line interpreter (CLI) when the user uses Unix/Linux.
* Most of what you need to do can be done through the shell.
* After setting up the Raspberry pi side, you can access the desktop of the Raspberry Pi using the **Finder** from the Mac.


#. Type ``ssh <username>@<hostname>.local`` to connect to the Raspberry Pi.


.. code-block::
ssh pi@raspberrypi.local
.. image:: media/mac_vnc14.png


#. The following message will be displayed only when you log in for the first time, so enter **yes**.

.. code-block::
The authenticity of host 'raspberrypi.local (2400:2410:2101:5800:635b:f0b6:2662:8cba)' can't be established.
ED25519 key fingerprint is SHA256:oo7x3ZSgAo032wD1tE8eW0fFM/kmewIvRwkBys6XRwg.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])?
#. Enter the password for the Raspberry pi. The password you enter will not be displayed, so be careful not to make a mistake.

.. code-block::
pi@raspberrypi.local's password:
Linux raspberrypi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64
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.
Last login: Thu Sep 22 12:18:22 2022
pi@raspberrypi:~ $
#. Set up your Raspberry Pi so that you can log in via VNC from your Mac once you have successfully logged into it. The first step is to update your operating system by running the following commands.

.. code-block::
sudo apt update
sudo apt upgrade
``Do you want to continue? [Y/n]``, Enter ``Y`` when prompted.

It may take some time for the update to finish. (It depends on the amount of updates at that time.)


#. Enter the following command to enable the **VNC Server**.

.. code-block::
sudo raspi-config
#. The following screen will be displayed. Select **3 Interface Options** with the arrow keys on the keyboard and press the **Enter** key.

.. image:: media/image282.png
:align: center

#. Then select **P3 VNC**.

.. image:: media/image288.png
:align: center

#. Use the arrow keys on the keyboard to select **<Yes>** -> **<OK>** -> **<Finish>** to complete the setup.

.. image:: media/mac_vnc8.png
:align: center


#. Now that the VNC server has started, let's change the settings for connecting from a Mac.

To specify parameters for all programs for all user accounts on the computer, create ``/etc/vnc/config.d/common.custom``.

.. code-block::
sudo nano /etc/vnc/config.d/common.custom
After entering ``Authentication=VncAuthenter``, press ``Ctrl+X`` -> ``Y`` -> ``Enter`` to save and exit.

.. image:: media/mac_vnc15.png
:align: center

#. In addition, set a password for logging in via VNC from a Mac. You can use the same password as the Raspberry pi password or a different password.


.. code-block::
sudo vncpasswd -service
#. Once the setup is complete, restart the Raspberry Pi to apply the changes.

.. code-block::
sudo sudo reboot
#. Now, select **Connect to Server** from the **Finder**'s menu, which you can open by right-clicking.

.. image:: media/mac_vnc10.png
:align: center

#. Type in ``vnc://<username>@<hostname>.local`` (or ``vnc://<username>@<IP address>``). After entering, click **Connect**.

.. image:: media/mac_vnc11.png
:align: center


#. You will be asked for a password, so please enter it.

.. image:: media/mac_vnc12.png
:align: center

#. The desktop of the Raspberry pi will be displayed, and you will be able to operate it from the Mac as it is.

.. image:: media/mac_vnc13.png
:align: center

0 comments on commit b91f20c

Please sign in to comment.