diff --git a/buffet/buffet_client.cc b/buffet/buffet_client.cc
index bde5abe..f8ef56e 100644
--- a/buffet/buffet_client.cc
+++ b/buffet/buffet_client.cc
@@ -38,6 +38,7 @@
 void usage() {
   std::cerr << "Possible commands:" << std::endl;
   std::cerr << "  " << kManagerTestMethod << " <message>" << std::endl;
+  std::cerr << "  " << kManagerStartDevice << std::endl;
   std::cerr << "  " << kManagerCheckDeviceRegistered << std::endl;
   std::cerr << "  " << kManagerGetDeviceInfo << std::endl;
   std::cerr << "  " << kManagerStartRegisterDevice
@@ -88,6 +89,26 @@
     return EX_OK;
   }
 
+  int CallManagerStartDevice(const CommandLine::StringVector& args) {
+    if (!args.empty()) {
+      std::cerr << "Invalid number of arguments for "
+                << "Manager." << kManagerStartDevice << std::endl;
+      usage();
+      return EX_USAGE;
+    }
+
+    ErrorPtr error;
+    auto response = CallMethodAndBlock(
+        manager_proxy_,
+        kManagerInterface, kManagerStartDevice, &error);
+    if (!response || !ExtractMethodCallResults(response.get(), &error)) {
+      std::cout << "Failed to receive a response:"
+                << error->GetMessage() << std::endl;
+      return EX_UNAVAILABLE;
+    }
+    return EX_OK;
+  }
+
   int CallManagerCheckDeviceRegistered(const CommandLine::StringVector& args) {
     if (!args.empty()) {
       std::cerr << "Invalid number of arguments for "
@@ -298,6 +319,9 @@
 
   if (command.compare(kManagerTestMethod) == 0) {
     err = helper.CallTestMethod(args);
+  } else if (command.compare(kManagerStartDevice) == 0 ||
+             command.compare("sd") == 0) {
+    err = helper.CallManagerStartDevice(args);
   } else if (command.compare(kManagerCheckDeviceRegistered) == 0 ||
              command.compare("cr") == 0) {
     err = helper.CallManagerCheckDeviceRegistered(args);
diff --git a/buffet/libbuffet/dbus_constants.cc b/buffet/libbuffet/dbus_constants.cc
index be5c16c..fba4c79 100644
--- a/buffet/libbuffet/dbus_constants.cc
+++ b/buffet/libbuffet/dbus_constants.cc
@@ -15,6 +15,7 @@
 const char kManagerInterface[] = "org.chromium.Buffet.Manager";
 const char kManagerServicePath[] = "/org/chromium/Buffet/Manager";
 
+const char kManagerStartDevice[]            = "StartDevice";
 const char kManagerCheckDeviceRegistered[]  = "CheckDeviceRegistered";
 const char kManagerGetDeviceInfo[]          = "GetDeviceInfo";
 const char kManagerStartRegisterDevice[]    = "StartRegisterDevice";
diff --git a/buffet/libbuffet/dbus_constants.h b/buffet/libbuffet/dbus_constants.h
index 5890d36..0d0c63b 100644
--- a/buffet/libbuffet/dbus_constants.h
+++ b/buffet/libbuffet/dbus_constants.h
@@ -22,6 +22,7 @@
 LIBBUFFET_EXPORT extern const char kManagerServicePath[];
 
 // Methods exposed as part of kManagerInterface.
+LIBBUFFET_EXPORT extern const char kManagerStartDevice[];
 LIBBUFFET_EXPORT extern const char kManagerCheckDeviceRegistered[];
 LIBBUFFET_EXPORT extern const char kManagerGetDeviceInfo[];
 LIBBUFFET_EXPORT extern const char kManagerStartRegisterDevice[];
diff --git a/buffet/manager.cc b/buffet/manager.cc
index 10d36cf..01716f4 100644
--- a/buffet/manager.cc
+++ b/buffet/manager.cc
@@ -36,6 +36,9 @@
 void Manager::RegisterAsync(const AsyncEventSequencer::CompletionAction& cb) {
   chromeos::dbus_utils::DBusInterface* itf =
       dbus_object_.AddOrGetInterface(dbus_constants::kManagerInterface);
+  itf->AddMethodHandler(dbus_constants::kManagerStartDevice,
+                        base::Unretained(this),
+                        &Manager::HandleStartDevice);
   itf->AddMethodHandler(dbus_constants::kManagerCheckDeviceRegistered,
                         base::Unretained(this),
                         &Manager::HandleCheckDeviceRegistered);
@@ -68,6 +71,11 @@
   device_info_->Load();
 }
 
+void Manager::HandleStartDevice(chromeos::ErrorPtr* error) {
+  LOG(INFO) << "Received call to Manager.StartDevice()";
+  LOG(INFO) << "Not implemented";
+}
+
 std::string Manager::HandleCheckDeviceRegistered(chromeos::ErrorPtr* error) {
   LOG(INFO) << "Received call to Manager.CheckDeviceRegistered()";
   std::string device_id;
diff --git a/buffet/manager.h b/buffet/manager.h
index 4648b95..8d7ab13 100644
--- a/buffet/manager.h
+++ b/buffet/manager.h
@@ -43,6 +43,8 @@
 
  private:
   // DBus methods:
+  // Handles calls to org.chromium.Buffet.Manager.StartDevice().
+  void HandleStartDevice(chromeos::ErrorPtr* error);
   // Handles calls to org.chromium.Buffet.Manager.CheckDeviceRegistered().
   std::string HandleCheckDeviceRegistered(chromeos::ErrorPtr* error);
   // Handles calls to org.chromium.Buffet.Manager.GetDeviceInfo().
