Cannot send data from Meshlium to AWS IoT

How to configure Meshlium or use the Manager System
Post Reply
ziadmaiden
Posts: 5
Joined: Tue Jul 16, 2019 9:24 am
Company: Eurisko Mobility

Cannot send data from Meshlium to AWS IoT

Post by ziadmaiden » Tue Jul 16, 2019 1:43 pm

Dear support,

We're not able to send data from Meshlium to AWS IoT using 4G connection.
Getting the following error in logs:
Sending message 199 ....
Topic: $aws/things/Meshlium
Message: {
"id": "748",
"id_wasp": "MY_MOTE",
"id_secret": "1F5EAAE80593E42D",
"sensor": "PRES",
"value": "98591.46",
"datetime": "2019-07-16 06:53:18"
}

Error sending message: 199
ERROR: iot_tls_write L#275 failed
! mbedtls_ssl_write returned -0x50
Please advise.

Thanks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Cannot send data from Meshlium to AWS IoT

Post by libelium-dev » Wed Jul 17, 2019 7:21 am

Hi,

Could you please update the manager system version to the last one (v4.1.6) and try again?

Also please share the log file of the AWS connector. You can download it by connecting to the Meshlium using an FTP client and thesecredentials
-user: log
-password: libelium2014

Regards

ziadmaiden
Posts: 5
Joined: Tue Jul 16, 2019 9:24 am
Company: Eurisko Mobility

Re: Cannot send data from Meshlium to AWS IoT

Post by ziadmaiden » Wed Jul 17, 2019 11:24 am

Dear support,

Meshlium Manager System is already updated to the latest version:
Meshlium Manager System v.4.1.6 EU
Serial number: 18298090119523

As for logs, there you go:
g_log_level = 2
g_mqttserver = a36i23yuz9zj0p-ats.iot.eu-west-1.amazonaws.com
g_mqttport = 8883
g_mqttuser = sdk-nodejs-64fb25fa-472c-4ab6-ba0a-03b541b412a0
g_qos = 0
g_meshlium_name = meshlium733c
g_dbpass = libelium2007
Template Topic: $aws/things/Meshlium
Template Message: {
"id": "#ID#",
"id_wasp": "#ID_WASP#",
"id_secret": "#ID_SECRET#",
"sensor": "#SENSOR#",
"value": "#VALUE#",
"datetime": "#TIMESTAMP#"
}

Executing query: SELECT id, id_wasp, id_secret, frame_type, frame_number, sensor, value, timeStamp, sync FROM MeshliumDB.sensorParser WHERE sync & 33554432 = FALSE ORDER BY timestamp DESC LIMIT 200
Init...
Connecting...
DEBUG: iot_tls_connect L#120
. Seeding the random number generator...
DEBUG: iot_tls_connect L#128 . Loading the CA root certificate ...
DEBUG: iot_tls_connect L#134 ok (0 skipped)

DEBUG: iot_tls_connect L#136 . Loading the client cert. and key...
DEBUG: iot_tls_connect L#149 ok

DEBUG: iot_tls_connect L#151 . Connecting to a36i23yuz9zj0p-ats.iot.eu-west-1.amazonaws.com/8883...
DEBUG: iot_tls_connect L#170 ok

DEBUG: iot_tls_connect L#172 . Setting up the SSL/TLS structure...
DEBUG: iot_tls_connect L#204

SSL state connect : 0
DEBUG: iot_tls_connect L#207 ok

DEBUG: iot_tls_connect L#209

SSL state connect : 0
DEBUG: iot_tls_connect L#210 . Performing the SSL/TLS handshake...
DEBUG: _iot_tls_verify_cert L#41
Verify requested for (Depth 2):

DEBUG: _iot_tls_verify_cert L#43 cert. version : 3
serial number : 06:6C:9F:CF:99:BF:8C:0A:39:E2:F0:78:8A:43:E6:96:36:5B:CA
issuer name : C=US, O=Amazon, CN=Amazon Root CA 1
subject name : C=US, O=Amazon, CN=Amazon Root CA 1
issued on : 2015-05-26 00:00:00
expires on : 2038-01-17 00:00:00
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=true
key usage : Digital Signature, Key Cert Sign, CRL Sign

DEBUG: _iot_tls_verify_cert L#46 This certificate has no flags

DEBUG: _iot_tls_verify_cert L#41
Verify requested for (Depth 1):

DEBUG: _iot_tls_verify_cert L#43 cert. version : 3
serial number : 06:7F:94:57:85:87:E8:AC:77:DE:B2:53:32:5B:BC:99:8B:56:0D
issuer name : C=US, O=Amazon, CN=Amazon Root CA 1
subject name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon
issued on : 2015-10-22 00:00:00
expires on : 2025-10-19 00:00:00
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=true, max_pathlen=0
key usage : Digital Signature, Key Cert Sign, CRL Sign

DEBUG: _iot_tls_verify_cert L#46 This certificate has no flags

DEBUG: _iot_tls_verify_cert L#41
Verify requested for (Depth 0):

DEBUG: _iot_tls_verify_cert L#43 cert. version : 3
serial number : 0C:62:FF:6C:06:6E:AD:10:24:28:8A:6C:F1:9D:D4:DC
issuer name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon
subject name : CN=*.iot.eu-west-1.amazonaws.com
issued on : 2019-07-02 00:00:00
expires on : 2020-06-28 12:00:00
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=false
subject alt name : iot.eu-west-1.amazonaws.com, *.iot.eu-west-1.amazonaws.com
key usage : Digital Signature, Key Encipherment
ext key usage : TLS Web Server Authentication, TLS Web Client Authentication

DEBUG: _iot_tls_verify_cert L#46 This certificate has no flags

DEBUG: iot_tls_connect L#227 ok
[ Protocol is TLSv1.2 ]
[ Ciphersuite is TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 ]

DEBUG: iot_tls_connect L#229 [ Record expansion is 29 ]

DEBUG: iot_tls_connect L#234 . Verifying peer X.509 certificate...
DEBUG: iot_tls_connect L#243 ok

DEBUG: iot_tls_connect L#253 . Peer certificate information ...

DEBUG: iot_tls_connect L#255 cert. version : 3
serial number : 0C:62:FF:6C:06:6E:AD:10:24:28:8A:6C:F1:9D:D4:DC
issuer name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon
subject name : CN=*.iot.eu-west-1.amazonaws.com
issued on : 2019-07-02 00:00:00
expires on : 2020-06-28 12:00:00
signed using : RSA with SHA-256
RSA key size : 2048 bits
basic constraints : CA=false
subject alt name : iot.eu-west-1.amazonaws.com, *.iot.eu-west-1.amazonaws.com
key usage : Digital Signature, Key Encipherment
ext key usage : TLS Web Server Authentication, TLS Web Client Authentication


Enable Auto Reconnect...
Sending message 0 ....
Topic: $aws/things/Meshlium
Message: {
"id": "957",
"id_wasp": "MY_MOTE",
"id_secret": "1F5EAAE80593E42D",
"sensor": "CO2",
"value": "7.7096767127212E-31",
"datetime": "2019-07-17 09:27:21"
}

All the best

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Cannot send data from Meshlium to AWS IoT

Post by libelium-dev » Thu Jul 18, 2019 8:06 am

Hi,

Is it working now? We don't see errors in the log.

Regards

ziadmaiden
Posts: 5
Joined: Tue Jul 16, 2019 9:24 am
Company: Eurisko Mobility

Re: Cannot send data from Meshlium to AWS IoT

Post by ziadmaiden » Thu Jul 18, 2019 11:40 am

Hi,

Now it is not. Still getting the following after each attempt of sending messages:
Error sending message: 199
ERROR: iot_tls_write L#275 failed
! mbedtls_ssl_write returned -0x50

All the best

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Cannot send data from Meshlium to AWS IoT

Post by libelium-dev » Fri Jul 19, 2019 9:48 am

Hi,

It seems a problem with the AWS certificates. Please try to generate the certificates again following the steps of the technical guide
http://www.libelium.com/downloads/docum ... f#page=116

Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest