MQTT undefined symbol in prj.conf

Hi there

So I want to make an application to send mqtt messages over wifi. I have tried to follow the devzone guide:  Implementing MQTT over Wi-Fi on the nRF7002 Development Kit to implement the mqtt api into my software (Mostly the guide section Stage 3 Connect to the nrf7002DK over MQTT).

I have encountered the following error log during compilation:

.../MT_Wifi6/wifi_basic_connection/prj.conf:95: warning: attempt to assign the value '"pub_topic"' to the undefined symbol MQTT_PUB_TOPIC
.../MT_Wifi6/wifi_basic_connection/prj.conf:96: warning: attempt to assign the value '"sub_topic"' to the undefined symbol MQTT_SUB_TOPIC
.../MT_Wifi6/wifi_basic_connection/prj.conf:97: warning: attempt to assign the value '"192.168.0.22"' to the undefined symbol MQTT_BROKER_HOSTNAME
.../MT_Wifi6/wifi_basic_connection/prj.conf:98: warning: attempt to assign the value '1883' to the undefined symbol MQTT_BROKER_PORT

So somehow the mqqtt configuration symbols are not detected, is there something missing in the configuration files to compile them?
I dont understand why it doesnt find the topic symbols as these prj.conf symbols work: "CONFIG_MQTT_LIB=y
CONFIG_MQTT_LIB_TLS=n
CONFIG_MQTT_CLEAN_SESSION=y
CONFIG_MQTT_LOG_LEVEL_DBG=y"

I have attached the files to the question for a closer look.

wifi_basic_connection.zip

Thanks for your answer

Parents
  • Sry I have noticed that the Kconfig file missed the following entries, at the least this works now:

    config MQTT_PUB_TOPIC
        string "MQTT publish topic"
        default "devacademy/publish/topic44"

    config MQTT_SUB_TOPIC
        string "MQTT subscribe topic"
        default "devacademy/subscribe/topic44"

    config MQTT_CLIENT_ID
        string "MQTT Client ID"
        help
          Use a custom Client ID string.
        default "nRF7002DK_Test_Ali"

    config MQTT_BROKER_HOSTNAME
        string "MQTT broker hostname"
        default "test.mosquitto.org"

    config MQTT_BROKER_PORT
        int "MQTT broker port"
        default 1883

    config MQTT_MESSAGE_BUFFER_SIZE
        int "MQTT message buffer size"
        default 128

    config MQTT_PAYLOAD_BUFFER_SIZE
        int "MQTT payload buffer size"
        default 128

    config BUTTON1_EVENT_PUBLISH_MSG
        string "The message to publish on a button event"
        default "Button 1 Pressed"

    config BUTTON2_EVENT_PUBLISH_MSG
        string "The message to publish on a button event"
        default "Button 2 Pressed"

    config TURN_LED1_ON_CMD
        string "Command to turn on LED"
        default "LED1ON"

    config TURN_LED1_OFF_CMD
        string "Command to turn off LED"
        default "LED1OFF"

    config TURN_LED2_ON_CMD
        string "Command to turn on LED"
        default "LED2ON"

    config TURN_LED2_OFF_CMD
        string "Command to turn off LED"
        default "LED2OFF"


    config MQTT_RECONNECT_DELAY_S
        int "Seconds to delay before attempting to reconnect to the broker."
        default 60
Reply
  • Sry I have noticed that the Kconfig file missed the following entries, at the least this works now:

    config MQTT_PUB_TOPIC
        string "MQTT publish topic"
        default "devacademy/publish/topic44"

    config MQTT_SUB_TOPIC
        string "MQTT subscribe topic"
        default "devacademy/subscribe/topic44"

    config MQTT_CLIENT_ID
        string "MQTT Client ID"
        help
          Use a custom Client ID string.
        default "nRF7002DK_Test_Ali"

    config MQTT_BROKER_HOSTNAME
        string "MQTT broker hostname"
        default "test.mosquitto.org"

    config MQTT_BROKER_PORT
        int "MQTT broker port"
        default 1883

    config MQTT_MESSAGE_BUFFER_SIZE
        int "MQTT message buffer size"
        default 128

    config MQTT_PAYLOAD_BUFFER_SIZE
        int "MQTT payload buffer size"
        default 128

    config BUTTON1_EVENT_PUBLISH_MSG
        string "The message to publish on a button event"
        default "Button 1 Pressed"

    config BUTTON2_EVENT_PUBLISH_MSG
        string "The message to publish on a button event"
        default "Button 2 Pressed"

    config TURN_LED1_ON_CMD
        string "Command to turn on LED"
        default "LED1ON"

    config TURN_LED1_OFF_CMD
        string "Command to turn off LED"
        default "LED1OFF"

    config TURN_LED2_ON_CMD
        string "Command to turn on LED"
        default "LED2ON"

    config TURN_LED2_OFF_CMD
        string "Command to turn off LED"
        default "LED2OFF"


    config MQTT_RECONNECT_DELAY_S
        int "Seconds to delay before attempting to reconnect to the broker."
        default 60
Children
No Data
Related