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

nRF9160 to Google Cloud Pub/Sub: Build errors

Hi,

I followed this guide to send data to the GCP using the Thingy:91 : https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-connect-nrf91-to-google-cloud

Im pretty sure I did it correct and followed all steps listed there.

But I can't get it to build. I tried it with the v0.4.0 tag and also master, cause this was recommended here in the forum.

This is my build error log:


Rebuilding ‘spm/zephyr/include/generated/driver-validation.h’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/include/generated/driver-validation.h’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_driver_validation_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/include/generated/kobj-types-enum.h’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/include/generated/kobj-types-enum.h’
Rebuilding ‘spm/zephyr/include/generated/otype-to-str.h’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_kobj_types_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/misc/generated/syscalls.json’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/misc/generated/syscalls.json’
Rebuilding ‘spm/zephyr/include/generated/syscall_list.h’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/include/generated/syscall_list.h’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/include/generated/syscall_dispatch.c’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_syscall_list_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/include/generated/syscall_macros.h’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/include/generated/syscall_macros.h’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_syscall_macros_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_syscall_macros_h_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_offsets’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_offsets’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘offsets.c’
Rebuilding ‘spm/zephyr/include/generated/offsets.h’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/include/generated/offsets.h’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_offsets_h’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_offsets_h’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_app’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_arch__arm__core’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_arch__arm__core__cortex_m’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_arch__arm__core__cortex_m__mpu’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_drivers__serial’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_kernel’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_lib__libc__minimal’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_mbedcrypto_vanilla’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_mbeddrbg’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_zephyr’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/linker.cmd’ from solution ‘build’ in configuration ‘Common’
  Combining ‘spm/zephyr/linker.cmd’
Rebuilding ‘spm/zephyr/CMakeFiles/spm_linker_script_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/zephyr/spm_linker_script_target’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘cmake_object_order_depends_target_spm_zephyr_prebuilt’ from solution ‘build’ in configuration ‘Common’
Rebuilding ‘spm/spm_app/libspm_app.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘main.c’
  Archiving ‘libspm_app.a’
Rebuilding ‘spm/zephyr/libspm_zephyr.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘isr_tables.c’
  Compiling ‘sw_isr_common.c’
  Compiling ‘arm_core_cmse.c’
  Compiling ‘arm_core_tz.c’
  Compiling ‘crc16_sw.c’
  Compiling ‘crc32_sw.c’
  Compiling ‘crc8_sw.c’
  Compiling ‘crc7_sw.c’
  Compiling ‘fdtable.c’
  Compiling ‘hex.c’
  Compiling ‘mempool.c’
  Compiling ‘rb.c’
  Compiling ‘sem.c’
  Compiling ‘thread_entry.c’
  Compiling ‘timeutil.c’
  Compiling ‘work_q.c’
  Compiling ‘printk.c’
  Compiling ‘configs.c’
  Compiling ‘soc.c’
  Compiling ‘mpu_regions.c’
  Compiling ‘system_nrf9160.c’
  Compiling ‘nrfx_glue.c’
  Compiling ‘power.c’
  Compiling ‘reboot.c’
  Compiling ‘policy_residency.c’
  Compiling ‘uart_console.c’
  Compiling ‘nrf_power_clock.c’
  Compiling ‘sys_clock_init.c’
  Compiling ‘nrf_rtc_timer.c’
  Compiling ‘spm.c’
  Compiling ‘secure_services.c’
  Archiving ‘libspm_zephyr.a’
Rebuilding ‘spm/zephyr/arch/arch/arm/core/libspm_arch__arm__core.a’ from solution ‘build’ in configuration ‘Common’
  Assembling ‘exc_exit.S’
  Assembling ‘swap_helper.S’
  Assembling ‘cpu_idle.S’
  Assembling ‘fault_s.S’
  Assembling ‘nmi_on_reset.S’
  Compiling ‘swap.c’
  Assembling ‘isr_wrapper.S’
  Compiling ‘irq_manage.c’
  Compiling ‘thread.c’
  Compiling ‘fatal.c’
  Compiling ‘nmi.c’
  Compiling ‘prep_c.c’
  Archiving ‘libspm_arch__arm__core.a’
Rebuilding ‘spm/zephyr/arch/arch/arm/core/cortex_m/libspm_arch__arm__core__cortex_m.a’ from solution ‘build’ in configuration ‘Common’
  Assembling ‘vector_table.S’
  Assembling ‘reset.S’
  Compiling ‘fault.c’
  Compiling ‘scb.c’
  Compiling ‘thread_abort.c’
  Compiling ‘irq_init.c’
  Archiving ‘libspm_arch__arm__core__cortex_m.a’
Rebuilding ‘spm/zephyr/arch/arch/arm/core/cortex_m/mpu/libspm_arch__arm__core__cortex_m__mpu.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘arm_core_mpu.c’
  Compiling ‘arm_mpu.c’
  Archiving ‘libspm_arch__arm__core__cortex_m__mpu.a’
Rebuilding ‘spm/zephyr/lib/libc/minimal/libspm_lib__libc__minimal.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘atoi.c’
  Compiling ‘strtol.c’
  Compiling ‘strtoul.c’
  Compiling ‘malloc.c’
  Compiling ‘exit.c’
  Compiling ‘bsearch.c’
  Compiling ‘strncasecmp.c’
  Compiling ‘strstr.c’
  Compiling ‘string.c’
  Compiling ‘strspn.c’
  Compiling ‘prf.c’
  Compiling ‘stdout_console.c’
  Compiling ‘sprintf.c’
  Compiling ‘fprintf.c’
  Compiling ‘gmtime.c’
  Archiving ‘libspm_lib__libc__minimal.a’
Rebuilding ‘spm/zephyr/drivers/serial/libspm_drivers__serial.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘uart_nrfx_uarte.c’
  Archiving ‘libspm_drivers__serial.a’
Rebuilding ‘spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbeddrbg.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘ctr_drbg.c’
  Compiling ‘entropy.c’
  Archiving ‘libspm_mbeddrbg.a’
Rebuilding ‘spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbedcrypto_vanilla.a’ from solution ‘build’ in configuration ‘Common’
  Compiling ‘aes.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\aes.c.obj.d: No such file or directory
  Compiling ‘aesni.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\aesni.c.obj.d: No such file or directory
  Compiling ‘arc4.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\arc4.c.obj.d: No such file or directory
  Compiling ‘aria.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\aria.c.obj.d: No such file or directory
  Compiling ‘asn1write.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\asn1write.c.obj.d: No such file or directory
  Compiling ‘asn1parse.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\asn1parse.c.obj.d: No such file or directory
  Compiling ‘base64.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\base64.c.obj.d: No such file or directory
  Compiling ‘bignum.c’
    opening dependency file C:/Users/TimSahr/Documents/Nordic/sourcecode_root/ncs/nrf/samples/nrf9160/nRF9160DKtoGoogleCloud/build_nrf9160_pca10090ns/spm\zephyr\modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\spm_mbedcrypto_vanilla.dir\C_\Users\TimSahr\Documents\Nordic\sourcecode_root\ncs\mbedtls\library\bignum.c.obj.d: No such file or directory
Build failed

Any help is appreciated!

Thanks,

Tim

Parents
  • Hi,

    I fixed the error. After moving the whole directory to the c drive root instead of using all these sub folders.

    After writing the hex file to the thingy:91 this is the serial output. Did messed something up with the certificates?

    9-23T13:00:52.943Z INFO Modem port is opened
    2019-09-23T13:00:52.949Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2019-09-23T13:01:04.632Z INFO Modem port is opened
    2019-09-23T13:01:04.634Z DEBUG modem << [00:00:01.161,804] <err> gcloud: key delete err: 2 No such file or directory\x0D\x0A
    2019-09-23T13:01:04.635Z DEBUG modem << [00:00:01.595,428] <err> gcloud: key delete err: 2 No such file or directory\x0D
    2019-09-23T13:01:04.636Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2019-09-23T13:01:04.638Z DEBUG modem << [00:00:02.032,806] <err> gcloud: key delete err: 2 No such file or directory\x0D\x0A
    2019-09-23T13:01:04.780Z DEBUG modem << +CFUN: 4\x0D
    2019-09-23T13:01:04.781Z DEBUG modem << \x0A
    2019-09-23T13:01:04.782Z DEBUG modem << OK\x0D\x0A\x00
    2019-09-23T13:01:04.787Z DEBUG modem >> AT+CFUN=1\x0D\x0A
    2019-09-23T13:01:05.569Z DEBUG modem << [00:00:02.473,114] <err> gcloud: key delete err: 2 No such file or directory\x0D
    2019-09-23T13:01:05.574Z DEBUG modem << [00:00:02.473,114] <dbg> gcloud.gcloud_provision: CERT:\x0A
    2019-09-23T13:01:05.576Z DEBUG modem << -----BEGIN CERTIFICATE-----\x0A
    2019-09-23T13:01:05.583Z DEBUG modem << MIIBdTCCARugAwIBAgIJAOvj4PVfAgqjMAoGCCqGSM49BAMCMBYxFDASBgNVBAMM\x0A
    2019-09-23T13:01:05.587Z DEBUG modem << C25yZjkxLW1hcnRlMCAXDTE5MDQwNTExMTUxN1oYDzQ3NTcwMzAyMTExNTE3WjAW\x0A
    2019-09-23T13:01:05.592Z DEBUG modem << MRQwEgYDVQQDDAtucmY5MS1tYXJ0ZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA\x0A
    2019-09-23T13:01:05.599Z DEBUG modem << BAq8otkWGnocpdAxlnpJdVn6EBb1WbQnZXLFaYzsMeXWGFIIO02hWTvaSUPI1xNs\x0A
    2019-09-23T13:01:05.604Z DEBUG modem << 0QB8c3IU9oBhDXkRNU2Nqi2jUDBOMB0GA1UdDgQWBBRLAhO335CAd280I/qVQmiM\x0A
    2019-09-23T13:01:05.610Z DEBUG modem << 07nd8TAfBgNVHSMEGDAWgBRLAhO335CAd280I/qVQmiM07nd8TAMBgNVHRMEBTAD\x0A
    2019-09-23T13:01:05.615Z DEBUG modem << AQH/MAoGCCqGSM49BAMCA0gAMEUCIF2kQO7Cqn73ANmwBdgGA1y/KGOpOU4I/ywF\x0A
    2019-09-23T13:01:05.620Z DEBUG modem << LEu8trOUAiEA8//UWttMRkmaylghw3mgsYGGKk17rY+4j+4mGUwvDnw=\x0A
    2019-09-23T13:01:05.622Z DEBUG modem << -----END CERTIFICATE-----\x0A\x0D
    2019-09-23T13:01:06.600Z DEBUG modem << OK\x0D
    2019-09-23T13:01:06.603Z DEBUG modem << Initializing modem\x0A
    2019-09-23T13:01:06.606Z DEBUG modem << --- 1 messages dropped ---\x0D
    2019-09-23T13:01:06.610Z DEBUG modem << Establishing LTE link (this may take some time) ...\x0A
    2019-09-23T13:01:06.617Z DEBUG modem << [00:00:04.341,705] <inf> lte_lc: Using legacy LTE PCO mode...\x0D\x0A
    2019-09-23T13:01:06.618Z DEBUG modem << Modem configured\x0A\x0D
    2019-09-23T13:01:06.620Z DEBUG modem << Connecting to Google Cloud\x0A\x0D
    2019-09-23T13:01:06.625Z DEBUG modem << [00:00:04.342,193] <err> os: Exception occurred in Secure State\x0D
    2019-09-23T13:01:06.633Z DEBUG modem << [00:00:04.342,224] <err> os: ***** HARD FAULT *****\x0D
    2019-09-23T13:01:06.635Z DEBUG modem << [00:00:04.342,224] <err> os:   Fault escalation (see below)\x0D\x0A
    2019-09-23T13:01:06.640Z DEBUG modem << [00:00:04.342,254] <err> os: ***** BUS FAULT *****\x0D
    2019-09-23T13:01:06.645Z DEBUG modem << [00:00:04.342,254] <err> os:   Precise data bus error\x0D
    2019-09-23T13:01:06.650Z DEBUG modem << [00:00:04.342,254] <err> os:   BFAR Address: 0x50008120\x0D
    2019-09-23T13:01:06.657Z DEBUG modem << [00:00:04.342,285] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000001  r2/a3:  0x00037ad0\x0D
    2019-09-23T13:01:06.666Z DEBUG modem << [00:00:04.342,285] <err> os: r3/a4:  0x00000001 r12/ip:  0x20029104 r14/lr:  0x00012be5\x0D
    2019-09-23T13:01:06.669Z DEBUG modem << [00:00:04.342,315] <err> os:  xpsr:  0x61000000\x0D
    2019-09-23T13:01:06.678Z DEBUG modem << [00:00:04.342,315] <err> os: s[0]:  0x00000000  s[1]:  0x00000000  s[2]:  0x00000000  s[3]:  0x00000000\x0A
    2019-09-23T13:01:06.688Z DEBUG modem << [00:00:04.342,346] <err> os: s[4]:  0x00000000  s[5]:  0x00000000  s[6]:  0x00000000  s[7]:  0x00000000\x0A
    2019-09-23T13:01:06.699Z DEBUG modem << [00:00:04.342,376] <err> os: s[8]:  0x00000000  s[9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000\x0A
    2019-09-23T13:01:06.707Z DEBUG modem << [00:00:04.342,376] <err> os: s[12]:  0x00000000  s[13]:  0xffffffff  s[14]:  0x00000000  s[15]:  0x00000000\x0A
    2019-09-23T13:01:06.711Z DEBUG modem << [00:00:04.342,407] <err> os: fpscr:  0x00000000\x0A
    2019-09-23T13:01:06.718Z DEBUG modem << [00:00:04.342,407] <err> os: Faulting instruction address (r15/pc): 0x0001921c\x0D
    2019-09-23T13:01:06.724Z DEBUG modem << [00:00:04.342,407] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception\x0D
    2019-09-23T13:01:06.733Z DEBUG modem << [00:00:04.342,437] <err> os: Current thread: 0x20023214 (unknown)\x0D\x0A
    2019-09-23T13:01:06.735Z DEBUG modem << [00:00:04.470,947] <err> os: Halting system\x0D\x0A

  • Hi,

    Have you tried with version v1.0.0 of ncs?

    Also, to get more information about when the hard fault happened, you can open the file /build/zephyr/zephyr.lst and search for your faulting instruction address, which is 1921c in the output above.

Reply Children
  • Yes, I'm already on v1.0.0.

    To be honest, I've no idea what this tells me:

    Thanks,

    Tim

  • Hi Tim,

    This tells you that it fails at 

    return api->write(port, access_op, pin, value);

    If you scroll up, you will see which function it fails in, which I assume is the following:

    static inline int z_impl_gpio_write

    It seems like the problem might be related to nRF9160DK and Thingy:91 having different pinouts, considering the project was originally written for the DK. I would assume that the LEDs are the problem, so one possible fix is to remove all instances in main.c where the following function is called

    dk_set_led_on()

    Let me know whether this works.

    Best Regard,

    Marte

  • Hi Marte,

    this did the trick! Now it is not crashing anymore. Grimacing

    Now it fails at sending the data... :D 

    phyr Oa***** Booting Zephyr OS build v1.14.99-ncs3-snapshot2-1279-g1c3a001f62e6 *****
    [00:00:00.291,717] <err> at_host: UART check failed: 12. Dropping buffer and retrying.
    Provisioning
    GCLOUD THREAD LIVES
    [00:00:02.575,225] <err> gcloud: key delete err: 2 No such file or directory
    [00:00:03.008,209] <err> gcloud: key delete err: 2 No such file or directory
    [00:00:03.445,648] <err> gcloud: key delete err: 2 No such file or directory
    [00:00:03.885,925] <err> gcloud: key delete err: 2 No such file or directory
    [00:00:03.885,925] <dbg> gcloud.gcloud_provision: CERT:
    -----BEGIN CERTIFICATE-----
    MIIBdTCCARugAwIBAgIJAOvj4PVfAgqjMAoGCCqGSM49BAMCMBYxFDASBgNVBAMM
    C25yZjkxLW1hcnRlMCAXDTE5MDQwNTExMTUxN1oYDzQ3NTcwMzAyMTExNTE3WjAW
    MRQwEgYDVQQDDAtucmY5MS1tYXJ0ZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA
    BAq8otkWGnocpdAxlnpJdVn6EBb1WbQnZXLFaYzsMeXWGFIIO02hWTvaSUPI1xNs
    0QB8c3IU9oBhDXkRNU2Nqi2jUDBOMB0GA1UdDgQWBBRLAhO335CAd280I/qVQmiM
    07nd8TAfBgNVHSMEGDAWgBRLAhO335CAd280I/qVQmiM07nd8TAMBgNVHRMEBTAD
    AQH/MAoGCCqGSM49BAMCA0gAMEUCIF2kQO7Cqn73ANmwBdgGA1y/KGOpOU4I/ywF
    LEu8trOUAiEA8//UWttMRkmaylghw3mgsYGGKk17rY+4j+4mGUwvDnw=
    -----END CERTIFICATE-----
    
    Provisioning complete
    Initializing modem
    Establishing LTE link (this may take some time) ...
    [00:00:04.336,090] <inf> lte_lc: Using legacy LTE PCO mode...
    Modem configured
    Connecting to Google Cloud
    [00:00:29.186,645] <inf> gcloud: Got CONNECT command
    [00:00:29.186,645] <dbg> gcloud.gcloud_thread: Initiating broker
    [00:00:29.588,562] <dbg> gcloud.broker_init: IPv4 Address found 0xce857d4a
    [00:00:29.588,592] <dbg> gcloud.gcloud_thread: Making JWT
    [00:00:30.038,696] <dbg> gcloud.make_jwt: timestamp: 1569252388
    [00:00:30.333,160] <dbg> gcloud.gcloud_thread: Initiating client
    [00:00:30.900,695] <dbg> gcloud.make_jwt: timestamp: 1569252389
    [00:00:31.194,732] <dbg> gcloud.client_init: JWT:
    eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJmbHV0ZWQtY2xvY2stMjQ5MzE1IiwiZXhwIjoxNTY5Mjk1NTg5LCJpYXQiOjE1NjkyNTIzODl9.tc22w~
    
    [00:00:31.194,763] <dbg> gcloud.client_init: JWT length: 208
    [00:00:31.194,763] <dbg> gcloud.gcloud_thread: Starting input timer
    [00:00:31.194,793] <dbg> gcloud.gcloud_thread: Connecting mqtt
    GCLOUD THREAD LIVES
    Sending JSON data:
    {
    "Message":22019
    }
    [00:00:39.196,838] <wrn> gcloud: Cannot publish data while not connected to Google Cloud
    [00:00:41.194,824] <inf> gcloud: Got INPUT_TIMEOUT command
    [00:00:41.194,885] <inf> gcloud: MQTT event: 0
    [00:00:41.194,885] <dbg> gcloud.mqtt_event_handler: Got CONNACK
    [00:00:41.194,915] <err> gcloud: MQTT connect failed: 5
    GCLOUD THREAD LIVES
    Sending JSON data:
    {
    "Message":22019
    }
    [00:00:49.207,061] <wrn> gcloud: Cannot publish data while not connected to Google Cloud
    [00:00:51.194,824] <inf> gcloud: Got INPUT_TIMEOUT command
    GCLOUD THREAD LIVES
    Sending JSON data:
    {
    "Message":22019
    }
    [00:00:59.217,285] <wrn> gcloud: Cannot publish data while not connected to Google Cloud
    [00:01:01.194,824] <inf> gcloud: Got INPUT_TIMEOUT command
    GCLOUD THREAD LIVES

    With the lte link monitor I proved that I have an lte connection, so this should not be the reason for the error.

    I also get the "CONNACK" so I have a connection, right?

    Right after the "Connect acknowledgment" I get "MQTT connect failed: 5". 

    I will search around to finf out what this means. :)

    Do you might have another tip for me?

    Best regards,

    Tim

  • Hi ,

    I tried it again today and now I get error -13.

    I tried to find some information about the error number but can't find any.

    Provisioning complete
    Initializing modem
    Establishing LTE link (this may take some time) ...
    [00:00:04.352,233] <inf> lte_lc: Using legacy LTE PCO mode...
    Modem configured
    Connecting to Google Cloud
    [00:00:25.399,536] <inf> gcloud: Got CONNECT command
    [00:00:25.399,536] <dbg> gcloud.gcloud_thread: Initiating broker
    [00:00:25.771,453] <dbg> gcloud.broker_init: IPv4 Address found 0xce857d4a
    [00:00:25.771,484] <dbg> gcloud.gcloud_thread: Making JWT
    [00:00:26.301,574] <dbg> gcloud.make_jwt: timestamp: 1569312515
    [00:00:26.596,160] <dbg> gcloud.gcloud_thread: Initiating client
    [00:00:27.723,602] <dbg> gcloud.make_jwt: timestamp: 1569312517
    [00:00:28.018,188] <dbg> gcloud.client_init: JWT:
    eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJmbHV0ZWQtY2xvY2stMjQ5MzE1IiwiZXhwIjoxNTY5MzU1NzE3LCJpYXQiOjE1NjkzMTI1MTd9.6MoUK~
    
    [00:00:28.018,218] <dbg> gcloud.client_init: JWT length: 208
    [00:00:28.018,218] <dbg> gcloud.gcloud_thread: Starting input timer
    [00:00:28.018,249] <dbg> gcloud.gcloud_thread: Connecting mqtt
    Sending JSON data:
    {
    "Message":22019
    }
    [00:00:35.409,729] <wrn> gcloud: Cannot publish data while not connected to Google Cloud
    [00:00:39.603,912] <err> gcloud: mqtt_connect failed: -111 Connection refused
    GCLOUD THREAD LIVES
    [00:00:39.603,942] <inf> gcloud: Got INPUT_TIMEOUT command
    [00:00:39.603,973] <err> gcloud: mqtt_input failed: -13
    GCLOUD THREAD LIVES
    Sending JSON data:
    {
    "Message":22019
    }
    [00:00:45.419,952] <wrn> gcloud: Cannot publish data while not connected to Google Cloud
    [00:00:48.018,249] <inf> gcloud: Got INPUT_TIMEOUT command
    [00:00:48.018,280] <err> gcloud: mqtt_input failed: -13
    GCLOUD THREAD LIVES

    Thanks.

    Tim

  • Hi Tim,

    In order to find what error number -13 is, you can use strerror().

    printk("err: %d\n", strerror(-err));

    This will print what error number -13 corresponds to. You can add this where the following is in the code

    LOG_ERR("mqtt_input failed: %d", err);

    That is, line 635 in gcloud.c

    strerror() must take a positive error number, hence the minus in front of err in the code above.

    Hope this helps.

    Best regards,

    Marte

Related