Omron NX102 PLC:Connection refused by Cloud Broker

Hi Guys,

I am currently trying to connect my Omron PLC to the HIVEMQ Cloud but I have some Authentication issue … with every login I got the message that I do not have the permission to connect to the Broker … what is strange:

If I use another Client like MQTT Explorer and NODE RED I am able to connect to the Cloud …

Could you please give me a cert and key in order to try to put those on the PLC to try … I am afraid that the PLC still needs a cert as well as a key …

Another note: The PLC does only support the MQTT Version 3.1.1 … I do not know which kind of version the cloud uses but I suppose the V3.1.1 should be fine I guess.

My cloud address is: 2ce32945b19b405b9c84023a27fee4e9.s2.eu.hivemq.cloud

Evey kind of help is quite welcomed … I do not know what I should do more …

Best thanks,

Andreas

Hi Andreas,

In case if your device requires a server CA file for TLS, you can download it from LetsEncrypt directly. Please refer to Frequently Asked Questions for instructions.

I hope it helps!
Kind regards,
Dasha from HiveMQ Team

Hi!
Well… The steps I did to connect to HiveHQ with a NX1P2 (MQTT 1.0.0 libraries):

Ethernet configuration in Sysmac Studio:
*PLC: 192.168.10.11 *
Mask: 255.255.255.0
Use DNS (yes)
Pri DNS: 8.8.8.8
Sec DNS 8.8.4.4

TLS Configuration with tlsconfig.exe OMRON Tool in Sysmac Studio Tools folder.

  1. Create RCA KEY 2048 with OpenSSL: NX1P2_private.key

  2. Crete X.509 self-signed certificate with OpenSSL: NX1P2_self-signed.crt

  3. Configure session 0 in PLC (TLSSession0) in command prompt (CMD)

First:
\TLSSettingTool>tlsconfig delSessionInfo /id 0 /ip:192.168.10.11

Then:
\TLSSettingTool>tlsconfig setSessionInfo /id 0 /key “NX1P2_private.key” /cert “NX1P2_self-signed.crt” /ip:192.168.10.11 /f

Validate:
\TLSSettingTool>tlsconfig getAllSessionInfo /ip:192.168.10.11

Should show:
---------------------------------------
Count=1
Id=0
PrivateKey=NX1P2_private.key
Certificate=NX1P2_self-signed.crt
Description=
000:Success
---------------------------------------

TLS and other variables In Sysmac Studio (ST) program:

(…)
// Client info
MQTT_ClientID := ‘NX1P2_Test’;
MQTT_Topic := ‘Temperature’;

*//TLS *
MQTT_ConnectionSettings.TLSUse := TRUE;
MQTT_ConnectionSettings.TLSSessionName := ‘TLSSession0’;
MQTT_ConnectionSettings.CleanSession := TRUE;

*// Broker connection *
MQTT_ConnectionSettings.PortNo := UINT#8883;
MQTT_ConnectionSettings.IpAdr := ‘a code like 417b241570947298b2693318f2b1736e.s2.eu.hivemq.cloud’;

// User & Password (Note: Not the user to enter HiveHQ, is created as an Active MQTT Credential)
MQTT_ConnectionSettings.UserName := ‘MyTestUser’;
MQTT_ConnectionSettings.Password := ‘12345678’;

// WillCfg
MQTT_ConnectionSettings.WillCfg.WillFlag :=FALSE;

That should work… (it worked for me)

Sorry about my English!