Getting started with Raspberry Pi 3 (Model B) in Linux Mint

Pi

Preparation:

Hardware: One Raspberry Pi 3(Model B) board, One Micro SD card , One USB Memory Card Reader, One USB to TTL Converter Module(Option), One USB cable, One  5v power adapter, Four Dupont lines(Option), One network cable, One Linux computer.(If you want to control you Pi with serial port, you should have a USB to TTL Converter Module, and four Dupont lines.)

need

Software:putty, ssh

 

  1. Download the System Image

Go to https://www.raspberrypi.org/downloads/ to download the latest system image.

Choose Raspbian: 

下载镜像01

Then choose Raspbian Jessie to download. Notice the SHA-1 code below, we will use it later to verify the image file is completed.

下载镜像02

After the system image is downloaded, open Terminal(Ctrl + Alt +t) in Linux, navigate to the  path containing the image(In my case,2016-05-27-raspbian-jessie.zip). Then type:

sha1sum 2016-05-27-raspbian-jessie.zip

Compare the result to the SHA-1 code. If they are the same, that indicates you image is completed, or else you should download the system image and check again until you get the correct system image.

Extract the system image:type

unzip 2016-05-27-raspbian-jessie.zip

For the image is a little bit large(3.8G after extracting), this process may takes a few minutes, be patient.

2. Flashing the SD Card

Use command line tool dd to flash the SD Card.

From the terminal run
df -h
Connect the SD card reader with the SD card inside
Run
df -h
again and look for the new device that wasn't listed last time. Record the device name of the filesystem's partition, for example, /dev/sdb1.
Unmount the partition so that you will be allowed to overwrite the disk:
sudo  umount /dev/sdb1
Next you will write the image to the hole SD card not just the firt patition, so you need to change the "sdb1" to "sdb" when you write the image.
sudo dd bs=1M if=2016-05-27-raspbian-jessie.img of=/dev/sdb
(This command may take a long time, don't interrupt it.)
After the dd command finishes, edit the file cmdline.txt in the SD card.
Add
ip=10.42.0.4
at the end to set a static ip address for Pi, and save the file.
Eject the card:
sudo eject /dev/sdb
Remove SD card from card reader, insert it in the Raspberry Pi.
3.Use ssh to login Pi
Before connecting Pi using ssh, set a static IP address for Linux PC is needed. This IP address should be in the same segment of the Pi's IP address. In my case, I set an IP address of
10.41.0.6
to my Linux PC.
Use networking cable to  connect pi and Linux PC, power up Pi and wait for a few minutes. In terminal
ssh pi@10.42.0.4
Then input default password:
raspberry
Input:
sudo raspi-config
We get:
设置01
Check options you want to change(Option 1, 2, 5).
To use serial port we should enable serial in Advanced Options.
设置02
Then
sudo reboot
to let the settings take effect.
4.(Option) Connect the USB to TTL Converter Module to Raspberry Pi.
pi3_gpio
Converter Module ------------Raspberry Pi
GND----------------------------Ground/0V(Pin06)
RXD----------------------------TXD0/GPIO14(Pin08)
TXD----------------------------RXD0/GPIO15(Pin10)
5.0V----------------------------5V(Pin04)
串口连接01
5. Use serial port to connect Pi
Before install, we should prepare a serial monitor in our Linux computer.  I chose Putty. If you don't have Putty, from the command line run
sudo apt-get install putty
 to install.
Then run the program:
sudo putty
串口连接02
Open another terminal in you Linux PC, run
ls /dev/
before and after you connect the USB to TTL converter module to get to know your serial line.
In putty, input you serial line, and speed(115200), then click open to connect your Pi.
6. Connect to wifi
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
Go to the bottom of the file and add the following Wi-Fi setting, adding your setting in the quotation marks.
network={
ssid="The_ESSID"
psk="wifi_password"
}
Then
sudo reboot
Login again
Reference:
1 https://www.raspberrypi.org/forums/viewtopic.php?t=74176
2 https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=138162
3 https://www.raspberrypi.org/documentation/installation/installing-images/linux.md
4 http://elinux.org/RPi_Easy_SD_Card_Setup
打赏作者
喜欢这篇文章,打赏犒劳下作者,以此激励作者创作更多!

您的支持将鼓励我们继续创作!

[微信] 扫描二维码打赏

[支付宝] 扫描二维码打赏

发表评论

电子邮件地址不会被公开。