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

SUPL library fails: at_cmd: Response buffer not large enough

Hi,

I am trying to do AGPS with the supl library. 
I obtained version 0.7 through the application and installed it (and enabled the required config options).

Unfortunately, this is now crashing the (asset_tracker_v2) application:

[00:00:19.456,542] <dbg> cloud_codec_ringbuffer.cloud_codec_populate_sensor_buffer: Entry: 1 of 9 in sensor buffer filled
[00:00:19.468,200] <dbg> agps.open_supl_socket: ip 74.125.193.192 (c0c17d4a) port 7276
[00:00:19.508,056] <wrn> modem_module: Unsupported modem firmware version: mfw_nrf9160_1.3.0
[00:00:19.517,150] <wrn> modem_module: Expected firmware version: mfw_nrf9160_1.2.3
[00:00:19.525,543] <wrn> modem_module: You can change the expected version through the
[00:00:19.534,210] <wrn> modem_module: EXPECTED_MODEM_FIRMWARE_VERSION setting.
[00:00:19.542,327] <wrn> modem_module: Please upgrade: http://bit.ly/nrf9160-mfw-update
[00:00:19.551,147] <inf> event_manager: MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.558,380] <dbg> modules_common.module_enqueue_msg: modem module: Enqueued: MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.569,549] <dbg> modules_common.module_enqueue_msg: data module: Enqueued: MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.580,535] <dbg> modules_common.module_enqueue_msg: cloud module: Enqueued: MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.591,644] <dbg> modules_common.module_enqueue_msg: app module: Enqueued: MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.602,661] <dbg> modules_common.module_get_next_msg: app module: Dequeued MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.613,922] <dbg> modules_common.module_get_next_msg: data module: Dequeued MODEM_EVT_MODEM_STATIC_DATA_READY
[00:00:19.625,305] <inf> agps: Starting SUPL session
[00:00:19.633,697] <err> at_cmd: Response buffer not large enough
[00:00:19.640,716] <err> supl_client: Fetching LTE info failed

The error is pretty straightforward, but I already increased the AT buffer size from 2700 to 4000, and I still get this error..

Is this normal? What is the recommended AT buffer size for use with AGPS?

(I am using SDK 1.5.0, modem firmware 1.3.0, revision 1 of the thingy91.)

Kind regards,

Arnout

Parents
  • Hello Arnout,

    I unfortunately do have limited knowledge about the SUPL client library and most of our experts are out of office due to the summer vacation period.

    But to start with, there are two things I can give you feedback on:

    1. Why are you using the Asset Tracker v2 to implement the SUPL client library? This application is quite heavy and the implantation might get complex pretty fast, so I wonder if it wouldn’t be more convenient to use applications like the nRF9160: A-GPS as a reference instead?

    2. Have you configured the SUPL library correctly and defined all necessary buffer sizes?

    Regards,

    Markus

  • Hi Markus,

    I am using the asset tracker v2, since the asset tracker v1 just worked out of the box but was not power efficient. the v2 does not have the NRF cloud by default, hence AGPS must be added.

    But fair enough, I tried to compile the agps example. For now, I am running into an issue that it wont compile because it thinks I have too little flash. This is a little off topic, but perhaps you know by heart how to fix this?

    Memory region         Used Size  Region Size  %age Used
               FLASH:         64 KB        48 KB    133.33%
                SRAM:        8768 B        64 KB     13.38%
            IDT_LIST:          88 B         2 KB      4.30c:/nordic/nordicsdk/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr\zephyr_prebuilt.elf section `.gnu.sgstubs' will not fit in region `FLASH'
    
    
    (while e.g. the asset tracker v2 links perfectly, and reports:)
    
    Memory region         Used Size  Region Size  %age Used
               FLASH:      228356 B     425472 B     53.67%
                SRAM:      107120 B     178968 B     59.85%
            IDT_LIST:         184 B         2 KB      8.98%
    
    
    

    Regarding the buffer sizes, I simply unpacked the supl package (which includes the header file with its default values, and added the supl library config option and agps option to enable it

  • btw, for some reason I have to add CONFIG_BOOTLOADER_MCUBOOT=y to enable it fitting in flash on the thingie91 target.. (both on sdk1.5.0 and sdk1.5.1). Will test this now.. Stay tuned

Reply Children
  • Aaand. seems that the agps example has a hard requirement for the nrf cloud. (I hit an assert in main). Not so easy to test on this example after all it seems

    	cloud_backend = cloud_get_binding("NRF_CLOUD");
    	__ASSERT(cloud_backend, "Could not get binding to cloud backend");
    
    	err = cloud_init(cloud_backend, cloud_event_handler);
    	if (err) {
    		LOG_ERR("Cloud backend could not be initialized, error: %d",
    			err);
    		return;
    	}

  • And finally, the gps example (with the supl and AGPS enabled + bootloader_mcusupport enabled), does seem to be a valid candidate..

    However this crashes midway, in the same way as the asset_tracker_v2 did

    SPM: NS image at 0x18200
    SPM: NS MSP at 0x2001d838
    SPM: NS reset vector at 0x1bfb1
    SPM: prepare to jump to Non-Secure image.
    *** Booting Zephyr OS build v2.4.99-ncs1  ***
    Starting GPS application
    GPS Socket created
    Getting GPS data...
    New AGPS data requested, contacting SUPL server, flags 59
    Established LTE link
    ip 4a7d:c1c0:200:d801:1300:1300:: (c0c17d4a) port 7276
    Starting SUPL session
    

    z_arm_exc_spurious is called..

    So, long story short: I see the same issue on the simple gps example, and hence, cannot use the SUPL library at this point

Related