Hi,

I am trying to run the Bosch IoT cloud app after flashing it into the XDK, and it always freezes in the bisMqttClient.c clientInit() function, when it calls rc = MQTTConnect(&c, &data).

The MQTT broker configuration in BCDS_bisConfig.h is set up to:

#define CFG_DEFAULT_MQTT_BROKER_NAME    "mqtt.bosch-si.com" 
#define CFG_DEFAULT_MQTT_PORT           1883 

Note that the when I use a different XDK, I can flash the application and it connects normally to the MQTT Broker. I added the MAC addresses of both XDKs in the broker.

Do you guys have any idea of what might be happening? Is it a hardware problem, since the other XDK seems to be working fine?

Best regards,

Edson

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
8/30/16 12:03 PM as a reply to Edson Hiroshi Aoki.

Hello Edson,

it seems to be a hardware/firmware issue of the Wi-Fi module. Would you be so kind an tell me if the XDK can establish a connection to your Wi-Fi router?

Please add a screenshot of the console log.

Kind regards,
Manuel

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
8/31/16 3:44 AM as a reply to Manuel Cerny.

Hi,

The XDK connects normally to Wifi. I used the XDK it with the Sensor Monitor (in Wifi mode) before, and it worked with no problems.

The console log is:

 INFO | Booting application...
 INFO | XDK DEVICE 1:  Jumping to application
 INFO | Disconnecting XDK device 'XDK Device 1' from port 'COM4'...
 INFO | Port 'COM4' has been disconnected
 INFO | Connecting to XDK device 'XDK Device 1' in port 'COM4'...
 INFO | Connection to port 'COM4' established
 INFO | XDK DEVICE 1: Ip address of the device: 192.168.1.111 
 INFO | XDK DEVICE 1: MAC address of the device: F4:B8:5E:3B:11:F2 

Sometimes, after a long time, we also see the message:

INFO | XDK DEVICE 1: Connecting to mqtt.bosch-si.com 1883

and sometimes we don't. It never gets past it.

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
8/31/16 8:23 AM as a reply to Edson Hiroshi Aoki.

Hi Edson,

 

in the past we had sometimes unexpected results when some demos set a register on the wifi to connect using static IP, and the next demo just assumes it's still set to dynamic and does not set it back to DHCP explicitly.

I don't know if this applies here, but just as a hint.

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
8/31/16 9:28 AM as a reply to Kornelius Nägele.

Hello Edson,

the console log looks quite normal. Unfortunately I’m unable to reproduce this bug.
Kornelius mentioned a DHCP problem, which could be the reason. Would you be so kind and tell us if your are using DHCP to receive an IP from the router? If this is the case and the XDK IP 192.168.1.111 isn’t self asigned, the Wi-Fi configuration should be OK.

The fact that it works on the other XDK points to a firmware problem in general.
But I would like to exclude other likely issues.

The message:

INFO | XDK DEVICE 1: Connecting to mqtt.bosch-si.com 1883

is not required to receive data on the server side.
Please make sure, that there isn’t any typo in the MAC address on the IoT dashboard side.

And please tell me the status of the LEDs after flashing.

Kind regards,
Manuel

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
9/7/16 9:35 AM as a reply to Kornelius Nägele.

Kornelius' suggestion was on the spot! Thanks!

I remembered that prior to flashing the Bosch IoT Suite, I flashed the WlanNetworkManagement demo, which sets the IP to Static. I then modified the WlanNetworkManagement to use DHCP, flashed it, then flashed the Bosch IoT Suited again, and boom, the orange light has turned on.

This also shows that flashing a new application does not "reset" the internal state of the XDK, which I assume, can lead to many issues.

0 (0 Votes)
RE: Bosch IoT cloud doesn't connect to MQTT broker
Answer
9/7/16 2:54 PM as a reply to Edson Hiroshi Aoki.
Hello Edson,

I am glad you could resolve your problem with the Bosch IoT Suite. We will add your findings on internal states to our improvements list.

Please don't hesitate to ask if you have further questions.

Kind regards,
Manuel
0 (0 Votes)