This component allows you to communicate with Chrome Cast dongles or smart TVs that support the Google Cast Protocol.


  1. Add these lines to your application file:

    ENABLE_SSL := Bearssl
  2. Add these lines to your application:

    #include <Network/GoogleCast/Client.h>
  3. Basic example:

    #include <Network/GoogleCast/Client.h>
    GoogleCast::Client castClient;
    void gotIp(IpAddress ip, IpAddress mask, IpAddress gateway)
       // connect directly to the IP of the devise
       castClient.onConnect([](bool success) {
          Serial.print(F("Client connect: "));
          Serial.println(success ? "OK" : "FAIL");
          if(success) {
            // Starting YouTube on the device

Re-Generating C files from proto file

You can re-generate the C files from the proto file. This can be useful if you want to use a newer version of the Google Cast proto file. Make sure to compile it using nanopb. The re-generation can be done with the commands below:

cd $SMING_HOME/Libraries/GoogleCast/samples/basic
make python-requirements # should be executed once to download and install the required python packages
make rebuild-cast-proto


There are multiple documents in internet that describe the Google Cast protocol and its inner workings. As a start one can take a look at the presentation and documents below.


List of current APP-IDS

Individual app configurations are obtained from this url:{appid}

Where {appid} is the id of the app, and the output of this is JSON in the format of a receiver app defintion.


Used by