File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 2424#else
2525#define MQTT_BROKER " liveobjects.orange-business.com"
2626#endif
27+ #define SDK_PREFIX " Arduino:"
2728#define MQTT_USER " json+device"
2829#define MQTT_PUBDATA " dev/data"
2930#define MQTT_PUBDATA_BINARY " dev/v1/data/binary"
@@ -265,7 +266,7 @@ class LiveObjectsBase
265266private:
266267 unsigned long lastKeepAliveNetwork;
267268protected:
268- String m_sMqttid;
269+ String m_sMqttid = SDK_PREFIX ;
269270 String m_sPayload;
270271 String m_sTopic;
271272 String m_sDecoder;
Original file line number Diff line number Diff line change @@ -102,17 +102,14 @@ void LiveObjectsCellular::connectNetwork()
102102 #endif
103103 if (modem.begin ())
104104 {
105- if (m_sMqttid.length ()==0 )
105+ String imei=" " ;
106+ for (int i=1 ;i<=3 ;i++)
106107 {
107- String imei=" " ;
108- for (int i=1 ;i<=3 ;i++)
109- {
110- imei=modem.getIMEI ();
111- if (imei.length ()!=0 ) break ;
112- delay (100 *i);
113- }
114- m_sMqttid = imei;
108+ imei=modem.getIMEI ();
109+ if (imei.length ()!=0 ) break ;
110+ delay (100 *i);
115111 }
112+ m_sMqttid += imei;
116113 }
117114 else
118115 {
You can’t perform that action at this time.
0 commit comments