发现广告系列问题排查
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Cast SDK 会执行设备发现(如针对 Android、Web 和 iOS 所述),为用户提供支持 Cast 的可用设备列表。然后,发送设备应用便可连接到接收设备设备并开始投放。如果设备发现失败,问题可能出在应用(发送设备或支持 Cast 的设备)、Cast 设备或网络上。
本文档介绍了如何针对设备发现问题进行问题排查:支持 Cast 的设备未显示在已连接的投射设备列表中,更糟糕的是,当您运行发送器应用时,“投射”按钮不会显示。由于发现流程中有这么多潜在因素和许多变量,因此这些措施可能无法明确证明任何一种原因,但可以帮助您缩小可能的原因。
在调查设备发现问题之前,请确保满足以下条件:
- 发送设备正在运行可用于测试的 Cast 应用。
请勿使用 Netflix 或 YouTube 应用来测试视频发现情况,因为这些应用会使用一些专门的发现机制。
- 网络接收器设备是官方 Google Cast 设备。例如,Chromecast、Google Home 或 Google Nest Hub。
- 发送方设备必须启用 WLAN 网络且运行良好。
- 发送设备和支持 Cast 的设备必须连接到同一 Wi-Fi 网络。
此外,如需详细了解如何调试 Web 接收器应用,请参阅调试。
如需获取与您的问题相关的进一步帮助,请收集所有可用信息(如调试日志、ping 响应数据和网络服务数据),并使用 Google Cast 支持中所述的某个支持选项。
检查发送方应用
- 将发送方和支持 Cast 的设备连接到同一个 Wi-Fi 网络。
重启发送方应用。
- 在 Android 设备上,使用 Android 系统设置强制停止应用。
然后重新启动该应用。
- 在 iOS 上,双击主屏幕按钮,选择发送器应用,然后将其滑开以关闭。然后重新启动该应用。
在发送器应用中,触摸“投放”按钮即可查看网络上的投放设备。
如果系统现在已列出(被检测到)支持 Cast 的设备,那么发送设备应用可能仍存在问题。观察发送设备应用,并注意在什么情况下它无法发现您的接收设备:应用中发生了什么?多次重启后,连接丢失的时间是否一致?
运行其他发送器应用(非 Netflix 或 YouTube),触摸“投射”按钮即可查看网络上的投射设备。
如果其他应用不断发现您的接收器,而您的发送器应用找不到,则问题可能出在发送器应用上。另一方面,如果所有应用都无法发现您的接收器,则问题可能是接收器或网络所致。
在其他平台上运行您的发送器应用(如果可能)。
在其他平台上运行您的发送方应用时,发现行为是否相同?
在与发送方应用不同的平台上运行任何应用(不包括 Netflix 或 YouTube)。
如果您的发送方应用采用 Android 平台,请在 iOS 平台上运行其他应用,反之亦然。如果某个平台的所有应用都出现同样的失败情况,而另一个平台的应用却未持续失败,则问题可能出在平台上。
同步设备
如果发送方设备上的系统时间与支持 Cast 的设备上的系统时间存在显著差异,则发送方和接收方之间的身份验证握手可能会失败。短至 10 分钟的差异可能会导致身份验证失败。
Cast 设备上的系统时间是不可变的,如果已连接到互联网,设备可以保持正确的时间。大多数发送设备(如手机)上的系统时间是可变的,但您应该允许设备通过连接到互联网自动获取系统时间。
如果发送者或接收者上的系统时间不正确,请重新启动设备并将其连接到互联网。如果设备无法保持正确的时间,请与设备供应商联系。
Ping 设备
对设备执行 ping 操作时,请记下响应消息内容,以便在向 Google Cast 支持团队进行任何通信时报告该内容。
- 将发送方和接收方连接到同一个 Wi-Fi 网络,并验证两台设备是否指示它们已连接。
找到支持 Cast 的设备 IP 地址。
使用 Google Home 应用检索 Cast 设备(不包括 Android TV)的 IP 地址。对于 Android TV,请依次选择“设置”>“设备”>“网络”>“Wi-Fi”>“网络”>“状态信息”菜单获取 IP 地址。
将计算机连接到支持 Cast 的设备所在的 Wi-Fi 网络,然后打开命令行界面。
Ping 投放设备并记下响应。
ping <Cast-enabled device IP address>
Ping 多播地址并记下响应。
无论您是否有支持 Cast 的设备的 IP 地址,都可以执行此测试。按如下方式 Ping 多播 IP 地址:
ping 224.0.0.1
ping 239.255.255.250
ping 224.0.0.251
找到发送设备的 IP 地址。
“设置”菜单中通常包含这些信息。在 Android 设备上,依次前往“设置”>“关于”>“状态”。
Ping 发送方设备并记下响应。
ping <sender device IP address>
如果您在对任一设备进行 ping 操作时都未收到响应,请参阅检查路由器。
检查路由器
某些网络路由器对 Cast 的支持优于其他路由器,并且 Google 已经测试了大多数主流品牌。以下步骤可能有助于确定路由器问题。
- 在网络路由器上,关闭 AP 隔离。
- 检查您的路由器是否有任何已知问题和其他信息。
搜索互联网,了解其他用户如何解决 Chromecast 的路由器问题。
例如,输入查询“Chromecast Belkin n300”。
更新路由器的固件。
请参阅制造商的说明。路由器固件可能存在错误,只需进行简单更新即可解决。
关闭并重启网络路由器。
重新启动 Cast 设备。
要重新启动 Chromecast,请拔下 USB 线,然后再更换。同样,对于其他 Cast 设备,开启后关闭设备即可重新启动。
查看路况
通过检查网络上的广播服务,您可以了解网络接收器是否与网络正常通信。
- 在与网络接收器设备连接到同一网络的设备上,安装下面列出的某个网络服务检查实用程序。
运行该实用程序并找到 _googlecast._tcp.local 服务记录。
此记录将描述您的网络接收器设备名称和型号,以及服务数据。
- 复制记录信息,以便与 Google Cast 支持团队联系。
按如下方式安装网络服务检查实用程序:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe Cast SDK enables device discovery for Android, Web, and iOS to display available Cast devices, and troubleshooting steps are provided for when this process fails.\u003c/p\u003e\n"],["\u003cp\u003ePreliminary checks involve using a Cast app (excluding Netflix or YouTube) and ensuring both sender and Cast devices are on the same WiFi network, are properly connected, and have the correct system time.\u003c/p\u003e\n"],["\u003cp\u003eSender app troubleshooting includes restarting the app, trying a different app, testing on another platform, and observing patterns in discovery failure to pinpoint the issue source.\u003c/p\u003e\n"],["\u003cp\u003eNetwork and router issues can be investigated by pinging devices to assess connectivity, disabling AP isolation on the router, checking for known router issues and firmware updates, and rebooting network devices.\u003c/p\u003e\n"],["\u003cp\u003eAnalyzing network traffic involves installing network service inspection utilities and checking the "_googlecast._tcp.local" service record for information about the Web Receiver device and potential communication problems.\u003c/p\u003e\n"]]],["The Cast SDK enables device discovery for casting. Troubleshooting involves ensuring the sender and receiver are on the same WiFi, not using Netflix/YouTube for testing, and using official Cast devices. Steps include restarting the sender app, testing different apps/platforms, and verifying time synchronization. Network troubleshooting includes pinging devices, checking router settings (AP isolation, firmware updates, rebooting), and inspecting network traffic with utilities like Bonjour Browser. Collected information such as logs, ping data, and service records, can help with further support.\n"],null,["# Discovery Troubleshooting\n\nThe Cast SDK performs device discovery, as described for\n[Android](/cast/docs/android_sender_integrate),\n[Web](/cast/docs/web_sender/integrate),\nand [iOS](/cast/docs/ios_sender_integrate), to provide the user with a list of\navailable Cast-enabled devices. The sender app can then connect\nto a receiver device and begin casting. When device discovery fails, the issue\nmay be with the app (sender or Cast-enabled devices)\nthe Cast device, or the network.\n\nThis document describes ways to troubleshoot for device discovery problems: the\nCast-enabled devices does not appear in the list of connected\nCast devices or, worse, the Cast button does not appear when you run the sender\napp. Because there are so many potential factors, and so many variables in the\ndiscovery process, these measures may not definitively prove any one cause, but\nthey help you narrow down the possible causes.\n\nBefore investigating your device discovery problem, be sure the following\nconditions are established:\n\n- The sender device is running a Cast app that you can use for testing. Do not use the Netflix or YouTube apps to test discovery, as these use some specialized discovery mechanisms.\n- The Web Receiver device is an official Google Cast device. For example, Chromecast, Google Home, or Google Nest Hub.\n- The sender device must have WiFi enabled and running.\n- The sender device and the Cast-enabled devices device must be connected to the same WiFi network.\n\nAlso, see [Debugging](/cast/docs/debugging) for more information about\ndebugging your Web Receiver application.\n\nTo get further assistance with your issue, gather all available information such\nas debugging logs, ping response data, and network service data, and use one of\nthe support options described in [Google Cast Support](/cast/docs/support).\n\nCheck the sender app\n--------------------\n\n1. Connect both the sender and the Cast-enabled devices to the same WiFi network.\n2. Restart the sender app.\n\n - On Android, force the app to stop by using the Android system settings. Then re-launch the app.\n - On iOS, double-click the home button, select the sender app, and swipe it away to shut it down. Then re-launch the app.\n3. In the sender app, touch the Cast button to view Cast devices on the network.\n If the Cast-enabled device is now listed (discovered), there may\n still be a problem with the sender app. Observe the sender app and note the\n conditions under which it loses its ability to discover your receiver: what\n is happpening in the app? Is the time to connection loss consistent over\n several restarts?\n\n4. Run a different sender app (not Netflix or YouTube), and touch the Cast\n button to view Cast devices on the network.\n\n If other apps are consistently discovering your receiver, and your\n sender app isn't, the problem is probably in your sender app. On the other\n hand, if all apps have problems discovering your receiver, the problem may\n be with your receiver or the network.\n5. Run your sender app on a different platform (if possible).\n\n When running your sender app on other platforms, is the discovery\n behavior the same?\n6. Run any app (not Netflix or YouTube) on a different platform than that of\n your sender app.\n\n If your sender app is on the Android platform, run a different app\n on iOS, and vice versa. If all apps of a certain platform fail consistently,\n while those of another do not, the problem may be with the platform.\n\nSynchronize the devices\n-----------------------\n\nThe authentication handshake between the sender and receiver can fail if there\nis a significant disparity between the system time on the sender device and that\nof the Cast-enabled device. A disparity of as little as 10 minutes may\ncause authentication to fail.\n\nThe system time on a Cast device is immutable and the device can maintain the\ncorrect time if connected to the internet. The system time on most sender\ndevices (such as a phone) is mutable, but you should allow the device to get the\nsystem time automatically by connecting it to the internet.\n\nIf the system time on either the sender or the receiver is incorrect, reboot the\ndevice and connect it to the internet. If the device is unable to maintain the\ncorrect time, contact the device vendor.\n\nPing the devices\n----------------\n\nWhen you ping the devices, note the response message content so you can report\nit in any communication to [Google Cast Support](/cast/docs/support).\n\n1. Connect both the sender and the receiver to the same WiFi network and verify that both devices indicate they are connected.\n2. Find the Cast-enabled device IP address.\n\n Use the Google Home app to retrieve the IP address of a Cast\n device (excluding Android TV). For Android TV, get the IP address from the\n Settings \\\u003e Device \\\u003e Network \\\u003e WiFi \\\u003e Network \\\u003e Status Info\n menu.\n3. Connect a computer to the same WiFi network as the Cast-enabled\n device and open a command line interface.\n\n4. Ping the Cast device and note the response.\n\n `ping \u003cCast-enabled device IP address\u003e`\n5. Ping the multicast addresses and note the responses.\n You can perform this test whether you have the\n Cast-enabled device's IP address or not. Ping the multicast IP addresses as\n follows:\n\n - `ping 224.0.0.1`\n - `ping 239.255.255.250`\n - `ping 224.0.0.251`\n6. Find the IP address of the sender device.\n Usually the Settings menu has this information. In Android, look in Settings\n \\\u003e About \\\u003e Status.\n\n7. Ping the sender device and note the response.\n\n `ping \u003csender device IP address\u003e`\n\nIf you can't get a response when you ping either device, see\n[Check the router](#router).\n\nCheck the router\n----------------\n\nSome network routers support Cast better than others, and Google has tested most\nof the major brands. The following steps may help identify router issues.\n\n1. On your network router, turn off [AP isolation](https://support.google.com/chromecast/answer/3213084).\n2. [Check your router](https://support.google.com/chromecast/table/3477832?ref_topic=3447927) for any known issues and additional information.\n3. Search the internet to see how other users have resolved router issues with\n Chromecast.\n\n For example, enter the query, \"[Chromecast Belkin n300](https://www.google.com/#newwindow=1&q=chromecast%20belkin%20n300).\"\n4. Update your router's firmware.\n\n See the manufacturer's instructions. The router firmware may have bugs that\n can be resolved with a simple update.\n5. Reboot your network router by turning it off then restarting it.\n\n6. Reboot your Cast device.\n\n To reboot a Chromecast, unplug then replace the USB cable. Similarly, for\n other Cast devices, turn on then turn off the device to reboot it.\n\nCheck the traffic\n-----------------\n\nYou can see if the Web Receiver is communicating properly with the network by\ninspecting the broadcast services on the network.\n\n1. On a device connected to the same network as the Web Receiver device, install one of the network service inspection utilities listed below.\n2. Run the utility and find the **_googlecast._tcp.local** service record.\n\n This record will describe your Web Receiver device name and model\n along with service data.\n\n \u003cbr /\u003e\n\n3. Copy the record information for communication to [Google Cast Support.](/cast/docs/support)\n\n \u003cbr /\u003e\n\nInstall the network service inspection utilities as follows:\n\n- Apple OSX - Install [Bonjour Browser from Tildesoft](http://www.tildesoft.com/)\n\n- Linux - Install avahi-discovery and run it as follows:\n\n - `sudo apt-get install avahi-discover`\n - `sudo service avahi-daemon start`\n - `avahi-discover`"]]