Incorrect Bytes returned for CONNACK packer variable header

Chandrasekar, Madhura 51 Reputation points

We have ported Azure IoT Middleware for FreeRTOS on our device based on Microchip MCU SAM9x60. We have created Azure IoT hub and trying to establish connectivity from device to IoT Hub. We are using TI Wifi module CC3235SF for network connectivity. On this module we have Baltimore CyberTrust Root Certificate for authentication.

When device sends MQTT Connect packet to IoT Hub, we do receive connection acknowledgement in sequence as below:

  1. 2 Byte CONNACK packet header
    First byte: 0x20 - MQTT Control packet type
    Second byte: 0x02 - Remaining Length
  2. 2 Byte CONNACK packet variable header
          First byte: 0x18 - Connect Ack flags - This is incorrect as expected value is 0x00 or 0x01
          Second byte: 0xF0 - Connect return code - This is incorrect as expected value from 0x00 to 0x05

Any reason why IoT Hub server is returning incorrect bytes for CONNACK packet variable header?

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
330 questions
{count} vote

Accepted answer
  1. Dane Walton 251 Reputation points Microsoft Employee

    Hi @Chandrasekar, Madhura
    Are you able to share more details on this scenario? Do you have any logs from the device?

    We haven't seen this issue before, and I have my doubts that the IoT Hub would be incorrectly sending MQTT packets (but nothing is impossible).

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful