MCUXpresso SDK Documentation

lwip_mqtt_enet_qos_freertos

lwip_mqtt_enet_qos_freertos#

Overview#

The lwip_mqtt demo application demonstrates MQTT client connecting to MQTT broker via unsecured socket. The application obtains IP and DNS addresses from DHCP and resolves broker’s hostname if needed. Then it connects to the broker and subscribes to the “lwip_topic/#” and “lwip_other/#” topics. Further it publishes five messages to the “lwip_topic/100” which are also received back as the board is subscribed to the “lwip_topic/#”. It then disconnects from the broker.

Supported Boards#

MIMXRT1170-EVKB
Hardware requirements
  • Mini/micro USB cable

  • Network cable RJ45 standard

  • MIMXRT1170-EVKB board

  • Personal Computer

Board settings

No special settings are required.

FRDM-IMXRT1152
Hardware requirements
  • FRDM-IMXRT1152 board

  • USB Type-C cable

  • RJ45 network cable

  • Personal Computer

Board settings
  • Connect the USB Type-C cable to the FRDM-IMXRT1152 USB debug connector.

  • Use the 10/100 Ethernet RJ45 port (J55).

  • Set JP2 to position 1-2.

FRDM-MCXE31B
Hardware requirements
  • USB-C cable

  • Network cable RJ45 standard

  • FRDM-MCXE31B board

  • Personal Computer

Board settings

No special settings are required.

MIMXRT2660-EVK
Hardware requirements
  • USB Type-C cable for debug console

  • Network cable RJ45 standard

  • MIMXRT2660-EVK board

  • Personal Computer

Board settings

This example uses the on-board COMM_ENET_QOS port (gigabit YT8531 PHY, RGMII), which terminates at RJ45 port J57. Set jumper J52 pins 2-3 to route the on-board analog mux to the external RGMII PHY before running the example.

10BASE-T1S PHY support

This example supports the internal 10BASE-T1S PHY (TENBASET_PHY) as an alternative to the external RGMII PHY. To enable, define in board.h:

#define BOARD_NETWORK_USE_TENBASET_PHY (1U)

Hardware setup for 10BASE-T1S mode:

  • Set jumper J52 to position 1-2 to route the board analog mux to the T1S PHY.

  • Attach the T1S link to RJ45 port J40 (the T1S connector dedicated to COMM_ENET_QOS on this EVK).

Hardware setup for RGMII mode:

  • Set jumper J52 to position 2-3 to route the board analog mux to the external RGMII PHY.

  • Use RJ45 port J57 for the RGMII link.

FRDM-MCXE32B
Hardware requirements
  • USB-C cable

  • Network cable RJ45 standard

  • FRDM-MCXE32B board

  • Personal Computer

Board settings

No special settings are required.