Moved CP Max recv len into mbed_lib.json

According to [3GPP-TS_24.008] the maximum size for Non-IP link MTU is 1358 octets to prevent fragmentation in the backbone network.
Therefore reduced the maximum size to follow the standard.
pull/12110/head
Antti Kauppila 2019-12-16 12:56:55 +02:00
parent f77f4ea911
commit 6d0b2fae9b
3 changed files with 8 additions and 3 deletions

View File

@ -32,7 +32,7 @@ protected:
private:
void (*_cb)(void *);
void *_data;
char _recv_buffer[MAX_CP_DATA_RECV_LEN];
char _recv_buffer[MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN];
size_t _recv_len;
// Called on receiving URC: +CRTDCP
void urc_cp_recv();

View File

@ -32,6 +32,10 @@
"clear-on-connect" : {
"help": "Clear modem to a known default state on connect() before SIM pin is entered, null to disable",
"value": null
},
"max-cp-data-recv-len" : {
"help": "Max length of the buffer storing data received over control plane",
"value": 1358
}
}
}

View File

@ -27,9 +27,10 @@
namespace mbed {
/* Length of the buffer storing data received over control plane */
#define MAX_CP_DATA_RECV_LEN 2048
#ifndef MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN
#define MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN 1358
#endif
// TODO: need to make this l3ip compatible
/**
* @addtogroup cellular