============================================ MQTT client Example Ver: 2.0.3 ============================================ CHIP: 0x31100019 MAC: 3.7.0.1 PHY: 3.1.0.26 NWP: 4.13.0.2 ROM: 8738 HOST: 3.0.1.71 MAC address: XXXXXXXXXXXXXX ============================================ [WIFI::INFO] [SlWifiConnEventHandler] POWERED_UP [WIFI::INFO] MAC address: XXXXXXXXXXXXXX [WIFI::INFO] [Event] STA connected to AP - BSSID:XXXXXXXXXXXXXX, SSID:XXXXXXXXXXXXXX [WIFI::INFO] [NETAPP EVENT] IP Acquired: IP=XXXXXXXXXXXXXX , Gateway=XXXXXXXXXXXXXX [SlNetConnEventHandler] I/F 1 - CONNECTED (IP LEVEL)! [SlNetConnEventHandler] I/F 1 - CONNECTED (INTERNET LEVEL)! [SL-MBEDTLS::INFO] . Connect on tcp/*/4433 ... startSNTP: Current time: Fri May 19 00:56:13 2023 [MQTT_APP::INFO] Subscribed to all topics successfully [MQTT_APP::INFO] Wi-Fi connection is UP [SL-MBEDTLS::INFO] InitTlsSocket:: sd=1, pTlsSock=2000c1c8 slSock=1 [SL-MBEDTLS::INFO] . Connect on tcp/*/4433 ... [SL-MBEDTLS::INFO] ConfigClientSocket: . Setting up the TLS data... [SL-MBEDTLS::INFO] Performing the mbedTLS SSL/TLS handshake... [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:3790: 0x2000c1c8: => handshake [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2177: 0x2000c1c8: => flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2188: 0x2000c1c8: <= flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:3709: 0x2000c1c8: client state: MBEDTLS_SSL_HELLO_REQUEST [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2177: 0x2000c1c8: => flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2188: 0x2000c1c8: <= flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:3709: 0x2000c1c8: client state: MBEDTLS_SSL_CLIENT_HELLO [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0927: 0x2000c1c8: => write client hello [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0485: 0x2000c1c8: dumping 'client hello, random bytes' (32 bytes) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0485: 0x2000c1c8: 0000: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0485: 0x2000c1c8: 0010: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0510: 0x2000c1c8: dumping 'session id' (32 bytes) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0510: 0x2000c1c8: 0000: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0510: 0x2000c1c8: 0010: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0367: 0x2000c1c8: client hello, add ciphersuite: 1301, TLS1-3-AES-128-GCM-SHA256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0367: 0x2000c1c8: client hello, add ciphersuite: 1302, TLS1-3-AES-256-GCM-SHA384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0367: 0x2000c1c8: client hello, add ciphersuite: 1303, TLS1-3-CHACHA20-POLY1305-SHA256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0367: 0x2000c1c8: client hello, add ciphersuite: 1304, TLS1-3-AES-128-CCM-SHA256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0367: 0x2000c1c8: client hello, add ciphersuite: 1305, TLS1-3-AES-128-CCM-8-SHA256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0386: 0x2000c1c8: adding EMPTY_RENEGOTIATION_INFO_SCSV [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0395: 0x2000c1c8: client hello, got 6 cipher suites [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0057: 0x2000c1c8: client hello, adding server name extension: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0058: 0x2000c1c8: client hello, adding supported versions extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0081: 0x2000c1c8: supported version: [3:4] [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0584: 0x2000c1c8: no cookie to send; skip extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0290: 0x2000c1c8: client hello: adding key share extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_generic.c:1523: 0x2000c1c8: Perform PSA-based ECDH computation. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0364: 0x2000c1c8: dumping 'client hello, key_share extension' (42 bytes) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0364: 0x2000c1c8: 0000: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0364: 0x2000c1c8: 0010: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0364: 0x2000c1c8: 0020: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0646: 0x2000c1c8: client hello, adding psk_key_exchange_modes extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0244: 0x2000c1c8: client hello, adding supported_groups extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(001d) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0276: 0x2000c1c8: NamedGroup: x25519 ( 1d ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(0017) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0276: 0x2000c1c8: NamedGroup: secp256r1 ( 17 ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(0018) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0276: 0x2000c1c8: NamedGroup: secp384r1 ( 18 ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(001e) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0276: 0x2000c1c8: NamedGroup: x448 ( 1e ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(0019) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0276: 0x2000c1c8: NamedGroup: secp521r1 ( 19 ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(001a) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(001b) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0261: 0x2000c1c8: got supported group(001c) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0299: 0x2000c1c8: dumping 'Supported groups extension' (12 bytes) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0299: 0x2000c1c8: 0000: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9187: 0x2000c1c8: adding signature_algorithms extension [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [403] ecdsa_secp256r1_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [403] ecdsa_secp256r1_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [503] ecdsa_secp384r1_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [503] ecdsa_secp384r1_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [603] ecdsa_secp521r1_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [603] ecdsa_secp521r1_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [806] rsa_pss_rsae_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [806] rsa_pss_rsae_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [805] rsa_pss_rsae_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [805] rsa_pss_rsae_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [804] rsa_pss_rsae_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [804] rsa_pss_rsae_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [601] rsa_pkcs1_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [601] rsa_pkcs1_sha512 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [501] rsa_pkcs1_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [501] rsa_pkcs1_sha384 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9207: 0x2000c1c8: got signature scheme [401] rsa_pkcs1_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:9215: 0x2000c1c8: sent signature scheme [401] rsa_pkcs1_sha256 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:0925: 0x2000c1c8: skip pre_shared_key extensions [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0671: 0x2000c1c8: client hello, total extension length: 156 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: dumping 'client hello extensions' (156 bytes) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0000: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0010: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0020: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0030: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0040: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0050: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0060: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0070: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0080: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0673: 0x2000c1c8: 0090: XXXXXXXXXXXXXX [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: unrecognized(255) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: server_name(0) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: max_fragment_length(1) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: status_request(5) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: supported_groups(10) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: signature_algorithms(13) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: use_srtp(14) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: heartbeat(15) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: application_layer_protocol_negotiation(16) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: signed_certificate_timestamp(18) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: client_certificate_type(19) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: server_certificate_type(20) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: padding(21) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: pre_shared_key(41) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: early_data(42) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: supported_versions(43) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: cookie(44) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: psk_key_exchange_modes(45) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: certificate_authorities(47) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: oid_filters(48) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: post_handshake_auth(49) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: signature_algorithms_cert(50) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: key_share(51) extension exists. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: truncated_hmac(4) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: supported_point_formats(11) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: encrypt_then_mac(22) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: extended_master_secret(23) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0678: 0x2000c1c8: ClientHello: session_ticket(35) extension does not exist. [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2626: 0x2000c1c8: => write handshake message [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2793: 0x2000c1c8: => write record [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2881: 0x2000c1c8: output record: msgtype = 22, version = [3:3], msglen = 245 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2937: 0x2000c1c8: <= write record [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2754: 0x2000c1c8: <= write handshake message [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_client.c:0996: 0x2000c1c8: <= write client hello [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2177: 0x2000c1c8: => flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2194: 0x2000c1c8: message length: 250, out_left: 250 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2201: 0x2000c1c8: ssl->f_send() returned 250 (-0xffffff06) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2229: 0x2000c1c8: <= flush output [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:3709: 0x2000c1c8: client state: MBEDTLS_SSL_SERVER_HELLO [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:1938: 0x2000c1c8: => ssl_tls13_process_server_hello [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:4002: 0x2000c1c8: => read record [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:1962: 0x2000c1c8: => fetch input [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2116: 0x2000c1c8: in_left: 0, nb_want: 5 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2141: 0x2000c1c8: in_left: 0, nb_want: 5 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2144: 0x2000c1c8: ssl->f_recv(_timeout)() returned 5 (-0xfffffffb) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2164: 0x2000c1c8: <= fetch input [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:3733: 0x2000c1c8: input record: msgtype = 21, version = [0x303], msglen = 2 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:1962: 0x2000c1c8: => fetch input [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2116: 0x2000c1c8: in_left: 5, nb_want: 7 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2141: 0x2000c1c8: in_left: 5, nb_want: 7 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2144: 0x2000c1c8: ssl->f_recv(_timeout)() returned 2 (-0xfffffffe) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:2164: 0x2000c1c8: <= fetch input [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:4951: 0x2000c1c8: got an alert message, type: [1:0] [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:4967: 0x2000c1c8: is a close notify message [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:4060: 0x2000c1c8: mbedtls_ssl_handle_message_type() returned -30848 (-0x7880) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_generic.c:0057: 0x2000c1c8: mbedtls_ssl_read_record() returned -30848 (-0x7880) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls13_client.c:1986: 0x2000c1c8: <= ssl_tls13_process_server_hello ( ServerHello ) [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:3801: 0x2000c1c8: <= handshake [SL-MBEDTLS::ERROR] Failed ! mbedtls_ssl_handshake returned -0x7880 [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:5953: 0x2000c1c8: => write close notify [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_msg.c:5966: 0x2000c1c8: <= write close notify [SL-MBEDTLS::INFO] SlNetIfWifi_close:: Connection Socket 1 was removed [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:4717: 0x2000c1c8: => free [SL-MBEDTLS::INFO] [?] ../../../../library/ssl_tls.c:4785: 0x2000c1c8: <= free [SL-MBEDTLS::INFO] SlNetIfWifi_close:: Listener Socket 1 was removed [MQTT_IF::ERROR] connect failed: -3001 [MQTT_APP::INFO] MQTT_EVENT_SERVER_DISCONNECT [MQTT_APP::INFO] MQTT_EVENT_DESTROY