FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
327 views 0 comments
by anonymous

Hi @all,

I'm using the TRB142 as MQTT Modem.
The modem is collecting Modbus RTU data via the COM Port and sending it as MQTT via Data To Server (modbus_data_sender).

For testing purposes I have configured a fully functional "MQTT, encrypted, client certificate required" - connection to test.mosquitto.org.
To do so I have imported client certificate, client key and certficate of mosquitto.org CA.
This completely works fine.

In production the modem must connect to the SAP Internet of Things cloud gateway.
I have configured all settings exactly as in the connection settings of test.mosquitto.org. But the certificates section fails.
Importing client certificate and client key is working.
But the trail to import certificate file of SAP Internet of Things CA (attached here) fails with no message.
The system log shows:

/usr/bin/lua: /usr/lib/lua/ubus/certificates.lua:185: attempt to perform arithmetic on a nil value
  daemon.err vuci[3520]: stack traceback:
  daemon.err vuci[3520]:         /usr/lib/lua/ubus/certificates.lua:185: in function </usr/lib/lua/ubus/certificates.lua:140>
  daemon.err vuci[3520]:         [C]: in function 'run'
  daemon.err vuci[3520]:         /usr/sbin/vuci:98: in function 'main'
  daemon.err vuci[3520]:         /usr/sbin/vuci:101: in main chunk
  daemon.err vuci[3520]:         [C]: ?

Even other trails with converting the certificate file in other formats and import these were not successful.

Question:

How to import (and use) the CA file of SAP Internet of Things CA by the modem and its service modbus_data_sender?

Update:

It seems as to be a possible problem with certificate's expiry date after 2038.
Because the unix time must be handled by an unsigned int (or a 64-bit Integer) to address dates later than 19. January 2038 3:14:08.
The SAP Internet of Things CA expiration is in 2040.
I don't know if there is an alternative way to get such certificates imported and made accessible for the modem.

Via SSH session on modem's console the timestamp-recognition shows for the original certificate expiration date:

root@trb142-7583:~# date -u -d "2040-07-18 10:00:00"
date: invalid date '2040-07-18 10:00:00'

(and three years before:)

root@trb142-7583:~# date -u -d "2037-07-18 10:00:00"
Sat Jul 18 10:00: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AbVENs6RT
8oVX1Wyh3GztpF41Iq4xM6G/lxidxjsdhj9y4rafnZkqbfcv7PSo7AojC5XmKmKG
ma/mYpsbXZAgb3FWznYI5oqxlP2OfjY1xhlbvy0fhixR3qkSNDzujGEhXTOft3WN
LqecYBkNXV3o1FTP79Co4AyilvFDQhh+I5afFHAwJlUewXdsOCX1/Hz+wgfAsf/o
9IyAzG5ym8EZAeHxVJKGGcAqQBIXKOhFxs0JZP3EmgAAlLUwgrF5iRhUenC6qUsw
P1pyzBSI+kS7WaGjmWyT8oI4ubflNZIfrqgWgPfg6ak=
-----END CERTIFICATE-----

1 Answer

0 votes
by anonymous

Hello,

Thank you for detailed information.

Would you also be able to download troubleshoot package from your TRB device (it can be downloaded from "System -> Administration -> Troubleshoot" menu) and send it to me via private message?

Also, could you let me know if there is any way to create separate instance on your account or dummy certificates, which we could temporarily use when testing if issue would indeed be resolved after changes (once our RnD team would make them), while not using your actual certificates and compromising your security?