I was hoping i could only change.
DTU.sendMsg("AT+CMQCON=0,3,\"myclient\",600,1,0\r\n");
to
DTU.sendMsg("AT+CMQCON=0,3,\"myclient\",600,1,1,\"topic=WILL,QoS=1,retained=1,message_len=1,message=1\"\r\n");
And get will and testament working. But it only returns ERROR.
According to the docs.
AT+CMQCON=<mqtt_id>,<version>,<client_id>,<keepalive_interval>,<cleansession>,<will_flag>[,<will_options>][,<username>,<password>]
<will_flag> Integer , will flag, can be 0 or 1
<will_options> String, will options, mandatory if will_flag is 1, the format is as follows:
topic=xxx,QoS=xxx,retained=xxx,message_len=xxx,message=xxx
Anyone else tried getting this to work?
I guess my format is wrong somehow. But I cant find an example using this.
I was hoping i could only change.
DTU.sendMsg("AT+CMQCON=0,3,\"myclient\",600,1,0\r\n");
to
DTU.sendMsg("AT+CMQCON=0,3,\"myclient\",600,1,1,\"topic=WILL,QoS=1,retained=1,message_len=1,message=1\"\r\n");
And get will and testament working. But it only returns ERROR.
According to the docs.
AT+CMQCON=<mqtt_id>,<version>,<client_id>,<keepalive_interval>,<cleansession>,<will_flag>[,<will_options>][,<username>,<password>]
Anyone else tried getting this to work? I guess my format is wrong somehow. But I cant find an example using this.