MQTT sample for nRF9161_ns compilation error

Hello, I.m using SDK 2.6.1 with VSCode.

I created a new application based on the sample /nrf/samples/net/mqtt configured for nRF9161_ns which is listed as a compatible board.

When I build the application I get 2 compilation errors:

C:/ncs/MyApp/mqtt_clean/src/modules/network/network.c:16:30: error: 'CONFIG_MQTT_SAMPLE_NETWORK_LOG_LEVEL' undeclared here (not in a function); did you mean 'CONFIG_MQTT_SAMPLE_ERROR_LOG_LEVEL'?

C:/ncs/MyApp/mqtt_clean/src/modules/network/network.c:110:17: error: 'CONFIG_MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE' undeclared here (not in a function); did you mean 'CONFIG_MQTT_SAMPLE_SAMPLER_THREAD_STACK_SIZE'?

Substituting,  as the compiler is suggesting, CONFIG_MQTT_SAMPLE_NETWORK_LOG_LEVEL with CONFIG_MQTT_SAMPLE_ERROR_LOG_LEVEL and CONFIG_MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE with CONFIG_MQTT_SAMPLE_SAMPLER_THREAD_STACK_SIZE fixes the compilation errors.

Not sure the above correction is correct, since when I start the application I do not see any meaningful trace on the serial port with exception of  "*** Booting nRF Connect SDK v3.5.99-ncs1-1 ***" which isn't the output one would expect considering what reported in https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/net/mqtt/README.html.

Im running the MQTT sample on a nRF9161_DK board with a properly working ONOMONDO  LTE CatM SIM.

Could you confirm that SDK 2.6.1 nrf MQTT sample is generating the above listed error ?

Is the fix succested by the compiler correct (CONFIG_MQTT_SAMPLE_NETWORK_LOG_LEVEL ->CONFIG_MQTT_SAMPLE_ERROR_LOG_LEVEL and CONFIG_MQTT_SAMPLE_NETWORK_THREAD_STACK_SIZE->CONFIG_MQTT_SAMPLE_SAMPLER_THREAD_STACK_SIZE )?

regards, Joel

Related