Developer Portal Community

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

    MQTT AWS message size limit 210 bytes ??

    Paul_R
    Member

    MQTT AWS message size limit 210 bytes ??

    I am reposting with some sample output.


    Having trouble SDK’s MQTT library. It fails to publish to AWS when the message reaches over 210 bytes.
    Tried increasing stack sizes, moving buffers to heap/data seg, etc. Nothing helps.
    I do not believe it is a problem with the AWS service, but rather the SDK. Anyone experience similar problems?


    Thanks, Paul
    * Note 130 is the generic RETCODE_MQTT_PUBLISH_FAILED macro

    INFO | XDK DEVICE 8: publishBuffer length: 208
    INFO | XDK DEVICE 8: Published data: {"en":{"r":"22","p":"100297","t":"25.961"},"lt":2880,"tm":1576599896,"ns":{"a":"53.38","m":"46.89","x":"58.77","v":"8.05"},"mg":{"x":"-74","y":"-32","z":"-48","r":"6103"},"mc":"A8:1B:6A:99:81:47","bv":"4031"}

    INFO | XDK DEVICE 8: publishBuffer length: 209
    INFO | XDK DEVICE 8: Published data: {"en":{"r":"22","p":"100298","t":"25.951"},"lt":2880,"tm":1576599956,"ns":{"a":"53.30","m":"44.30","x":"60.33","v":"13.73"},"mg":{"x":"-73","y":"-31","z":"-48","r":"6106"},"mc":"A8:1B:6A:99:81:47","bv":"4034"}

    INFO | XDK DEVICE 8: publishBuffer length: 210
    INFO | XDK DEVICE 8: Published data: {"en":{"r":"22","p":"100290","t":"25.961"},"lt":92160,"tm":1576600016,"ns":{"a":"55.36","m":"47.76","x":"75.65","v":"25.77"},"mg":{"x":"-74","y":"-33","z":"-49","r":"6105"},"mc":"A8:1B:6A:99:81:47","bv":"4034"}

    INFO | XDK DEVICE 8: publishBuffer length: 211
    INFO | XDK DEVICE 8: AppControllerFireTask : AWS MQTT publish failed
    INFO | XDK DEVICE 8: {"en":{"r":"23","p":"100290","t":"25.961"},"lt":123840,"tm":1576600076,"ns":{"a":"55.83","m":"38.14","x":"79.73","v":"45.56"},"mg":{"x":"-75","y":"-32","z":"-48","r":"6105"},"mc":"A8:1B:6A:99:81:47","bv":"4035"}
    INFO | XDK DEVICE 8: Debug 3Error in XDK110 Application package.
    INFO | XDK DEVICE 8: Package ID: 153
    INFO | XDK DEVICE 8: Module ID: 39
    INFO | XDK DEVICE 8: Severity code: 2
    INFO | XDK DEVICE 8: Error code: 130

    INFO | XDK DEVICE 8: publishBuffer length: 211
    INFO | XDK DEVICE 8: AppControllerFireTask : AWS MQTT publish failed
    INFO | XDK DEVICE 8: {"en":{"r":"23","p":"100286","t":"25.951"},"lt":155520,"tm":1576600136,"ns":{"a":"55.40","m":"47.38","x":"70.21","v":"22.00"},"mg":{"x":"-75","y":"-32","z":"-48","r":"6106"},"mc":"A8:1B:6A:99:81:47","bv":"4036"}
    INFO | XDK DEVICE 8: Debug 3Error in XDK110 Application package.
    INFO | XDK DEVICE 8: Package ID: 153
    INFO | XDK DEVICE 8: Module ID: 39
    INFO | XDK DEVICE 8: Severity code: 2
    INFO | XDK DEVICE 8: Error code: 130

    INFO | XDK DEVICE 8: publishBuffer length: 205
    INFO | XDK DEVICE 8: Published data: {"en":{"r":"23","p":"100290","t":"25.961"},"lt":0,"tm":1576600196,"ns":{"a":"56.57","m":"43.84","x":"82.34","v":"43.78"},"mg":{"x":"-39","y":"23","z":"-14","r":"6106"},"mc":"A8:1B:6A:99:81:47","bv":"4038"}

    INFO | XDK DEVICE 8: publishBuffer length: 205
    INFO | XDK DEVICE 8: Published data: {"en":{"r":"23","p":"100282","t":"25.941"},"lt":0,"tm":1576600256,"ns":{"a":"57.53","m":"43.78","x":"92.17","v":"69.11"},"mg":{"x":"-40","y":"24","z":"-13","r":"6104"},"mc":"A8:1B:6A:99:81:47","bv":"4039"}

     

    Tags (1)
    1 REPLY 1
    Paul_R
    Member

    Re: SOLVED: MQTT AWS message size limit 210 bytes ??


    Found (and fixed) the problem deep in the platform code.
    AWS buffers are limited to 256 bytes (payload and overhead), hence limiting payload to about 210 bytes.

    #define bufferpoolconfigBUFFER_SIZE 256

    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