LoginSignup
3
0

More than 1 year has passed since last update.

Raspberry Pi 3B+でカメラモジュールを有効化できなかったときのメモ

Last updated at Posted at 2021-11-10

環境

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye
$ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

上記は、2021/11/10現在、Raspberry Pi OS Imager v1.4で最新版のRaspberry Pi OS (32-bit)を入れた設定

カメラモジュールの設定方法

  1. カメラモジジュールをRaspbery Piへ接続
  2. 設定 > Raspberry Piの設定 > インターフェースカメラを有効にする
  3. 再起動
  4. vcgencmd get_cameraコマンドを叩いて、supported=1 detected=1が返ってこれば成功

発生した問題

「カメラモジュールの設定方法」の2においてインターフェースカメラが表示されない。

対処1: CLIから設定する

$ sudo raspi-config

3 Interface Options > P1 Cameraをenableにし再起動。

$ vcgencmd get_camera
supported=0 detected=0

有効にならない。CLIの設定でも有効にならない。

対処2: ファームウェアをダウングレード

5.10.63(2021-10-30)のリリースノートを見るとcamera周りのアップデートがいくつかあったので、その一つ前の5.10.17(2021-05-07)にダウングレード。ファームウェアhashは以下を参照

sudo rpi-update 518ee7c871aaa9aaa88116953d57e73787ee6e43

再起動後、カーネルがダウングレードされていることを確認

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:    11
Codename:   bullseye
$ uname -a
Linux raspberrypi 4.19.118-v7+ #131 14:21:24 BST 2020 armv7l GNU/Linux

改めて、「カメラモジュールの設定方法」の2を試すが、カメラの設定はない

対処3: OSをダウングレード

Raspbian GNU/Linux 11 (bullseye)からRaspbian GNU/Linux 10 (buster)へダウングレードする。こちらのサイトからRaspbian GNU/Linux 10 (buster)の一番新しいイメージ(raspbian-2020-02-14/)をダウンロード。Raspberry Pi OS ImagerのCHOOSE OS > Use costomから先ほどダウンロードしたイメージを選択。SDカードへインストールする。

起動して、正しくOSがインストールされたか確認。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
$ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

改めて、「カメラモジュールの設定方法」の2を試す。インターフェースカメラが表示されたので有効にし、再起動。

$ vcgencmd get_camera
supported=1 detected=1

👍

まとめ

Raspberry Pi OS 3B+でカメラの設定を有効化できない時は、以下の設定にしておけばとりあえずうまくいく。

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
$ uname -a
Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux

参考

3
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0