Community news, upcoming events and general discussions
Threads: 36 Posts: 88
Get technical support from the community
Threads: 1415 Posts: 7559
Threads: 18 Posts: 64
Tell us how to make XDK better!
Threads: 36 Posts: 119
Share and discuss community member projects
Threads: 78 Posts: 343
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?
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
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.
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.
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
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.