Skip to content

Commit e28daf7

Browse files
authored
Merge pull request #12110 from AnttiKauppila/cp_recv_len
Moved CP Max recv len into mbed_lib.json
2 parents 806ad39 + 6d0b2fa commit e28daf7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

features/cellular/framework/AT/AT_ControlPlane_netif.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AT_ControlPlane_netif: public ControlPlane_netif {
3232
private:
3333
void (*_cb)(void *);
3434
void *_data;
35-
char _recv_buffer[MAX_CP_DATA_RECV_LEN];
35+
char _recv_buffer[MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN];
3636
size_t _recv_len;
3737
// Called on receiving URC: +CRTDCP
3838
void urc_cp_recv();

features/cellular/mbed_lib.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
"clear-on-connect" : {
3333
"help": "Clear modem to a known default state on connect() before SIM pin is entered, null to disable",
3434
"value": null
35+
},
36+
"max-cp-data-recv-len" : {
37+
"help": "Max length of the buffer storing data received over control plane",
38+
"value": 1358
3539
}
3640
}
3741
}

features/netsocket/cellular/ControlPlane_netif.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
namespace mbed {
2828

2929
/* Length of the buffer storing data received over control plane */
30-
#define MAX_CP_DATA_RECV_LEN 2048
30+
#ifndef MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN
31+
#define MBED_CONF_CELLULAR_MAX_CP_DATA_RECV_LEN 1358
32+
#endif
3133

32-
// TODO: need to make this l3ip compatible
3334

3435
/**
3536
* @addtogroup cellular

0 commit comments

Comments
 (0)