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

CLOUD_EVT_ERROR in nrf_cloud_agps

<environment>
- Windows10
- nrf v1.3.0
- modem v1.2.0
- DK 0.9.0

I get "CLOUD_EVT_ERROR" when using nrf_cloud_agps. There is an error saying "Connection was closed, possibly by cloud".

I read this page https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/nrf_cloud_agps/README.html

*** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
D: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1574,1577
D: COEX0 set: AT%XCOEX0=1,1,1570,1580
I: nRF Cloud and A-GPS sample has started
I: Connecting to LTE network. This may take minutes.
I: PSM mode requested
+CEREG: 2,"182A","0179D005",7,0,0,"11100000","11100000"
+CSCON: 1
+CEREG: 5,"182A","0179D005",7,,,"00100011","00011111"
I: Connected to LTE network
D: GPS socket created, fd: 1232491587
+CEDRXP: 4,"1001","1001","1011"
I: CLOUD_EVT_ERROR
E: Socket error: POLLHUP
E: Connection was closed, possibly by cloud

I turned off PSM by CONFIG_LTE_POWER_SAVING_MODE=n

but same.

Do I have to set up on nRF Cloud to use this program?

Thank you in adavce!

Parents
  • I tried the same program with different PC, DK board, and SIM. I disabled PSM and don't modify other parts in nrf_cloud_agps from the original

    I got another error.

    *** Booting Zephyr OS build v2.3.0-rc1-ncs1  ***
    D: MAGPIO set: AT%XMAGPIO=1,0,0,1,1,1574,1577
    D: COEX0 set: AT%XCOEX0=1,1,1570,1580
    I: nRF Cloud and A-GPS sample has started
    I: Connecting to LTE network. This may take minutes.
    +CEREG: 2,"1859","0179EF09",7,0,0,"11100000","11100000"
    +CSCON: 1
    +CSCON: 0
    +CSCON: 1
    +CEREG: 5,"1859","0179EF09",7,,,"11100000","11100000"
    I: Connected to LTE network
    D: GPS socket created, fd: 1232491587
    +CEDRXP: 4,"1001","1001","0001"
    E: Cloud connection failed, error: -8

    backend->api->connect(backend) causes an error

    <cloud.h>
    
    static inline int cloud_connect(const struct cloud_backend *const backend)
    {
    	if (backend == NULL || backend->api == NULL ||
    	    backend->api->connect == NULL) {
    		return CLOUD_CONNECT_RES_ERR_INVALID_PARAM;
    	}
    
    	return backend->api->connect(backend); // CAUSE ERROR
    }
    

  • Do you need to set certificates to download AGPS data from nRF cloud?

  • You shouldn't need to set certificates to access the cloud if you're using a DK. The DK comes with certificates already flashed, so it shouldn't be necessary. Have you overwritten the certificates at some point?

  • Yes, I overwritten the certificates because I let DK connect to AWS. The original one is removed. 

    now I'm ok. I figured out the reason

Reply Children
No Data
Related