Hey,
I have succesfully connected my device (with HL7802) to an MQTT broker via TCP and IPV4.
I am now looking to do the same but with IPV6 (supported by the broker). I am a little confused with the configuration command and would like a little bit of guidance.
Here is the command in question:
My configuration is: at+ktcpcfg=1,0,“the actual IPV6 address”,1883,0,0,0,1
session ID = 1
mode = 0 (client)
tcp remote address = the IPV6 address
tcp_port = 1883
status = 0 (disconnected, i later plan on using at+ktcpcnx (?))
serverID = left blank (?) since it’s not in child mode
source_port = ?
data_mode = 0
URC-ENDTCP-enable = 0
af = 1 (IPV6)
The command returns:
+KTCPCFG: 1
OK
But when i use AT+KTCPCNX=1 i get +CME ERROR: 923 (Error due to invalid state of terminate port data mode)
My configuration for the IPV4 connection was simpler: at+ktcpcfg=1,0,“the IPV4 address”,1883 so i didn’t have any issues. at+ktcpcfg? returned: +KTCPCFG: 1,0,1,0,“5.172.194.30”,1883,2249,0,0,0,0,0
We may have some things which need to be checked before we go deeper in this issue
Do you set the +KCNXCFG command before setting these commands? If not, please set it first then show me the response of AT+KCNXCFG?, please!
What operator do you use? Please make sure that your SIM operator supports IPV6.
Can you please show me the response of +CGDCONT?
What FW is your device running?
Beside that, according to your information. Assumming that you dont care about two last parameters: <profile_idx> and <restore_on_boot>, I think your +KTCPCFG command should be:
AT+KTCPCFG=1,0,“your server IPV6 address”,1883, , ,0,1 (Please remove the blank space if you copy this command)
I copied your command and it connected fine…
So just to clarify so that i learn to read datasheets (…),
from your command: AT+KTCPCFG=1,0,“your server IPV6 address”,1883,X ,Y ,0,1
X is status and Y is source_port?
X is your device’s port for this connection. We should not define any number here. It will be generated automatically when device makes the connection.
Y is the data mode. It should be 0 if you enter because we just have only one option following the document or you can leave it blank
the structure of the set command is below, following the document:
AT+KTCPCFG=[< cnx cnf >],< mode >,[< tcp remoteaddress >],< tcp_port >[,[< source_port >][,[< data_mode >][,[< URCENDTCPenable >][,[< af >][,[< profile_idx >][,[< restore_on_boot >]]]]]]]]
If your issue is solved, please help to tick “Solution” It may help for the other having same concern.