Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    MQTT with SNTP error message

    Highlighted
    New Poster

    MQTT with SNTP error message

    Dear to all,

    I enabled MQTT with security in example project  SendDataOverMQTT.

    However, I tried several different public NTP server and when it's connected, it always gave the error as:

     

    INFO | XDK DEVICE 1: Connected to WPA network successfully
    INFO | XDK DEVICE 1: IP address of device 10.0.0.5
    INFO | XDK DEVICE 1: Mask 255.255.255.0
    INFO | XDK DEVICE 1: Gateway 10.0.0.1
    INFO | XDK DEVICE 1: DNS 10.0.0.1
    INFO | XDK DEVICE 1: WLANPersonalWPA2Connect : Connected to WPA network successfully.
    INFO | XDK DEVICE 1: SntpSentCallback : Success
    INFO | XDK DEVICE 1: SntpTimeCallback : received
    INFO | XDK DEVICE 1: HTTPRestClientSecurityCallback - CURRENT_TIME request
    INFO | XDK DEVICE 1: HTTPRestClientSecurityCallback - CRT_CA request
    INFO | XDK DEVICE 1: HTTPRestClientSecurityCallback - CRT_OWN_CERTIFICATE request
    INFO | XDK DEVICE 1: MqttEventHandler : Event - 2
    INFO | XDK DEVICE 1: MqttEventHandler : Event - 4
    INFO | XDK DEVICE 1: Error in XDK110 Application package.
    INFO | XDK DEVICE 1: Package ID: 153 Module ID: 36 Severity code: 2 Error code: 116
    INFO | XDK DEVICE 1: Error in XDK110 Application package.
    INFO | XDK DEVICE 1: Package ID: 153 Module ID: 36 Severity code: 2 Error code: 117
    INFO | XDK DEVICE 1: Error in XDK110 Application package.
    INFO | XDK DEVICE 1: Package ID: 153 Module ID: 36 Severity code: 2 Error code: 122
    INFO | XDK DEVICE 1: Error in XDK110 Application package.
    INFO | XDK DEVICE 1: Package ID: 153 Module ID: 36 Severity code: 2 Error code: 122
    INFO | XDK DEVICE 1: Error in XDK110 Application package.
    INFO | XDK DEVICE 1: Package ID: 153 Module ID: 36 Severity code: 2 Error code: 122

     

    Here is one of my setting of the SNTP: 

    #define SNTP_SERVER_URL "pool.ntp.org"

    #define SNTP_SERVER_PORT UINT16_C(123)

     

    Did I do something wrong?

    Thank you for reaing.

    4 REPLIES 4
    Highlighted
    Senior Member

    Re: MQTT with SNTP error message

    Hello,

    There isn't any issue with the SNTP timestamp, since you have received the timestamp per the print statement SntpTimeCallback : received.

    Issue is with secured of MQTT communication. What mqtt broker (server) are you running ?  You will need to provide certificates to the MQTT broker for successful client-server communication.

    Certificates required are,

    1. Certificate authority ca.crt -> Convert this certificate to binary format and replace with content in ServerCA.h file
    2. server certificate server.crt
    3. server key server.key

     

    Highlighted
    New Poster

    Re: MQTT with SNTP error message

    Hallo  Padmapriya,

     

    Thank you so much!

     

     

    Highlighted
    New Poster

    Re: MQTT with SNTP error message

    Hi @Padmapriya,

    I downloaded the MitaXDKFirmware example from the Vorto site (https://vorto.eclipse.org/#/details/com.bosch.bcds:XDK:2.0.0) and configured everything to send data to the IoTSuite incl. provisioning in Things and so on.

    If I run the app on my XDK, I always get the following error message:
    INFO | XDK DEVICE 1: [WARNING, C:/Users/XYZ/XDK-Workspace/EclipseMitaXDKFirmware/src-gen/base/ConnectivityMQTTBackend.c:185] MQTT_Enable : SNTP server time was not synchronized. Retrying...

    The certificate is downloaded here: https://docs.bosch-iot-suite.com/hub/cert/iothub.crt
    And the certificatePath is correctly configured: "/SDK/xdk110/Common/certs/IoTHub/iothub.crt";

     

    Can you please tell me, how I have to fix this problem? 

    Highlighted
    New Poster

    Re: MQTT with SNTP error message

    I managed to fix my problem, thanks anyways

    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