0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ラズパイ3:RTL-SDRでFMラジオの再生ができない。

Last updated at Posted at 2020-07-05

前提

現象

  • 以下のFM復調、および、再生コマンドを実行してもすぐに処理が終了してしまう。
rtl_fm -f 86.6M -M wbfm -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
  • 以下、出力結果。
rtl_fm -f 86.6M -M wbfm -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
aplay: main:612: invalid rate argument '48k'
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 86916000 Hz.
oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 6.83ms
Create UDP thread
Created UDP thread
Main socket started! :-) Tuning enabled on UDP/6020
Sampling at 1200000 S/s.
Output at 200000 Hz.
Signal caught, exiting!

User cancel, exiting...
Reattached kernel driver

原因

  • **「aplay: main:612: invalid rate argument '48k'」**のログにある通り、aplayの引数がおかしい。

対応

  • 「aplay」の「-r 48k」を「-r 48000」に修正。
    - これで再生できました。
rtl_fm -f 86.6M -M wbfm -s 200000 -r 48000 - | aplay -r 48000 -f S16_LE
  • 出力結果
rtl_fm -f 86.6M -M wbfm -s 200000 -r 48000 - | aplay -r 48000 -f S16_LE
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 86916000 Hz.
oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 6.83ms
Create UDP thread
Created UDP thread
Main socket started! :-) Tuning enabled on UDP/6020
Sampling at 1200000 S/s.
Output at 200000 Hz.
再生中 raw データ 'stdin' : Signed 16 bit Little Endian, レート 48000 Hz, モノラル

以上。

備考

  • ネットの情報を鵜呑みにせず、ログをよく確認しないと駄目ですね。改めて、実感。
0
2
0

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
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?