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 24
24
#else
25
25
#define MQTT_BROKER " liveobjects.orange-business.com"
26
26
#endif
27
+ #define SDK_PREFIX " Arduino:"
27
28
#define MQTT_USER " json+device"
28
29
#define MQTT_PUBDATA " dev/data"
29
30
#define MQTT_PUBDATA_BINARY " dev/v1/data/binary"
@@ -265,7 +266,7 @@ class LiveObjectsBase
265
266
private:
266
267
unsigned long lastKeepAliveNetwork;
267
268
protected:
268
- String m_sMqttid;
269
+ String m_sMqttid = SDK_PREFIX ;
269
270
String m_sPayload;
270
271
String m_sTopic;
271
272
String m_sDecoder;
Original file line number Diff line number Diff line change @@ -102,17 +102,14 @@ void LiveObjectsCellular::connectNetwork()
102
102
#endif
103
103
if (modem.begin ())
104
104
{
105
- if (m_sMqttid.length ()==0 )
105
+ String imei=" " ;
106
+ for (int i=1 ;i<=3 ;i++)
106
107
{
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);
115
111
}
112
+ m_sMqttid += imei;
116
113
}
117
114
else
118
115
{
You can’t perform that action at this time.
0 commit comments