Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » /CONF-V1/PUT/configurations/PositionService not working(Remote OSGi ConfigurationAdmin Interactions via MQTT)
/CONF-V1/PUT/configurations/PositionService not working [message #1820808] Wed, 29 January 2020 12:30 Go to next message
andrea lagomarsini is currently offline andrea lagomarsiniFriend
Messages: 2
Registered: January 2020
Junior Member
Hi,
i'm trying to configure a kura device on raspberry, via MQTT message.

i' using topic .../CONF-V1/PUT/configurations/PositionService

sending in the body of payload the xml :

<ocd:OCD description="The PositionService provides GPS positions for Kura. The parameters define the serial port configuration of the device." id="org.eclipse.kura.position.PositionService" name="PositionService">
<ocd:AD cardinality="0" default="false" description="Whether or not to enable the PositionService" id="enabled" name="enabled" required="true" type="Boolean"/>
<ocd:AD cardinality="0" default="false" description="Specify static position instead of using GPS" id="static" name="static" required="true" type="Boolean"/>
<ocd:AD cardinality="0" default="0" description="Static latitude value in degrees" id="latitude" name="latitude" required="false" type="Double"/>
<ocd:AD cardinality="0" default="0" description="Static longitude value in degrees" id="longitude" name="longitude" required="false" type="Double"/>
<ocd:AD cardinality="0" default="1000" description="Static altitude value in meters" id="altitude" name="altitude" required="false" type="Double"/>
<ocd:AD cardinality="0" description="The USB or serial port of the GPS device (e.g. 1-3.2 or /dev/ttyACM0). If the GPS device is provided by a modem, and it needs to be enabled from the network configuration section of the Web UI, this field must be left empty." id="port" name="port" required="false" type="String"/>
<ocd:AD cardinality="0" default="115200" description="The baud rate of the GPS device." id="baudRate" name="baudRate" required="false" type="Integer">
<ocd:Option label="110" value="110"/>
<ocd:Option label="300" value="300"/>
<ocd:Option label="600" value="600"/>
<ocd:Option label="1200" value="1200"/>
<ocd:Option label="2400" value="2400"/>
<ocd:Option label="4800" value="4800"/>
<ocd:Option label="9600" value="9600"/>
<ocd:Option label="14400" value="14400"/>
<ocd:Option label="19200" value="19200"/>
<ocd:Option label="28800" value="28800"/>
<ocd:Option label="38400" value="38400"/>
<ocd:Option label="56000" value="56000"/>
<ocd:Option label="57600" value="57600"/>
<ocd:Option label="115200" value="115200"/>
<ocd:Option label="128000" value="128000"/>
<ocd:Option label="153600" value="153600"/>
<ocd:Option label="230400" value="230400"/>
<ocd:Option label="256000" value="256000"/>
<ocd:Option label="460800" value="460800"/>
<ocd:Option label="921600" value="921600"/>
</ocd:AD>
<ocd:AD cardinality="0" default="8" description="The number of bits per word or the 'data bits' for the serial communication to the GPS device." id="bitsPerWord" name="bitsPerWord" required="false" type="Integer">
<ocd:Option label="5" value="5"/>
<ocd:Option label="6" value="6"/>
<ocd:Option label="7" value="7"/>
<ocd:Option label="8" value="8"/>
</ocd:AD>
<ocd:AD cardinality="0" default="1" description="The stop bits for the serial communication to the GPS device." id="stopBits" name="stopBits" required="false" type="Integer">
<ocd:Option label="1" value="1"/>
<ocd:Option label="2" value="2"/>
<ocd:Option label="1.5" value="3"/>
</ocd:AD>
<ocd:AD cardinality="0" default="0" description="The parity for the serial communication to the GPS device." id="parity" name="parity" required="false" type="Integer">
<ocd:Option label="None" value="0"/>
<ocd:Option label="Odd" value="1"/>
<ocd:Option label="Even" value="2"/>
<ocd:Option label="Mark" value="3"/>
<ocd:Option label="Space" value="4"/>
</ocd:AD>
<ocd:Icon resource="PositionService" size="32"/>
</ocd:OCD>
<esf:properties>
<esf:property array="false" encrypted="false" name="baudRate" type="Integer">
<esf:value>115200</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="altitude" type="Double">
<esf:value>1000.0</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="bitsPerWord" type="Integer">
<esf:value>8</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="static" type="Boolean">
<esf:value>true</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="port" type="String">
<esf:value>1-3.2</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="stopBits" type="Integer">
<esf:value>1</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="parity" type="Integer">
<esf:value>0</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="latitude" type="Double">
<esf:value>22222222.0</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="enabled" type="Boolean">
<esf:value>true</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="kura.service.pid" type="String">
<esf:value>org.eclipse.kura.position.PositionService</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="longitude" type="Double">
<esf:value>111111.0</esf:value>
</esf:property>
<esf:property array="false" encrypted="false" name="service.pid" type="String">
<esf:value>org.eclipse.kura.position.PositionService</esf:value>
</esf:property>
</esf:properties>
</esf:configuration>

and i recevied from device :
INFO o.e.k.c.c.CloudServiceImpl - Message arrived on topic: CTRL/mqtt/device1/CONF-V1/PUT/configurations/PositionService


but the configuration of PositionService is not changed !!

Any idea ?

Re: /CONF-V1/PUT/configurations/PositionService not working [message #1821027 is a reply to message #1820808] Tue, 04 February 2020 16:25 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 391
Registered: July 2015
Location: Italy
Senior Member
Hello,
I don't believe PositionService is the effective component pid.

Best regards,
Matteo
Re: /CONF-V1/PUT/configurations/PositionService not working [message #1821028 is a reply to message #1821027] Tue, 04 February 2020 16:33 Go to previous message
andrea lagomarsini is currently offline andrea lagomarsiniFriend
Messages: 2
Registered: January 2020
Junior Member
i finally solved the question using :
/CONF-V1/PUT/configurations

and sending the correct Medatata component configuration..
becouse if you send the configuration to the PID.. is not working ..

I solved debugging Kura code on emulator.

[Updated on: Tue, 04 February 2020 16:34]

Report message to a moderator

Previous Topic:[Beginner] getting 14,000+ errors trying to setup developer workspace
Next Topic:Bundle with static website
Goto Forum:
  


Current Time: Fri Jul 03 11:50:58 GMT 2020

Powered by FUDForum. Page generated in 0.01476 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top