From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.jumo.net ([193.24.15.13]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mAsNj-0005GE-QG for rauc@pengutronix.de; Tue, 03 Aug 2021 13:14:49 +0200 In-Reply-To: Message-ID: From: Eugen.Wiens@JUMO.net Date: Tue, 3 Aug 2021 13:14:45 +0200 References: , , , , , MIME-Version: 1.0 Subject: [RAUC] Antwort: Re: Antwort: Re: Antwort: Re: Antwort: Re: Antwort: D-Bus control Qt List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0484598912==" Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: "Stahl, Michael" Cc: RAUC , "RAUC@pengutronix.de" --===============0484598912== Content-Type: multipart/alternative; boundary="=_alternative 003DC6ADC1258726_=" --=_alternative 003DC6ADC1258726_= Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Michael, sounds good. Von: "Stahl, Michael" An: "RAUC@pengutronix.de" Kopie: RAUC Datum: 03.08.2021 13:00 Betreff: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: Re: Antwort: = D-Bus control Qt Gesendet von: "RAUC" I found the issue=20 You have to connect to the systemBus not to the sessionBus! if (QDBusConnection::systemBus().connect("de.pengutronix.rauc", =20 //Service=20 "/", //Path "org.freedesktop.DBus.Properties",=20 //Interface "PropertiesChanged", this, SLOT(propertyChanged(const QString& , const QMap& , const QStringList&=20 )))) { qDebug() << "PropertiesChanged signal connected successfully to=20 slot"; } else { qDebug() << "PropertiesChanged signal connection was not=20 successful"; } Now I my function propertyChanged is called every time the property=20 changes. If you use=20 export QDBUS=5FDEBUG=3D1 you get a lot of debug output. It is very useful. The next step is to extract the informations of the QMap. Von: Stahl, Michael Gesendet: Dienstag, 3. August 2021 10:27 An: Eugen.Wiens@JUMO.net Cc: RAUC@pengutronix.de ; RAUC=20 Betreff: AW: Antwort: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus=20 control Qt=20 =20 Hi Euen, I know but I am stucking. I am polling the propery "Operation". Just when=20 it changes from "idle" to "installing" I subscribe the PropertiesChanged=20 signal but without success. I tried several connect strings but all=20 without success.=20 if (QDBusConnection::sessionBus().connect("de.pengutronix.rauc", "/", "org.freedesktop.DBus.Properties", "PropertiesChanged", this, SLOT(propertyChanged(const QString& , const QMap& , const QStringList&=20 ))))=20 { qDebug() << "PropertiesChanged signal connected successfully to slot"; } else { qDebug() << "PropertiesChanged signal connection was not successful"; } Please can you tell me how to subcribe the PropertiesChanged signal? Von: Eugen.Wiens@JUMO.net Gesendet: Dienstag, 3. August 2021 08:27 An: Stahl, Michael Cc: RAUC@pengutronix.de ; RAUC=20 Betreff: Antwort: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus=20 control Qt=20 =20 Hi Michael, you can connect to a property change on dbus level. That is the way we do=20 it. "RAUC" schrieb am 03.08.2021 08:21:32: > Von: "Stahl, Michael" > An: "Eugen.Wiens@JUMO.net" > Kopie: "RAUC" , "RAUC@pengutronix.de"=20 > > Datum: 03.08.2021 08:21 > Betreff: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus control=20 Qt > Gesendet von: "RAUC" >=20 > Hi Eugen, >=20 > thanks again. I implemented the signal and now I get the signal that > the update is finished. > But thats the only signal that rauc is provided, isn't it? To get=20 > the progress I have to poll the property, or are there general=20 > signals on the dbus that I can connect to? >=20 > Do you read the property "Progress" like=20 > QDBusInterface iface( "de.pengutronix.rauc",=20 > "/", > "de.pengutronix.rauc.Installer", > QDBusConnection::systemBus() ); > QVariant property =3D iface.property("Progress"); > MyProgress parameterProgress; > property.value() >> parameterProgress; >=20 > or did you use another possibility? > If I use the above I get a message five times and the marshaled data ( > m=5FProgress, m=5FMessage, ..) are always empty. > QDBusArgument: read from a write-only object >=20 > Von: Eugen.Wiens@JUMO.net > Gesendet: Montag, 2. August 2021 16:53 > An: Stahl, Michael > Cc: RAUC@pengutronix.de ; RAUC bounces@pengutronix.de> > Betreff: Antwort: Re: [RAUC] Antwort: Re: Antwort: D-Bus control Qt=20 >=20 > Hi Michael, >=20 > "RAUC" schrieb am 02.08.2021 16:29:18: >=20 > > Von: "Stahl, Michael" > > An: "Eugen.Wiens@JUMO.net" > > Kopie: RAUC , "RAUC@pengutronix.de"=20 > > > > Datum: 02.08.2021 16:29 > > Betreff: Re: [RAUC] Antwort: Re: Antwort: D-Bus control Qt > > Gesendet von: "RAUC" > >=20 > > Okay, thanks a lot. > >=20 > > A last question. Is it correct that I have to poll the "Progress"=20 > > property or is there any signal system where I can subcribe to get a > > notification at every change of progress status? >=20 > We are using a dbus signal. You can connect to it with Qt. >=20 > Best regards, > Eugen=20 > Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte=20 > Informationen beinhalten und ist ausschlie?lich f?r die im Verteiler > genannten Personen bestimmt. Das unerlaubte Kopieren sowie die=20 > unbefugte Weitergabe dieser Mail sind nicht gestattet. Bitte=20 > benachrichtigen Sie uns gegebenenfalls telefonisch oder mit Antwort- > Mail, falls Sie nicht der richtige Adressat dieser E-Mail sind.=20 > Bitte l?schen Sie diese Nachricht und alle Anh?nge dazu unverz? > glich. Falls nicht ausdr?cklich vermerkt, ist diese E-Mail keine=20 > rechtlich bindende Vereinbarung. >=20 > Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda,=20 > Amtsgericht Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M.=20 > K. JUCHHEIM GmbH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17,=20 > Gesch?ftsf?hrer: Dipl.-Ing. Bernhard Juchheim, Dipl.-Kfm. Michael=20 > Juchheim, Dipl.-Ing. Dimitrios Charisiadis > Ust.-Id.-Nr.: DE=20 112411234=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F > RAUC mailing list Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte Informationen = beinhalten und ist ausschlie?lich f?r die im Verteiler genannten Personen=20 bestimmt. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser=20 Mail sind nicht gestattet. Bitte benachrichtigen Sie uns gegebenenfalls=20 telefonisch oder mit Antwort-Mail, falls Sie nicht der richtige Adressat=20 dieser E-Mail sind. Bitte l?schen Sie diese Nachricht und alle Anh?nge=20 dazu unverz?glich. Falls nicht ausdr?cklich vermerkt, ist diese E-Mail=20 keine rechtlich bindende Vereinbarung. Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgericht=20 Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M. K. JUCHHEIM GmbH,=20 Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Gesch?ftsf?hrer: Dipl.-Ing.=20 Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios=20 Charisiadis Ust.-Id.-Nr.: DE 112411234=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F RAUC mailing list Diese E-Mail kann vertrauliche und/oder rechtlich gesch=FCtzte Informatione= n beinhalten und ist ausschlie=DFlich f=FCr die im Verteiler genannten Pers= onen bestimmt. Das unerlaubte Kopieren sowie die unbefugte Weitergabe diese= r Mail sind nicht gestattet. Bitte benachrichtigen Sie uns gegebenenfalls t= elefonisch oder mit Antwort-Mail, falls Sie nicht der richtige Adressat die= ser E-Mail sind. Bitte l=F6schen Sie diese Nachricht und alle Anh=E4nge daz= u unverz=FCglich. Falls nicht ausdr=FCcklich vermerkt, ist diese E-Mail kei= ne rechtlich bindende Vereinbarung.=20 Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgericht F= ulda HRA 302, Pers=F6nlich haftende Gesellschafterin: M. K. JUCHHEIM GmbH, = Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Gesch=E4ftsf=FChrer: Dipl.-Ing= . Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios Char= isiadis=20 Ust.-Id.-Nr.: DE 112411234 --=_alternative 003DC6ADC1258726_= Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Hi Michael,

sounds good.



Von:        "Stahl, Michael" <mstahl@moba.de>
An:        "RAUC@pengutronix.de&q= uot; <RAUC@pengutronix.de>
Kopie:        RAUC <rauc-bounces@pengu= tronix.de>
= Datum:        03.08.2021 13:00
= Betreff:        Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: Re: Antwort: D-Bus control Qt
Gesendet von:        "RAUC" <rauc-bounces@pengutronix.de>




I found the issue  

You have to connect to the systemBus not to the sessionBus!

if(QDBusConnection::systemBus().= connect("de.pengutronix.rauc",                                        //Service
      =                            "/= ",             = ;                 //Path
&n= bsp;                                "o= rg.freedesktop.DBus.Properties"= ,//Interface
                                 "P= ropertiesChanged",
                                 
this,
                                 SLOT(propertyChanged(constQS= tring&,

      &= nbsp;                                               const<= font size=3D3 color=3D#c0c0c0 face=3D"Calibri">
QMap<= QString,QVariant>&,
<= font size=3D3 color=3D#c0c0c0 face=3D"Calibri">                                                     
const<= font size=3D3 color=3D#c0c0c0 face=3D"Calibri">
QStringList&))))
{

        qDebug()<<"PropertiesChangedsig= nalconnectedsuccessfully= toslot";=
      &n= bsp; }= else{
        qDebug()<<"PropertiesChangedsig= nalconnectionwasnotsuccessful";        }

Now I my function propertyChanged is called every time the property changes.

If you use
export QDBUS=5FDEBUG=3D1
you get a lot of debug outpu= t. It is very useful.


The nex= t step is to extract the informations of the QMap.




V= on: Stahl, Michael <mstahl@moba.de>
Gesendet:
Dienstag,= 3. August 2021 10:27
An:
Eugen.Wiens@JUMO.net <Eugen.Wiens@JU= MO.net>
Cc:
RAUC@pengutronix.de <RAUC@pengutronix.de>; R= AUC <rauc-bounces@pengutronix.de>
Betreff:
AW: Antwort: Re:= [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus control Qt

 
Hi Euen,

I know but I am stucking. I am polling the propery "Operation". Just when it changes from "idle&quo= t; to "installing" I subscribe the PropertiesChanged signal but without success. I tried several connect strings but all without success.


if
(QDBusConnection::sessionBus().connect("de.pengutronix.rauc",
                                 "/= ",
                                 "o= rg.freedesktop.DBus.Properties"= ,
    &= nbsp;                            "P= ropertiesChanged",
                                 
this,
                                 SLOT(propertyChanged(constQString&,
&n= bsp;                                                     const<= font size=3D3 color=3D#c0c0c0 face=3D"Calibri">
QMap<QString,QVariant>&
,
 =                                                     const<= font size=3D3 color=3D#c0c0c0 face=3D"Calibri">
QStringList&))))
= {
    <= /font>qDebug()<<= "PropertiesChangedsignalconnected= successfully= toslot";
}else{
    qDebug()<<"PropertiesChangedsignalconnectionwasnotsucc= essful";
}

Pleas= e can you tell me how to subcribe the PropertiesChanged signal?



Von: Eugen.Wiens@JUMO.net <Eugen.Wiens@JUMO.net>Gesendet: Dienstag, 3. August 2021 08:27
An:
Stahl, Michael= <mstahl@moba.de>
Cc:
RAUC@pengutronix.de <RAUC@pengutro= nix.de>; RAUC <rauc-bounces@pengutronix.de>
Betreff:
Ant= wort: Re: [RAUC] Antwort: Re: Antwort: Re: Antwort: D-Bus control Qt

 Hi Michael,

you can connect to a property c= hange on dbus level. That is the way we do it.



"RAU= C" <rauc-bounces@pengutronix.de> schrieb am 03.08.2021 08:21:32:

> Von: "Stahl, Michael" <mstahl@moba.de>= ;
> An: "Eugen.Wiens@JUMO.net" <Eugen.Wiens@JUMO.net>=
> Kopie: "RAUC" <rauc-bounces@pengutronix.de>, "= ;RAUC@pengutronix.de"
> <RAUC@pengutronix.de>
> Datum: 03.08.2021 08:21
>= ; Betreff: Re: [RAUC] Antwort: Re:  Antwort: Re:  Antwort:  D-Bus control Qt
> Gesendet von: "RAUC" <rauc-boun= ces@pengutronix.de>
>
> Hi Eugen,
>
> thanks a= gain. I implemented the signal and now I get the signal that
> the up= date is finished.
> But thats the only signal that rauc is provided, = isn't it? To get
> the progress I have to poll the property, or are there general > signals on the dbus that I can connect to?
>
> Do you re= ad the property "Progress" like
> QDBusInterface iface( &q= uot;de.pengutronix.rauc",
>           =        "/",
>       &nbs= p;          "de.pengutronix.rauc.Installer&qu= ot;,
>                  = QDBusConnection::systemBus() );
> QVariant property =3D iface.property("Progress");
&= gt; MyProgress parameterProgress;
> property.value<QDBusArgument&g= t;() >> parameterProgress;
>
> or did you use another po= ssibility?
> If I use the above I get a message five times and the ma= rshaled data (
> m=5FProgress, m=5FMessage, ..) are always empty.
> QDBusArg= ument: read from a write-only object

<= tt>
>
> Von: Eugen.Wiens@JUMO.net <Eugen.Wie= ns@JUMO.net>
> Gesendet: Montag, 2. August 2021 16:53
> An: = Stahl, Michael <mstahl@moba.de>
> Cc: RAUC@pengutronix.de <R= AUC@pengutronix.de>; RAUC <rauc-
> bounces@pengutronix.de>> Betreff: Antwort: Re: [RAUC] Antwort: Re: Antwort: D-Bus control Qt
>  
> Hi Michael,
>
> "RAUC" <r= auc-bounces@pengutronix.de> schrieb am 02.08.2021 16:29:18:
>
> > Von: "Stahl, Michael" <mstahl@= moba.de>
> > An: "Eugen.Wiens@JUMO.net" <Eugen.Wie= ns@JUMO.net>
> > Kopie: RAUC <rauc-bounces@pengutronix.de>= ;, "RAUC@pengutronix.de"
> > <RAUC@pengutronix.de>
> > Datum: 02.08.2021 16= :29
> > Betreff: Re: [RAUC] Antwort: Re:  Antwort:  D-Bu= s control Qt
> > Gesendet von: "RAUC" <rauc-bounces@pengutronix= .de>
> >
> > Okay, thanks a lot.
> >
>= ; > A last question. Is it correct that I have to poll the "Progres= s"
> > property or is there any signal system where I can subcribe to get a
> > notification at every change of progress status?
>=
> We are using a dbus signal. You can connect to it with Qt.
>= ;
> Best regards,
> Eugen
> Diese E-Mail kann vertrauli= che und/oder rechtlich gesch?tzte
> Informationen beinhalten und ist= ausschlie?lich f?r die im Verteiler
> genannten Personen bestimmt. D= as unerlaubte Kopieren sowie die
> unbefugte Weitergabe dieser Mail = sind nicht gestattet. Bitte
> benachrichtigen Sie uns gegebenenfalls= telefonisch oder mit Antwort-
> Mail, falls Sie nicht der richtige A= dressat dieser E-Mail sind.
> Bitte l?schen Sie diese Nachricht und = alle Anh?nge dazu unverz?
> glich. Falls nicht ausdr?cklich vermerkt,= ist diese E-Mail keine
> rechtlich bindende Vereinbarung.
> <= br>> Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda,
> Amtsgericht Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M.
> K. JUCHHEIM GmbH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, > Gesch?ftsf?hrer: Dipl.-Ing. Bernhard Juchheim, Dipl.-Kfm. Michael
> Juchheim, Dipl.-Ing. Dimitrios Charisiadis
> Ust.-Id.-Nr.: D= E 112411234=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F
> RAUC mailing list

Diese E-Mail kann vertrauliche und/oder rechtlich gesch?tzte Informationen beinhalten und ist ausschlie?lich f?r die im Verteiler genannten Personen bestimmt. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet. Bitte benachrich= tigen Sie uns gegebenenfalls telefonisch oder mit Antwort-Mail, falls Sie nicht der richtige Adressat dieser E-Mail sind. Bitte l?schen Sie diese Nachricht und alle Anh?nge dazu unverz?glich. Falls nicht ausdr?cklich vermerkt, ist diese E-Mail keine rechtlich bindende Vereinbarung.

Kommanditges= ellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgericht Fulda HRA 302, Pers?nlich haftende Gesellschafterin: M. K. JUCHHEIM GmbH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Gesch?ftsf?hrer: Dipl.-Ing. Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios Charis= iadis
Ust.-Id.-Nr.: DE 112411234
=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
RAUC mailing list=


Diese E-Mail kann vertrauliche und/oder rechtlich gesch=FCtzte= Informationen beinhalten und ist ausschlie=DFlich f=FCr die im Verteiler g= enannten Personen bestimmt. Das unerlaubte Kopieren sowie die unbefugte Wei= tergabe dieser Mail sind nicht gestattet. Bitte benachrichtigen Sie uns geg= ebenenfalls telefonisch oder mit Antwort-Mail, falls Sie nicht der richtige= Adressat dieser E-Mail sind. Bitte l=F6schen Sie diese Nachricht und alle = Anh=E4nge dazu unverz=FCglich. Falls nicht ausdr=FCcklich vermerkt, ist die= se E-Mail keine rechtlich bindende Vereinbarung.

Kommanditgesellschaft: JUMO GmbH & Co. KG, Sitz: 36039 Fulda, Amtsgeric= ht Fulda HRA 302, Pers=F6nlich haftende Gesellschafterin: M. K. JUCHHEIM Gm= bH, Sitz: 36039 Fulda, Amtsgericht Fulda HRB 17, Gesch=E4ftsf=FChrer: Dipl.= -Ing. Bernhard Juchheim, Dipl.-Kfm. Michael Juchheim, Dipl.-Ing. Dimitrios = Charisiadis
Ust.-Id.-Nr.: DE 112411234

--=_alternative 003DC6ADC1258726_=-- --===============0484598912== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ RAUC mailing list --===============0484598912==--