MQTT SIMPLE can't connect the default or my mqtt broker hostname

Hello,Team

I come from China and am using your company's NRF9160DK product now. I burned asset_cracker_v2 a long time ago. There is no problem connecting NRF_CLOUD, but when I burned DEMO MQTT Simple, I found that I could hardly connect the broker. I have also configured NBIOT network in the PRJ file, and I have tried to change the server for many times, but it can hardly be realized on the board. It has bothered me for several days, please help me.

Thank

Attach my configuration file and output information

others file no change

Parents
  • Hi Jerry,

    According to our local FAE feedback:

    China Mobile is ok with MQTT+ NBIOT, but China Telicomm has a problem.

    so did you test with a China Telicomm sim card? If yes, any chance to test with China Mobile?

    Best regards,

    Charlie

  • now I use a China Mobile card,no China Telicomm

  • Ok. The log file shows you enable TLS, have you done any test without enabling TLS?

    Here is my test base on LTE-M network without TLS:

    2022-05-05T11:27:10.849Z DEBUG modem << *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
    2022-05-05T11:27:11.856Z DEBUG modem << [00:00:00.515,991] [0m<inf> mqtt_simple: The MQTT simple sample started[0m
    2022-05-05T11:27:11.862Z DEBUG modem << [00:00:00.516,021] [0m<inf> mqtt_simple: Disabling PSM and eDRX[0m
    2022-05-05T11:27:11.868Z DEBUG modem << [00:00:00.516,754] [0m<inf> mqtt_simple: LTE Link Connecting...[0m
    2022-05-05T11:27:13.748Z DEBUG modem << [00:00:02.407,714] [0m<inf> mqtt_simple: LTE Link Connected![0m
    2022-05-05T11:27:13.760Z DEBUG modem << [00:00:02.756,225] [0m<inf> mqtt_simple: IPv4 Address found 137.135.83.217[0m
    2022-05-05T11:27:13.761Z DEBUG modem << [00:00:02.756,256] [0m<dbg> mqtt_simple.client_id_get: client_id = my-client-id[0m
    2022-05-05T11:27:13.767Z DEBUG modem << [00:00:03.094,970] [0m<inf> mqtt_simple: MQTT client connected[0m
    2022-05-05T11:27:13.775Z DEBUG modem << [00:00:03.095,001] [0m<inf> mqtt_simple: Subscribing to: cs/subscribe/topic len 18[0m
    2022-05-05T11:27:13.782Z DEBUG modem << [00:00:03.247,985] [0m<inf> mqtt_simple: SUBACK packet id: 1234[0m
    2022-05-05T11:27:45.948Z DEBUG modem << [00:00:34.608,917] [0m<inf> mqtt_simple: MQTT PUBLISH result=0 len=10[0m
    2022-05-05T11:27:45.954Z DEBUG modem << [00:00:34.609,039] [0m<inf> mqtt_simple: Received: Hello test[0m
    2022-05-05T11:27:45.960Z DEBUG modem << [00:00:34.609,313] [0m<inf> mqtt_simple: Publishing: Hello test[0m
    2022-05-05T11:27:45.967Z DEBUG modem << [00:00:34.609,313] [0m<inf> mqtt_simple: to topic: cs/publish/topic len: 16[0m
    2022-05-05T11:27:45.974Z DEBUG modem << [00:00:34.884,582] [0m<inf> mqtt_simple: PUBACK packet id: 14635[0m
    2022-05-05T11:28:02.954Z DEBUG modem << [00:00:52.458,465] [0m<inf> mqtt_simple: MQTT PUBLISH result=0 len=10[0m
    2022-05-05T11:28:02.960Z DEBUG modem << [00:00:52.458,557] [0m<inf> mqtt_simple: Received: Hello test[0m
    2022-05-05T11:28:02.966Z DEBUG modem << [00:00:52.458,831] [0m<inf> mqtt_simple: Publishing: Hello test[0m
    2022-05-05T11:28:02.973Z DEBUG modem << [00:00:52.458,831] [0m<inf> mqtt_simple: to topic: cs/publish/topic len: 16[0m
     

    Best regards,

    Charlie

Reply
  • Ok. The log file shows you enable TLS, have you done any test without enabling TLS?

    Here is my test base on LTE-M network without TLS:

    2022-05-05T11:27:10.849Z DEBUG modem << *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
    2022-05-05T11:27:11.856Z DEBUG modem << [00:00:00.515,991] [0m<inf> mqtt_simple: The MQTT simple sample started[0m
    2022-05-05T11:27:11.862Z DEBUG modem << [00:00:00.516,021] [0m<inf> mqtt_simple: Disabling PSM and eDRX[0m
    2022-05-05T11:27:11.868Z DEBUG modem << [00:00:00.516,754] [0m<inf> mqtt_simple: LTE Link Connecting...[0m
    2022-05-05T11:27:13.748Z DEBUG modem << [00:00:02.407,714] [0m<inf> mqtt_simple: LTE Link Connected![0m
    2022-05-05T11:27:13.760Z DEBUG modem << [00:00:02.756,225] [0m<inf> mqtt_simple: IPv4 Address found 137.135.83.217[0m
    2022-05-05T11:27:13.761Z DEBUG modem << [00:00:02.756,256] [0m<dbg> mqtt_simple.client_id_get: client_id = my-client-id[0m
    2022-05-05T11:27:13.767Z DEBUG modem << [00:00:03.094,970] [0m<inf> mqtt_simple: MQTT client connected[0m
    2022-05-05T11:27:13.775Z DEBUG modem << [00:00:03.095,001] [0m<inf> mqtt_simple: Subscribing to: cs/subscribe/topic len 18[0m
    2022-05-05T11:27:13.782Z DEBUG modem << [00:00:03.247,985] [0m<inf> mqtt_simple: SUBACK packet id: 1234[0m
    2022-05-05T11:27:45.948Z DEBUG modem << [00:00:34.608,917] [0m<inf> mqtt_simple: MQTT PUBLISH result=0 len=10[0m
    2022-05-05T11:27:45.954Z DEBUG modem << [00:00:34.609,039] [0m<inf> mqtt_simple: Received: Hello test[0m
    2022-05-05T11:27:45.960Z DEBUG modem << [00:00:34.609,313] [0m<inf> mqtt_simple: Publishing: Hello test[0m
    2022-05-05T11:27:45.967Z DEBUG modem << [00:00:34.609,313] [0m<inf> mqtt_simple: to topic: cs/publish/topic len: 16[0m
    2022-05-05T11:27:45.974Z DEBUG modem << [00:00:34.884,582] [0m<inf> mqtt_simple: PUBACK packet id: 14635[0m
    2022-05-05T11:28:02.954Z DEBUG modem << [00:00:52.458,465] [0m<inf> mqtt_simple: MQTT PUBLISH result=0 len=10[0m
    2022-05-05T11:28:02.960Z DEBUG modem << [00:00:52.458,557] [0m<inf> mqtt_simple: Received: Hello test[0m
    2022-05-05T11:28:02.966Z DEBUG modem << [00:00:52.458,831] [0m<inf> mqtt_simple: Publishing: Hello test[0m
    2022-05-05T11:28:02.973Z DEBUG modem << [00:00:52.458,831] [0m<inf> mqtt_simple: to topic: cs/publish/topic len: 16[0m
     

    Best regards,

    Charlie

Children
No Data
Related