Welcome to new things

[Technical] [Electronic work] [Gadget] [Game] memo writing

Enabling the Raspberry Pi to be used only with a PC without mouse, keyboard, and monitor.

When I saw the news of the Raspberry Pi4 announcement, I pulled out my Raspberry Pi and touched it for the first time in a while.

I had touched the Raspberry Pi a little before, but gradually stopped using it because I was too lazy to move the mouse, keyboard, and monitor back and forth between the PC and the Raspberry Pi.

I was looking for a good way to use Raspberry Pi with just a PC and found the following article!

karaage.hatenadiary.jp

SSH FS, an extension that allows you to remotely access another PC from Visual Studio Code on your PC, view a tree of directories on that PC, and edit files directly!

Microsoft has also released a similar extension called "Remote-SSH".

  • Remote PC is x86 only and cannot be used for ARM Raspberry Pi
  • Communication application gets installed on the remote PC.
  • Only SSH key is used to log in, no ID or password.

I was hesitant to use it because of various restrictions, such as

On the other hand, "SSH FS" is intuitive to use and works just as you would imagine.

ラズベリーパイをマウス・キーボード・モニターなしでPCだけで使えるようにする
PCからWiFiルーターを経由して、Raspberry Piの「.bashrc」をVisual Studio Codeで直接編集する
It doesn't pollute the remote environment either, so why not settle for this already? I found a good one!

At this point, I am tempted to go completely without a mouse, keyboard, and monitor.

Below, I would like to roughly describe the path to "Raspberry Pi Peripherals Free".

OS Image Preparation

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=JP

network={
    ssid="[ssid_name]"
    psk="[password]"
}

When you insert this SD card into the Raspberry Pi and boot it up, it will automatically connect to WiFi and be ready for SSH login.

Find IP address

Below, SSH login to the Raspberry Pi from WSL (Windows Subsystem for Linux) and configure the basic settings of the Raspberry Pi.

ssh pi@[IPアドレス]
  • Default user name: pi
  • Initial password: raspberry

fixed IP address

Edit the file "/etc/dhcpcd.conf

sudo nano /etc/dhcpcd.conf

Add the following settings (edit around "192.168.111" to match your WiFi settings)

static ip_address=192.168.111.105/24
static routers=192.168.111.1
static domain_name_servers=192.168.111.1 8.8.8.8

Raspberry Pi Basic Setup

sudo raspi-config

Main setting items

  • [Change User Password -> Change Initial Password
  • [Boot Options]-[Desktop / CLI]-[Console] -> No GUI. Console login.
  • [LocalisationOptions]

    • [Change Locale]-[ja_JP.UTF-8 UTF-8] -> Japanese. Character code UTF-8
    • [Change Timezone]-[Asia]-[Tokyo] -> Japan Time
  • [Interfacing Options] -> Set here when connecting hardware such as cameras, I2C, etc.
  • [Advanced Options]-[Memory Split] -> Since the GUI is not used, set the memory allocation to the GPU to the minimum "16".

Setting up Visual Studio Code

  • Install "SSH FS" extension
  • Alt+v to open command palette and create "SSH FS" config file

    • Register Raspberry Pi with IP address, user name and password
  • SSH FILE SYSTEMS" will be added to Explorer, right click to "Connect" or "Disconnect

How to shut down and restart the Raspberry Pi

Do it with the following command

sudo shutdown -h now # shutdown
sudo shutdown -r now # restart

Always shut down the power supply before turning it off.

impressions

When you let the L-tickers over the Internet, it feels like you are doing something IoT!

You can put the apps you make in Github, and you can recover them at any time.

The LCD display that I had bought before but neglected because it was more troublesome than I had expected worked easily by copying and pasting the source from the Internet.

Lets you use your Raspberry Pi without mouse, keyboard, and monitor, just a PC

After all, work efficiency is totally different when done on a PC that you use on a regular basis.

Hopefully this will allow me to resume my interest in electronics.

Reference Articles

https://qiita.com/JHiyama/items/158ab35ed0247a7fc406

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com

www.ekwbtblog.com