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

gps and lte work simultaneously

Hi!

I am trying use aws iot sample and over this the gps example to obtain location and transmit a aws iot core, but I have problem with manage of lte and gps functions, 

I found this functions to control lte modem

lte_lc_init_and_connect_async(lte_lc_evt_handler_thandler);//only once
//
lte_lc_connect_async(lte_lc_evt_handler_thandler);//
//
lte_lc_edrx_req(bool enable);

I undertand that line 1 initialize and connect the lte modem, then 

I don't understand the difference between line 3 and line 5 and therfore how to use that functions

how to use psm to achieve gps and lte work tougether?

which are the functions to control gps work?

thanks in advance 

Julio

Parents Reply
  • Hi Markus

    I have read the links that you share, but I still with out undertand two things

    1- LTE and GPS manage

    over the aws iot sample all function to control LTE modem are these?:

    i) lte_lc_init_and_connect_async()

    ii) lte_lc_psm_req(true)

    iii) lte_lc_offline()

    iv) lte_lc_connect()

    if they are all, I don't understand the order called each of them, because (i) must be the first I supouse, but in main function is the last of them

    I try to do this:

    after L508 I put

    int pr = lte_lc_psm_req(true);
    if (pr) {
    	printk("Requesting PSM failed, error: %d\n", pr);
    }
    printk("Starting GPS application\n");//gps sample code
    if (init_app() != 0) { 
        return -1;
    }

    and return "Failed to initialize modem" with these values in at command

    #define AT_XSYSTEMMODE "AT\%XSYSTEMMODE=0,0,1,0";//gps sample code
    #define AT_ACTIVATE_GPS "AT+CFUN=31";//gps sample code

    2- which one is the recursive function for transmitt to aws?

    where is the control function of transmittion? in main function there is not a loop, I wanna to know where is the transmition control to apply the manage lte and gps  the correct place in code 

    I am very lost in these code, any help I will appreciate a lot

    Julio

Children
No Data
Related