Adapt WSS to new boards and use MQTT domain for eSIM connectivity
Preserve main GNSS and volume behavior while porting verified TLS, receive fixes and full-handshake optimizations. Add MQTT connection diagnostics and route MQTT through banban.api.talkingq.com:1883. Include migration documentation and regression tools. Firmware builds and package checks passed; user confirmed new-board connectivity after switching the MQTT host to the domain.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
=================================================================*/
|
||||
|
||||
#include "MQTTClient.h"
|
||||
#include "mqtt_connect_diag.h"
|
||||
#include "ql_data_call.h"
|
||||
#include "ql_application.h"
|
||||
#include "sockets.h"
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
#define PROFILE_IDX 1
|
||||
//#define DEFAULT_SERVER_DOMAIN "175.24.73.253"
|
||||
#define DEFAULT_SERVER_DOMAIN "101.35.224.118"
|
||||
#define DEFAULT_SERVER_DOMAIN "banban.api.talkingq.com"
|
||||
#define DEFAULT_SERVER_CLIENT_USER "talkingq"
|
||||
#define DEFAULT_SERVER_CLIENT_PASS "talkingq@2026"
|
||||
#define DEFAULT_SERVER_CLIENT_ID "9376265c059e474e92c2e46208ae1dc5"
|
||||
@@ -448,6 +449,8 @@ int app_mqtt_connect()
|
||||
|
||||
MQTTPacket_connectData connectData = MQTTPacket_connectData_initializer;
|
||||
int mqtt_server_port=DEFAULT_SERVER_PORT;
|
||||
unsigned int tcp_started;
|
||||
int tcp_errno;
|
||||
|
||||
MQTT_CONN_LOCK();
|
||||
if(mqtt_connect==1){
|
||||
@@ -462,7 +465,14 @@ int app_mqtt_connect()
|
||||
NetworkInit(&network, NULL, PROFILE_IDX);
|
||||
MQTTClientInit(&client, &network, 30000, sendbuf, sizeof(sendbuf), readbuf, sizeof(readbuf));
|
||||
char* address = DEFAULT_SERVER_DOMAIN;
|
||||
if ((rc = NetworkConnect(&network, address, mqtt_server_port)) != 0)
|
||||
printf("[MQTT-DIAG] TCP begin host=%s port=%d pdp=%d\r\n",
|
||||
address, mqtt_server_port, app_get_data_call_net_status());
|
||||
tcp_started = ql_rtos_get_systicks();
|
||||
rc = NetworkConnect(&network, address, mqtt_server_port);
|
||||
tcp_errno = rc != 0 ? ql_get_soc_errno() : 0;
|
||||
printf("[MQTT-DIAG] TCP end rc=%d socket=%d elapsed_ms=%u errno_snapshot=%d\r\n",
|
||||
rc, network.my_socket, (unsigned int)(ql_rtos_get_systicks() - tcp_started) * 5U, tcp_errno);
|
||||
if (rc != 0)
|
||||
{
|
||||
RLOGE("Return code from network connect is %d", rc);
|
||||
MQTTClientDeinit(&client);
|
||||
@@ -486,7 +496,8 @@ int app_mqtt_connect()
|
||||
connectData.cleansession = 0;
|
||||
connectData.keepAliveInterval = 60;
|
||||
|
||||
if ((rc = MQTTConnect(&client, &connectData)) != 0)
|
||||
printf("[MQTT-DIAG] saved_device_id=%d (registration needed when 0)\r\n", ret == 0);
|
||||
if ((rc = talkingq_mqtt_connect_diagnosed(&client, &connectData)) != 0)
|
||||
{
|
||||
RLOGE("Return code from MQTT connect is %d", rc);
|
||||
NetworkDisconnect(&network);
|
||||
|
||||
Reference in New Issue
Block a user