This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF9160 mqtt_publish stucked

Hello all, I have a little problem.

I`m trying to do an gateway communication using my NRF9160. The routine I`m trying to accomplish  is next :
  -- Send message over serial to nrf

  -- Recieved message send to mqtt broker ( and here is the problem ) 

After I call mqtt_publish nrf get`s stucked. As I managed to discover the problem is in : mqtt_transport_write().

To mention :

  • If I send an message from mqtt broker to nrf it responds and mqtt_publish works perfectly
  • I searched on forum and found this link that seems to be my problem as well : https://devzone.nordicsemi.com/f/nordic-q-a/49511/call-to-mqtt_publish-blocking
    • I tried nrf  v1.0.0 with nrfxlib  v1.0.0 and v1.0.0.rc4 with nrfxlib  v1.0.0.rc4 and it did not help  
  • My mqtt_send_message looks like this (don`t forget that it works if first I recieve an message from broker and nrf has to respond, it is not working if I call function by myself):
    •  

Thank you very much for your help.