Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    XDK MQTT Connection Problems

    Mishra
    Member

    Re: XDK MQTT Connection Problems

    Hello, 

    Sorry, I do not have any solution but I have questions for my use case and would be grateful if you can help me. 

    1) I only have a USB connection between XDK and my laptop. Is it possible to send MQTT data over USB to an MQTT-broker running on my laptop? If yes how? Should I change the address of the MQTT broker server to "localhost:port number" ? 

    2) Also Since we know we can only code in C with XDK , can I make XDK as MQTT client and publish messages to RabbitMQ -broker (in java) running on my laptop?

    I am a student and beginning my first IOT project. Sorry if I asked something really stupid and obvious. 
    Hoping for help,

    Cheers !

    Narmak
    Member

    Re: XDK MQTT Connection Problems

    Hey,

     

    1) I'm not an expert with the XDK's (otherwise I wouldn't be asking question here), but in my opinion it will be way easier for you to write a simple client running on your laptop. The client will receive the XDK data over usb and publish it to your mqtt broker. Depending on the language you use it shouldn't take more than a couple of minutes to do this.

     

    2) Yes, the programming language of your device (in this case XDK) and your broker are not correlated

     

    Narmak
    Member

    Re: XDK MQTT Connection Problems

    Hey,

     

    thanks for your replay.

     

    Reg. Wifi Failure:

    It's always hard reboot. I am more than willing to provide my entire code, but as mentioned in my first post, I couldn't paste the entire code (due to length) nor attach a text file. Just let me know how I can send you my code.

    Reg. Data over Mqtt:

    I simply copied the StringDescr_wrap() part from the Bosch Developer Portal, so I didn't really convern myself whether it is the right way to do it or not. But I'll give it a try and see if I can achive a better performance.

     

    Best regards

    Kamran

     

     

    Narmak
    Member

    Re: XDK MQTT Connection Problems

    So I tried your suggestion, but whenever this line is reached

    MQTT_PublishToTopic(&MqttPublishInfo, MQTT_PUBLISH_TIMEOUT_IN_MS);

     

    I get the following error:

    XDK DEVICE 1: asserted at Filename 3rd-party/FreeRTOS/queue.c , line no 1392 after that I have to hard reboot the device, before I can flash anything else on it.

     

    I tried the examples SendDataOverMQTT and AwsSendDataOverMQTT, but either fail during the build process, see attached images. I even uninstalled XDK Workbench and deleted everything xdk related from my computer and reinstalled it, but still doesn't work...

     

    Any idea what could be wrong?

    Narmak
    Member

    Re: XDK MQTT Connection Problems

    Is there any chance I'll get a reply here or is this dead?

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist