SUPL connection setup

HI Sir/Madam

I downloaded SUPL-C sdk 0.7.2 ad I add the following variable to the prj.conf

#SUPL client library
CONFIG_SUPL_CLIENT_LIB=y
CONFIG_GNSS_SAMPLE_ASSISTANCE_SUPL=y
CONFIG_GNSS_SAMPLE_SUPL_HOSTNAME="supl.google.com"
CONFIG_GNSS_SAMPLE_SUPL_PORT=7276
when I build the program, it reports 
/Users/kevin/Dev/NordicCubee/minicube_main_firmware/prj.conf:34: warning: attempt to assign the value 'y' to the undefined symbol GNSS_SAMPLE_ASSISTANCE_SUPL

/Users/kevin/Dev/NordicCubee/minicube_main_firmware/prj.conf:35: warning: attempt to assign the value '"supl.google.com"' to the undefined symbol GNSS_SAMPLE_SUPL_HOSTNAME

/Users/kevin/Dev/NordicCubee/minicube_main_firmware/prj.conf:36: warning: attempt to assign the value '7276' to the undefined symbol GNSS_SAMPLE_SUPL_PORT

error: Aborting due to Kconfig warnings
I get this variable from the readme file. Please let me know why I can't use this value. Should I use socket to connect SUPL server instead?
Parents
  • Hi,

    SUPL client library requires that newlib C library is used. Have you added CONFIG_NEWLIB_LIBC to your project configuration?

    It could be that you did not extract SUPL library to the proper folder and/or maintained proper structure from the zip file. You can look at this thread for more information. You can also check if you have done everything correctly according to the SUPL Client Library documentation.

    Best regards,
    Dejan

  • Hi Dejan

    Thanks for your reply. I follow the guidance of the nordic documentation https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/others/supl_os_client.html#supl_client_library.

    1.Download the nRF9160 SiP SUPL client library zip file and extract it into the nrf/ext/lib/bin/ folder.

    2. I add the overlay-supl.conf to the project, the following variables work

    # Enable SUPL assistance for GNSS sample
    CONFIG_GNSS_SAMPLE_ASSISTANCE_SUPL=y

    # SUPL client library requires that the newlib C library is used
    CONFIG_NEWLIB_LIBC=y
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

    CONFIG_GNSS_SAMPLE_SUPL_HOSTNAME="supl.google.com"
    CONFIG_GNSS_SAMPLE_SUPL_PORT=7276
    3. Add the following to the prj.conf
    #SUPL client library
    CONFIG_SUPL_CLIENT_LIB=y
    4. When I compile the program, it reports the following error. I want to know how mang spaces the the supl client needs?
    Or is there anything wrong that causes it to take too much flash?
    /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 6540 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/kevin/Dev/NordicCubee/minicube_main_firmware/build
     
  • Hi,

    Can you provide more information about your application?

    Best regards,
    Dejan

  • Hi Dejan

    What I did is to add the supl client code into my project and I compile it which reports flash overflow.

    Refer the following codes i added in my project. Please let me know if you have any idea.

    ======================================

    static bool supl_session_active = false;

    /* SUPL Session Start */
    int SuplStartSession() {
    int err;



    //LOG_INF("Starting SUPL session");


    // Initialize SUPL client
    err = supl_client_init();
    if (err) {
    //LOG_ERR("SUPL client initialization failed, error: %d", err);
    return err;
    }

    // Start SUPL session
    err = supl_client_session();
    if (err) {
    //LOG_ERR("Failed to start SUPL session, error: %d", err);

    return err;
    }


    supl_session_active = true;
    //LOG_INF("SUPL session started successfully");
    return 0;
    }


    /* SUPL session stop function */
    int SuplStopSession() {
    if (supl_session_active) {
    supl_session_active = false;
    //LOG_INF("SUPL session stopped");
    } else {
    //LOG_INF("No active SUPL session to stop");
    }
    return 0;
    }
    =======================================================
  • Hi,

    Which board do you use?

    Which NCS version do you use?

    Best regards,
    Dejan

  • Hi

    Board: nrf9160

    NCS version: I try to use 2.6.1 and 2.70.

    2.6.1 has smaller compiled binary but still overflow the flash.

    Do you know what's the normal binary size if I use supl client.

    BR Qiang 

  • Hi Qiang,

    Do you use nrf9160-dk or custom board with nrf9160?

    Can you provide logs when using both NCS v2.6.1 and NCS v2.7.0 which show flash overflow?
    For testing, please try on both nrf9160-dk board and your custom board (in case you use custom board). Is there any difference with regard to flash overflow?

    Best regards,
    Dejan

Reply Children
  • Hi Dejans

    I can't use nrf9160-dk to compile and I have to use our custome board. 

    /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    /opt/nordic/ncs/toolchains/f8037e9b83/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 6540 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/f8037e9b83/bin/cmake --build /Users/kevin/Dev/NordicCubee/minicube_main_firmware/build

  • Hi Qiang,

    Is the log shown taken when you used NCS v2.6.1 or NCS v2.7.0?

    Are you able to build your project without SUPL client code?

    dejans said:
    Can you provide more information about your application?

    Can you provide more information about your project? What are you trying to achieve?

    Best regards,
    Dejan

Related