<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:新細明體;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@新細明體";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"新細明體",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"新細明體",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-TW" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Hi Jordan,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">According your busctl test command that you can get CurrentFirmwareCondition property currently.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Here, the service is xyz.openbmc_project.State.HostCondition.Gpio and path is /xyz/openbmc_project/Gpios/host0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">root@siad:~# busctl get-property
<b>xyz.openbmc_project.State.HostCondition.Gpio </b>  <b>/xyz/openbmc_project/Gpios/host0</b>  xyz.openbmc_project.Condition.HostFirmware  CurrentFirmwareCondition<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">s "xyz.openbmc_project.Condition.HostFirmware.FirmwareCondition.Running"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">However, your error log seems using wrong service and path to get this CurrentFirmwareCondition property.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi:
<b>path=/xyz/openbmc_project/control/host0</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi:
<b>services=xyz.openbmc_project.Control.Host</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Error reading HostFirmware condition, error: sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name
 is not activatable, service: xyz.openbmc_project.Control.Host path: /xyz/openbmc_project/control/host0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">If you change path and services as your busctl test command that might be fixed your issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Hopefully, I didn’t misunderstand your question. Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D">Tim<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> openbmc <<a href="mailto:openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org">openbmc-bounces+chli30=nuvoton.com@lists.ozlabs.org</a>>
<b>On Behalf Of </b>Jordan Chang<br>
<b>Sent:</b> Monday, April 18, 2022 6:31 PM<br>
<b>To:</b> <a href="mailto:openbmc@lists.ozlabs.org">openbmc@lists.ozlabs.org</a><br>
<b>Subject:</b> [phosphor-state-manager] Error reading HostFirmware condition, error: sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US">Hi Sir/Madam,<br>
I am implementing the power control mechanisms for my platform, and encounter the problem in below:<br>
<i>phosphor-host-state-manager[341]: Error reading HostFirmware condition, error: sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable, service: xyz.openbmc_project.Control.Host path: /xyz/openbmc_project/control/host0</i><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">I am using the host0-ready gpio pin to determine the HostFirmwareCondition is running or not. However, the service <i>xyz.openbmc_project.State.Host.HostState</i> could not be established since the dbus call method of  <i>xyz.openbmc_project.Control.Host
</i>returns an error. Therefore, I have printed some debug messages starting with Ufi to ensure the xyz.openbmc_project.State.HostCondition.Gpio service is involved in phosphor-host-state-manager. Not sure why the bus call function of
<i>xyz.openbmc_project.Control.Host service</i> failed. Which packages or settings should I configure to enable this service?  Could someone give me some instructions or suggestions? Thank you!<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US"><br>
```<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">root@siad:~# obmcutil state<br>
CurrentBMCState     : xyz.openbmc_project.State.BMC.BMCState.NotReady<br>
CurrentPowerState   : xyz.openbmc_project.State.Chassis.PowerState.On<br>
Error finding '/xyz/openbmc_project/state/host0' service: Input/output error<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">---------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">root@siad:~# busctl call  xyz.openbmc_project.ObjectMapper  /xyz/openbmc_project /object_mapper xyz.openbmc_project.ObjectMapper GetSubTree sias ""  0 1  "xyz.op enbmc_project.Condition.HostFirmware"<br>
a{sa{sas}} 2 "/xyz/openbmc_project/Gpios/host0" 1 "xyz.openbmc_project.State.Hos tCondition.Gpio" 4 "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.P eer" "org.freedesktop.DBus.Properties" "xyz.openbmc_project.Condition.HostFirmwa re" "/xyz/openbmc_project/control/host0"
 1 "xyz.openbmc_project.Control.Host" 5  "org.freedesktop.DBus.Introspectable" "org.freedesktop.DBus.Peer" "org.freedeskt op.DBus.Properties" "xyz.openbmc_project.Condition.HostFirmware" "xyz.openbmc_pr oject.Control.Host"<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">---------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">root@siad:~# busctl get-property xyz.openbmc_project.State.HostCondition.Gpio   /xyz/openbmc_project/Gpios/host0  xyz.openbmc_project.Condition.HostFirmware  CurrentFirmwareCondition<br>
s "xyz.openbmc_project.Condition.HostFirmware.FirmwareCondition.Running"<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">---------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">root@siad:~# journalctl | grep -i phosphor-host-state-manager<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Check if host is running<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: mapper1=/xyz/openbmc_project/Gpios/host0<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: mapper1=/xyz/openbmc_project/control/host0<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: mapper2=xyz.openbmc_project.State.HostCondition.Gpio<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: mapper2=xyz.openbmc_project.Control.Host<br>
Apr 18 08:19:14 siad phosphor-host-state-manager[341]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'<br>
Apr 18 08:19:14 siad phosphor-host-state-manager[341]:   what():  sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: path=/xyz/openbmc_project/control/host0<br>
Apr 18 08:19:13 siad phosphor-host-state-manager[341]: Ufi: services=xyz.openbmc_project.Control.Host<br>
Apr 18 08:19:14 siad phosphor-host-state-manager[341]: Error reading HostFirmware condition, error: sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable, service: xyz.openbmc_project.Control.Host path: /xyz/openbmc_project/control/host0<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Check if host is running<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: mapper1=/xyz/openbmc_project/Gpios/host0<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: mapper1=/xyz/openbmc_project/control/host0<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: mapper2=xyz.openbmc_project.State.HostCondition.Gpio<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: mapper2=xyz.openbmc_project.Control.Host<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: terminate called after throwing an instance of 'sdbusplus::exception::SdBusError'<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]:   what():  sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: path=/xyz/openbmc_project/control/host0<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Ufi: services=xyz.openbmc_project.Control.Host<br>
Apr 18 08:19:24 siad phosphor-host-state-manager[366]: Error reading HostFirmware condition, error: sd_bus_call: org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable, service: xyz.openbmc_project.Control.Host path: /xyz/openbmc_project/control/host0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">```<br>
<br>
Best regards,<br>
Jordan Chang<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">******************************</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">This e-mail is confidential. If you are not the intended recipient, you must not disclose, distribute or use the information in it as this could be a breach of confidentiality.If you have received
 this message in error, please advise us immediately by return e-mail and delete the document. The address from which this message has been sent is strictly for business mail only and the company reserves the right to monitor the contents of communications
 and take action where and when it is deemed necessary.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt">Thank you for your co-operation.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
</div>
<hr align="center" width="100%">
<span style="font-size:12pt;line-height:0.7;font-family: 'Arial'; color:#808080">The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the
 addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly
 appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
</span>
</body>
</html>