diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index b8ea6f2..a4724e6 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -515,6 +515,61 @@
     return platform;
 }
 
+// return "" equals failed
+std::string getMotherBoardFruPath()
+{
+    std::vector<std::string> paths;
+    static constexpr const auto depth = 0;
+    sdbusplus::bus_t dbus(ipmid_get_sd_bus_connection());
+
+    auto mapperCall = dbus.new_method_call(
+        "xyz.openbmc_project.ObjectMapper",
+        "/xyz/openbmc_project/object_mapper",
+        "xyz.openbmc_project.ObjectMapper", "GetSubTreePaths");
+    static constexpr auto interface = {
+        "xyz.openbmc_project.Inventory.Item.Board.Motherboard"};
+
+    mapperCall.append("/xyz/openbmc_project/inventory/", depth, interface);
+    try
+    {
+        auto reply = dbus.call(mapperCall);
+        reply.read(paths);
+    }
+    catch (sdbusplus::exception_t& e)
+    {
+        phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
+        return "";
+    }
+
+    for (const auto& path : paths)
+    {
+        return path;
+    }
+
+    return "";
+}
+
+// return "" equals failed
+std::string getMotherBoardFruName()
+{
+    std::string path = getMotherBoardFruPath();
+    std::shared_ptr<sdbusplus::asio::connection> dbus = getSdBus();
+    std::string service = "xyz.openbmc_project.EntityManager";
+
+    try
+    {
+        auto value = ipmi::getDbusProperty(
+            *dbus, service, path, "xyz.openbmc_project.Inventory.Item.Board",
+            "Name");
+        return std::get<std::string>(value);
+    }
+    catch (sdbusplus::exception_t& e)
+    {
+        phosphor::logging::log<phosphor::logging::level::ERR>(e.what());
+        return "";
+    }
+}
+
 // return code: 0 successful
 int8_t getFruData(std::string& data, std::string& name)
 {
@@ -522,7 +577,8 @@
     static constexpr const auto depth = 0;
     std::vector<std::string> paths;
     std::string machinePath;
-    std::string baseBoard = "Baseboard";
+    std::string baseBoard = getMotherBoardFruPath();
+    baseBoard = baseBoard.empty() ? "Baseboard" : baseBoard;
 
     bool platform = isMultiHostPlatform();
     if (platform == true)
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index bb2052e..78fff85 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -21,6 +21,7 @@
 {
 
 ipmi_ret_t getNetworkData(uint8_t lan_param, char* data);
+std::string getMotherBoardFruName();
 int8_t getFruData(std::string& serial, std::string& name);
 int8_t sysConfig(std::vector<std::string>& data, size_t pos);
 int8_t procInfo(std::string& result, size_t pos);
@@ -654,7 +655,8 @@
         getMaxHostPosition(maxPosition);
         if (hostPosition == BMC_POSITION || hostInstances == "0")
         {
-            frame_info.append("FRU:spb");
+            std::string data = "FRU:" + getMotherBoardFruName();
+            frame_info.append(data);
         }
         else if (hostPosition != BMC_POSITION && hostPosition <= maxPosition)
         {
