Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: mqttio client %NONAME_W_NOMSG

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11782

  • Pomplun
  • Pomplun's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hello Claes,
I've been struggling with the mqtt configuration for a while now.
Unfortunately, this always ends with the Mqtt client showing the status message "%NONAME-W-NOMSG, Message number 0".
I've now tried various variants. Unfortunately, the broker doesn't even seem to get a request sent.
I selected MqttIO in the BuildOptions and created a minimal project with it.
It doesn't matter if I specify localhost, 127.0.0.1 without user and password.
If I specify an external broker with user and password, "%NONAME-W-..." always comes in the status but unfortunately no connection or even a value.
Everything works from a terminal on the same PC.
Where else can I have forgotten something?
The picture shows the complete configuration.

Many thanks in advance


proviewr_mqtt.png
The administrator has disabled public write access.

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11783

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 502
  • Karma: 133
Hi Pomplun,

You have to at least open the PlcPgm and save. If there isn't any plc code anywhere, the plc executable will not be created when you build the node.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Pomplun

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11784

  • Pomplun
  • Pomplun's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hello Claes,
thank you for the quick help.
Everything works for my development station after I wrote a small program Ai to Av in the PLC.
I start the station with the runtime monitor. The changed values on the external MQTT broker are displayed on the station.
So far everything OK.

In the end, a Raspberry Pi 4 should take over this connection.
I built exactly the same configuration for the Raspberry Pi runtime-station.
I have installed on the development station:
apt install gcc-10-arm-linux-gnueabihf-base gcc-10-arm-linux-gnueabihf g++-10-arm-linux-gnueabihf
for cross-compiling.

I copy the libs an header-files for the cross-compiling with this commands:
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libkrb5.so* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libk5crypto.so.3* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libcom_err.so* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libkrb5support.so* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libkeyutils.so* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libgssapi_krb5* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libtirpc.* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/lib/arm-linux-gnueabihf/libmosq* /usr/arm-linux-gnueabihf/lib
sudo scp -r pi@192.168.5.175:/usr/include/tirpc /usr/arm-linux-gnueabihf/include
sudo scp pi@192.168.5.175:/usr/lib/libpigpio* /usr/arm-linux-gnueabihf/lib
sudo scp pi@192.168.5.175:/usr/include/pigpio* /usr/arm-linux-gnueabihf/include
sudo dpkg -i /home/einrichter/Downloads/proviewr/v6001/debian11/pwrrpi60_6.0.0-1_amd64.deb
sudo dpkg -i /home/einrichter/Downloads/proviewr/v6001/debian11/pwrdemo60_6.0.0-1_amd64.deb
For yout information i using the i2c-Bus with pigpio. That's the reason for the many libs.
My little function to pigpio is working.

But in the mqtt-client:
Here I still have the message %NONAME-W-NOMSG...".
I configured the Development-Station (Debian 11.5) and the Raspberry Pi runtime station according to the Installation Guide v6.0.0.
I don't get an error message that a lib is missing and I installed the line Ai to Av in the plc as in the project on the development station.
Do you have any idea what could be missing?
Where else can I look?
I can also read and write from the Raspberry Pi with mosquitto_sub and mosquitto_pub.
The administrator has disabled public write access.

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11786

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 502
  • Karma: 133
Hi Pomplun,

First check the log file, $pwrp_log/pwr_'hostname'.log for any error messages.

In the runtime navigator, you can see in the PlcThread object if the plc thread is running. There is a Count attribute that is incremented each scan. If this is not counting, the thread is not running.

With 'ps x' you can check if there is a plc process with name plc_'hostname'_'busid'_plc running. An executable with that name should be present on $pwrp_exe, and also on $pwrp_root/bld/arm_linux/exe in the development station. If it's not there, something is wrong in the build process.

/Claes
The administrator has disabled public write access.

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11787

  • Pomplun
  • Pomplun's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Karma: 0
Hi Claes,

Thanks for the answer.
I started a new project for the Raspberry pi 4 last night. There is only one connection to the Mqtt Broker involved.
The Mqtt Client including the Mqtt Device and then a ChanAi and a ChanAo.
A ChanAi -> Ai and in the PLC AI -> Av and the other direction in the PLC Av -> Ao and the connection Ao -> ChanAo.
I didn't see any error message when building the runtime project. The project is also transferred to the Raspberry Pi with distribute without any problems.
And it can also be started with rt_ini -i & without any visible error.

I found this entry for the PLC in the log file.
something like that:
Failed to initialize io, %IO-E-RELEASEBUILD, I/O system is not built with this Release
To me it looks like the mqtt module was built with a wrong version.
Did I miss something in the description?
Or should that have been taken care of during the installation of the runtime?


Thank you

/Wolfgang
The administrator has disabled public write access.

mqttio client %NONAME_W_NOMSG 1 year 5 months ago #11788

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3176
  • Thank you received: 502
  • Karma: 133
The pwrrpi package is built by the cross compiler and it seems as it didn't find libmosquitto, and thus the plc process does not have support for mqtt IO. The rt_io_comm process though is built nativley, so if you change the Process to IoComm in the mqtt client and device object I think is should work.

/Claes
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 8.253 seconds