Hi Ism,
Thank You for your support !
This is the gcp config:
"gcp": {
"ca_cert": "gcp-lts-ca.pem",
"device": "ccm_C26FD9",
"enable": true,
"enable_commands": true,
"enable_config": false,
"key": "gcp-ccm_C26FD9.key.pem",
"project": "atlaspred",
"region": "us-central1",
"registry": "iot-registry",
"server": "mqtt.2030.ltsapis.goog:8883",
"token_ttl": 3600
},
And below are debug messages:
ccm_C26FD9 766 1582646015.325 2|mgos_mqtt_conn.c:219 MQTT0 event: 202
ccm_C26FD9 767 1582646015.329 2|mgos_mqtt_conn.c:271 MQTT0 CONNACK 0
ccm_C26FD9 768 1582646015.336 2|mgos_mqtt_conn.c:208 MQTT0 sub /devices/ccm_C26FD9/commands/# @ 1
ccm_C26FD9 769 1582646015.340 2|mgos_mqtt_conn.c:350 MQTT0 queue drained
ccm_C26FD9 770 1582646015.502 2|mgos_mqtt_conn.c:219 MQTT0 event: 209
ccm_C26FD9 771 1582646019.690 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (180): {"id":615,"method":"MQTT.Pub","params":{"topic":"projects/atlaspred/topics/atlaspred-topic","message":"0A04302E30301201301A01302204302E30302A05302E3030303204302E30303A04302E3030"}}
ccm_C26FD9 772 1582646019.696 2|mg_rpc.c:376 '615' '' '' 'MQTT.Pub'
ccm_C26FD9 773 1582646019.702 2|mgos_rpc.c:373 Called 'MQTT.Pub', acl for it: '*'
ccm_C26FD9 774 1582646019.707 2|mg_rpc.c:293 MQTT.Pub via UART UART0
ccm_C26FD9 775 1582646019.723 2|mgos_mqtt_conn.c:199 MQTT0 pub -> 34 projects/atlaspred/topics/atlaspred-topic @ 0 (74): [0A04302E30301201301A01302204302E30302A05302E3030303204302E30303A04302E3030]
ccm_C26FD9 776 1582646019.733 2|mg_rpc.c:612 0x3fff0fa4 SEND FRAME (43): {"id":615,"src":"ccm_C26FD9","result":null} -> 1
ccm_C26FD9 777 1582646019.739 2|mg_rpc.c:508 0x3fff0fa4 FRAME SENT (1)
ccm_C26FD9 778 1582646019.760 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (135): {"id":616ccm_C26FD9 785 1582646019.971 2|mgos_mqtt_conn.c:253 MQTT0 Disconnect
ccm_C26FD9 786 1582646019.977 2|mgos_mqtt_conn.c:543 MQTT0 connecting after 2156 ms
ccm_C26FD9 787 1582646022.140 2|mgos_mqtt_conn.c:467 MQTT0 connecting to mqtt.2030.ltsapis.goog:8883
ccm_C26FD9 788 1582646022.148 2|mg_net.c:911 0x3fff259c mqtt.2030.ltsapis.goog:8883 -,-,gcp-lts-ca.pem
ccm_C26FD9 789 1582646022.157 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 790 1582646022.167 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 791 1582646022.173 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 792 1582646022.180 2|mg_net.c:911 0x3fff26f4 udp://201.6.2.82:53 -,-,-
ccm_C26FD9 793 1582646022.186 2|mg_net.c:779 0x3fff26f4 udp://201.6.2.82:53
ccm_C26FD9 794 1582646022.193 2|mg_net.c:794 0x3fff26f4 udp://201.6.2.82:53 -> 0
ccm_C26FD9 795 1582646022.214 2|mg_net.c:779 0x3fff259c tcp://64.233.181.206:8883
ccm_C26FD9 796 1582646022.376 2|mg_net.c:794 0x3fff259c tcp://64.233.181.206:8883 -> 0
ccm_C26FD9 797 1582646022.542 2|mg_ssl_if_mbedtls.c:31 0x3fff259c ciphersuite: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ccm_C26FD9 798 1582646022.557 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 799 1582646022.567 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 800 1582646022.574 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 801 1582646022.593 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 802 1582646022.598 2|SW ECDSA verify curve 3 hash_len 32 sig_len 72
ccm_C26FD9 803 1582646023.177 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 804 1582646023.187 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 805 1582646023.194 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 806 1582646023ccm_C26FD9 813 1582646025.114 2|mgos_mqtt_conn.c:227 MQTT0 TCP connect ok (0)
ccm_C26FD9 814 1582646025.432 2|mgos_gcp.c:184 ID : projects/atlaspred/locations/us-central1/registries/iot-registry/devices/ccm_C26FD9
ccm_C26FD9 815 1582646025.452 2|mgos_gcp.c:185 JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJhdWQiOiJhdGxhc3ByZWQiLCJpYXQiOjE1ODI2NDYwMjUsImV4cCI6MTU4MjY0OTYyNX0.qSJ0KMtC7HHd7MBlcptBBcpT_Qo3Hyn3SN6zJYTkEbyetovoscQEI3k31nAP-RqN2UjROmXTE8pNzsezbeTSGQ
ccm_C26FD9 816 1582646025.457 2|mgos_gcp.c:186 JWT Refresh Timeout: 3570000
ccm_C26FD9 817 1582646025.646 2|mgos_mqtt_conn.c:219 MQTT0 event: 202
ccm_C26FD9 818 1582646025.650 2|mgos_mqtt_conn.c:271 MQTT0 CONNACK 0
ccm_C26FD9 819 1582646025.657 2|mgos_mqtt_conn.c:208 MQTT0 sub /devices/ccm_C26FD9/commands/# @ 1
ccm_C26FD9 820 1582646025.661 2|mgos_mqtt_conn.c:350 MQTT0 queue drained
ccm_C26FD9 821 1582646025.821 2|mgos_mqtt_conn.c:219 MQTT0 event: 209
ccm_C26FD9 822 1582646029.693 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (308): {"id":616,"method":"MQTT.Pub","params":{"topic":"projects/atlaspred/topics/atlaspred-topic","message":"0A04302E30301201301A01302{"id":617,"method":"MQTT.Pub","params":{"topic":"projects/atlaspred/topics/accm_C26FD9 823 1582646029.702 2|tlaspred-topic","message":"0A04302E30301201301A01302204302E30302A05302E3030303204302E30303A04302E3030"}}
ccm_C26FD9 824 1582646029.709 2|mg_rpc.c:376 '616' '' '' 'MQTT.Pub'
ccm_C26FD9 825 1582646029.715 2|mgos_rpc.c:373 Called 'MQTT.Pub', acl for it: '*'
ccm_C26FD9 826 1582646029.719 2|mg_rpc.c:293 MQTT.Pub via UART UART0
ccm_C26FD9 827 1582646029.734 2|mg_rpc.c:612 0x3fff0fa4 SEND FRAME (90): {"id":616,"src":"ccm_C26FD9","error":{"code":500,"message":"Expecting topic and message"}} -> 1
ccm_C26FD9 828 1582646029.740 2|mg_rpc.c:508 0x3fff0fa4 FRAME SENT (1)
ccm_C26FD9 829 1582646029.759 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (135): {"iccm_C26FD9 836 1582646029.968 2|mgos_mqtt_conn.c:253 MQTT0 Disconnect
ccm_C26FD9 837 1582646029.973 2|mgos_mqtt_conn.c:543 MQTT0 connecting after 1887 ms
ccm_C26FD9 838 1582646031.868 2|mgos_mqtt_conn.c:467 MQTT0 connecting to mqtt.2030.ltsapis.goog:8883
ccm_C26FD9 839 1582646031.876 2|mg_net.c:911 0x3fff23e4 mqtt.2030.ltsapis.goog:8883 -,-,gcp-lts-ca.pem
ccm_C26FD9 840 1582646031.885 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 841 1582646031.895 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 842 1582646031.901 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 843 1582646031.908 2|mg_net.c:911 0x3fff2fcc udp://201.6.2.82:53 -,-,-
ccm_C26FD9 844 1582646031.913 2|mg_net.c:779 0x3fff2fcc udp://201.6.2.82:53
ccm_C26FD9 845 1582646031.921 2|mg_net.c:794 0x3fff2fcc udp://201.6.2.82:53 -> 0
ccm_C26FD9 846 1582646031.940 2|mg_net.c:779 0x3fff23e4 tcp://64.233.181.206:8883
ccm_C26FD9 847 1582646032.107 2|mg_net.c:794 0x3fff23e4 tcp://64.233.181.206:8883 -> 0
ccm_C26FD9 848 1582646032.272 2|mg_ssl_if_mbedtls.c:31 0x3fff23e4 ciphersuite: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ccm_C26FD9 849 1582646032.287 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 850 1582646032.297 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 851 1582646032.304 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 852 1582646032.323 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 853 1582646032.329 2|SW ECDSA verify curve 3 hash_len 32 sig_len 72
ccm_C26FD9 854 1582646032.908 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 855 1582646032.918 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 856 1582646032.925 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 857 1582646032ccm_C26FD9 864 1582646034.848 2|mgos_mqtt_conn.c:227 MQTT0 TCP connect ok (0)
ccm_C26FD9 865 1582646035.165 2|mgos_gcp.c:184 ID : projects/atlaspred/locations/us-central1/registries/iot-registry/devices/ccm_C26FD9
ccm_C26FD9 866 1582646035.185 2|mgos_gcp.c:185 JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJhdWQiOiJhdGxhc3ByZWQiLCJpYXQiOjE1ODI2NDYwMzQsImV4cCI6MTU4MjY0OTYzNH0.llHibjUzp0hdTu-jt3MReZiXHi5vxJO0MG-A06XlDZeFmhNNwvaJ9pS9HjzYiOd9Wmjwr5lnJOqtBFbwfOWHVw
ccm_C26FD9 867 1582646035.190 2|mgos_gcp.c:186 JWT Refresh Timeout: 3570000
ccm_C26FD9 868 1582646035.384 2|mgos_mqtt_conn.c:219 MQTT0 event: 202
ccm_C26FD9 869 1582646035.388 2|mgos_mqtt_conn.c:271 MQTT0 CONNACK 0
ccm_C26FD9 870 1582646035.395 2|mgos_mqtt_conn.c:208 MQTT0 sub /devices/ccm_C26FD9/commands/# @ 1
ccm_C26FD9 871 1582646035.400 2|mgos_mqtt_conn.c:350 MQTT0 queue drained
ccm_C26FD9 872 1582646035.560 2|mgos_mqtt_conn.c:219 MQTT0 event: 209
ccm_C26FD9 873 1582646039.694 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (308): {"id":618,"method":"MQTT.Pub","params":{"topic":"projects/atlaspred/topics/atlaspred-topic","message":"0A04302E30301201301A01302{"id":619,"method":"MQTT.Pub","params":{"topic":"projects/atlaspred/topics/accm_C26FD9 874 1582646039.703 2|tlaspred-topic","message":"0A04302E30301201301A01302204302E30302A05302E3030303204302E30303A04302E3030"}}
ccm_C26FD9 875 1582646039.710 2|mg_rpc.c:376 '618' '' '' 'MQTT.Pub'
ccm_C26FD9 876 1582646039.715 2|mgos_rpc.c:373 Called 'MQTT.Pub', acl for it: '*'
ccm_C26FD9 877 1582646039.720 2|mg_rpc.c:293 MQTT.Pub via UART UART0
ccm_C26FD9 878 1582646039.735 2|mg_rpc.c:612 0x3fff0fa4 SEND FRAME (90): {"id":618,"src":"ccm_C26FD9","error":{"code":500,"message":"Expecting topic and message"}} -> 1
ccm_C26FD9 879 1582646039.741 2|mg_rpc.c:508 0x3fff0fa4 FRAME SENT (1)
ccm_C26FD9 880 1582646039.760 2|mg_rpc.c:482 0x3fff0fa4 GOT FRAME (135): {"iccm_C26FD9 887 1582646039.969 2|mgos_mqtt_conn.c:253 MQTT0 Disconnect
ccm_C26FD9 888 1582646039.975 2|mgos_mqtt_conn.c:543 MQTT0 connecting after 2019 ms
ccm_C26FD9 889 1582646042.002 2|mgos_mqtt_conn.c:467 MQTT0 connecting to mqtt.2030.ltsapis.goog:8883
ccm_C26FD9 890 1582646042.010 2|mg_net.c:911 0x3fff259c mqtt.2030.ltsapis.goog:8883 -,-,gcp-lts-ca.pem
ccm_C26FD9 891 1582646042.019 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 892 1582646042.029 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 893 1582646042.035 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 894 1582646042.042 2|mg_net.c:911 0x3fff26f4 udp://201.6.2.82:53 -,-,-
ccm_C26FD9 895 1582646042.047 2|mg_net.c:779 0x3fff26f4 udp://201.6.2.82:53
ccm_C26FD9 896 1582646042.054 2|mg_net.c:794 0x3fff26f4 udp://201.6.2.82:53 -> 0
ccm_C26FD9 897 1582646042.075 2|mg_net.c:779 0x3fff259c tcp://64.233.181.206:8883
ccm_C26FD9 898 1582646042.236 2|mg_net.c:794 0x3fff259c tcp://64.233.181.206:8883 -> 0
ccm_C26FD9 899 1582646042.401 2|mg_ssl_if_mbedtls.c:31 0x3fff259c ciphersuite: TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ccm_C26FD9 900 1582646042.416 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 901 1582646042.426 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 902 1582646042.433 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 903 1582646042.451 2|mgos_vfs.c:410 close 257 => 0x3fff0344:1 => 0 (refs 0)
ccm_C26FD9 904 1582646042.457 2|SW ECDSA verify curve 3 hash_len 32 sig_len 72
ccm_C26FD9 905 1582646043.038 2|mgos_vfs.c:283 gcp-lts-ca.pem -> /gcp-lts-ca.pem pl 1 -> 1 0x3fff0344 (refs 1)
ccm_C26FD9 906 1582646043.048 2|mgos_vfs.c:377 open gcp-lts-ca.pem 0x0 0x1b6 => 0x3fff0344 gcp-lts-ca.pem 1 => 257 (refs 1)
ccm_C26FD9 907 1582646043.055 2|mgos_vfs.c:536 fstat 257 => 0x3fff0344:1 => 0 (size 1676)
ccm_C26FD9 908 1582646043ccm_C26FD9 915 1582646044.988 2|mgos_mqtt_conn.c:227 MQTT0 TCP connect ok (0)
ccm_C26FD9 916 1582646045.306 2|mgos_gcp.c:184 ID : projects/atlaspred/locations/us-central1/registries/iot-registry/devices/ccm_C26FD9
ccm_C26FD9 917 1582646045.326 2|mgos_gcp.c:185 JWT: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJhdWQiOiJhdGxhc3ByZWQiLCJpYXQiOjE1ODI2NDYwNDQsImV4cCI6MTU4MjY0OTY0NH0.6gmKDafi3E9KIGs4XUqzuO91i7YMV-Yzpxide-T0ksnSBVINu-EcJS9u0qiPbLfj7vtzp5reVpfC0ycZP8XuDQ
ccm_C26FD9 918 1582646045.331 2|mgos_gcp.c:186 JWT Refresh Timeout: 3570000