環境
$ 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)を入れた設定
カメラモジュールの設定方法
- カメラモジジュールをRaspbery Piへ接続
-
設定
>Raspberry Piの設定
>インターフェース
のカメラ
を有効にする - 再起動
-
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は以下を参照
- https://downloads.raspberrypi.org/raspios_armhf/release_notes.txt
- https://github.com/Hexxeh/rpi-firmware/commits
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