- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的总体计划是能够从我的树莓派发送 CEC 命令来执行诸如打开/关闭电视以及连接到电视的其他设备之类的操作。然后我将添加语音识别来发送这些命令......那是另一天。我已经阅读了 CEC,但从我收集到的信息来看,如果没有 CEC USB 适配器,您似乎无法直接通过命令行发送 CEC 命令?我已经在我的 pi 上安装了 cec-client 和 libCEC 库,但是当我运行 cec-client -l 时它没有显示任何设备。
我的问题是,如何在没有适配器的情况下通过命令行将 CEC 命令从 pi 发送到我的电视?我是否缺少有关 CEC 的一些基本要素?
更新
除了下面的帖子之外,这里还有一个链接,它在 stackoverflow 的 PI 部分中询问了更多 CEC 命令,我已将这些命令放入我的 .bashrc 中以打开/关闭电视并更改输入
https://raspberrypi.stackexchange.com/questions/5345/raspmbc-send-cec-commands-without-cec-adapter
最佳答案
您可以通过管道将命令发送到 cec-client 二进制文件
echo "on 0" | cec-client -s # turn on the television
echo "standby 0" | cec-client -s # turn it off (standby)
tv# cec-client -l
libCEC version: 3.1.0, git revision: libcec-3.1.0+5-6d68d21, compiled on Fri 8 Apr 15:44:58 UTC 2016 by nacho@tv on Linux 4.1.19-v7+ (armv7l), features: P8_USB, DRM, P8_detect, randr, RPi
Found devices: 1
device: 1
com port: RPI
vendor id: 2708
product id: 1001
firmware version: 1
type: Raspberry Pi
tv# echo h | cec-client -s -d 1
opening a connection to the CEC adapter...
================================================================================
Available commands:
[tx] {bytes} transfer bytes over the CEC line.
[txn] {bytes} transfer bytes but don't wait for transmission ACK.
[on] {address} power on the device with the given logical address.
[standby] {address} put the device with the given address in standby mode.
[la] {logical address} change the logical address of the CEC adapter.
[p] {device} {port} change the HDMI port number of the CEC adapter.
[pa] {physical address} change the physical address of the CEC adapter.
[as] make the CEC adapter the active source.
[is] mark the CEC adapter as inactive source.
[osd] {addr} {string} set OSD message on the specified device.
[ver] {addr} get the CEC version of the specified device.
[ven] {addr} get the vendor ID of the specified device.
[lang] {addr} get the menu language of the specified device.
[pow] {addr} get the power status of the specified device.
[name] {addr} get the OSD name of the specified device.
[poll] {addr} poll the specified device.
[lad] lists active devices on the bus
[ad] {addr} checks whether the specified device is active.
[at] {type} checks whether the specified device type is active.
[sp] {addr} makes the specified physical address active.
[spl] {addr} makes the specified logical address active.
[volup] send a volume up command to the amp if present
[voldown] send a volume down command to the amp if present
[mute] send a mute/unmute command to the amp if present
[self] show the list of addresses controlled by libCEC
[scan] scan the CEC bus and display device info
[mon] {1|0} enable or disable CEC bus monitoring.
[log] {1 - 31} change the log level. see cectypes.h for values.
[ping] send a ping command to the CEC adapter.
[bl] to let the adapter enter the bootloader, to upgrade
the flash rom.
[r] reconnect to the CEC adapter.
[h] or [help] show this help.
[q] or [quit] to quit the CEC test client and switch off all
connected CEC devices.
================================================================================
关于raspberry-pi - 通过命令行通过 HDMI 发送 CEC 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15315372/
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 5 天前关闭。 Improve th
我的目标是发送 HDMI 输入视频到 Raspberry Pi,然后更改输入 HDMI(通过 C/C++ 或 Java 进行图像处理)并将其发送回 HDMI 输出端口 . 问题是树莓派只有HDMI输出
如何在 Android 应用程序中获取连接的 HDMI 设备的版本? DisplayInfo 中没有任何帮助。 最佳答案 没有 API 可以为您提供这些;发件人应用程序甚至不知道该信息。 关于andr
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
我的一个 Android 项目需要不时地在 2 个 HDMI 输入之间切换,可能一分钟一次。一个 HDMI 输入来自 Android 设备的 HDMI 输出,一个来自外部不可控源。 我发现了一个 HD
所以,我正在尝试通过 HDMI 端口将 NES mini 连接到我在 linux mint 20 上运行的笔记本电脑。我正在使用 $ xrandr --output HDMI-1但它似乎没有任何效果。
我正在使用联想ideapad 320s。我可以看到在 xrandr 中连接了 HDMI1 但没有图片。是不是硬件太新了?我应该转向 debian 测试看看它是否有效吗?在 xfce4 gui 显示应用
我正在创建一个应用程序,通过 HDMI 电缆将 Android 设备连接到电视来在电视中播放视频。我想使用 HDMI 电缆检测电视是否关闭。我也尝试了此链接中提到的方法,但它没有在职的。 How to
我有一台装有 NVIDIA GT555M GPU 的笔记本电脑(华硕 N55SF),安装了 Elementary OS(基于 Ubuntu)。 我安装了带有 NVIDIA 驱动程序的 Bumblebe
我的 Android 应用使用 videoView 在应用内播放视频。使用 HDMI 将平板电脑连接到电视时,我可以在电视上看到我的平板电脑屏幕。 一切似乎都运行良好,但在我的应用程序中,我的 vid
如何检测设备是否插入或拔下了 HDMI 线缆?是否有发送的 Intent ,我可以用广播接收器拦截。或者是否有隐藏的 api 来检测 HDMI 的安装?只要将 hdmi 插入设备,我就想开始一项 Ac
我有一个客户要求一款应用程序可以将视频从平板电脑播放到连接的 HDMI 屏幕。我想知道是否可以在 HDMI 屏幕上显示与平板电脑本身不同的输出?这是因为我想添加一个菜单(平板电脑屏幕顶部的层),客户端
出于法律原因,我们需要阻止用户在外部屏幕(电视、显示器)上播放我们应用程序中的视频,我知道如何停止 airplay 输出,但我们也需要停止 HDMI 输出,有人知道我们是否可以这样做或者我们可以检测到
开发人员在使用 iDevices Lightning/HDMI 适配器在外部显示器上设置自定义 UIWindow 及其 rootViewController 时遇到的一个众所周知的问题是,电视显示的
我有一个 root 的 HiSense GoogleTV,它有 HDMI 输入和输出端口。 我想做的是从 HDMI IN(来自机顶盒)录制大约 10 秒的音频。我是新手,所以请多多包涵。 是否可以在已
非常简单,当我按下切换器上的开关以从我的 PC 显示器切换到它上方的电视时,我只想运行 XBMC。我对语言不太挑剔,但更好奇是否有我可以订阅的事件来执行此操作(也许在 Win32 API 中)。如果没
当连接到电视时,我的 ADT-1 无法通过 HDMI 播放声音。 在那台特定的电视上,我必须在 Raspberry PI 上强制使用 HDMI 音频,所以我也试图在 ADT-1 上强制使用它。 我尝试
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a softwar
所以我可以使用“tvservice -o”关闭树莓派上的 HDMI,然后使用“tvservice -p”将其重新打开。将其重新打开后,我显然需要执行“fbset -depth 8 && fbset -
我有一个带有 HDMI 输出端口的 Evo。照片库和视频应用程序可以将屏幕内容发送出去。 我希望它也能在所有情况下发送屏幕 - 例如,查看主屏幕仍会流式传输到 hdmi。这是行不通的。 是否可以将其添
我是一名优秀的程序员,十分优秀!