Skip to content

Commit b482389

Browse files
author
Mirela Chirica
committed
Cellular: BC95 update max packet size
1 parent 1998173 commit b482389

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/cellular/framework/targets/QUECTEL/BC95/QUECTEL_BC95_CellularStack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ nsapi_size_or_error_t QUECTEL_BC95_CellularStack::socket_sendto_impl(CellularSoc
154154
_at.write_int(socket->id);
155155
_at.write_string(address.get_ip_address(), false);
156156
_at.write_int(address.get_port());
157-
_at.write_int(size);
157+
_at.write_int(size <= BC95_MAX_PACKET_SIZE ? size : BC95_MAX_PACKET_SIZE);
158158
_at.write_string(hexstr, false);
159159
_at.cmd_stop();
160160
_at.resp_start();
@@ -181,7 +181,7 @@ nsapi_size_or_error_t QUECTEL_BC95_CellularStack::socket_recvfrom_impl(CellularS
181181

182182
_at.cmd_start("AT+NSORF=");
183183
_at.write_int(socket->id);
184-
_at.write_int(size);
184+
_at.write_int(size <= BC95_MAX_PACKET_SIZE ? size : BC95_MAX_PACKET_SIZE);
185185
_at.cmd_stop();
186186
_at.resp_start();
187187
// receiving socket id

features/cellular/framework/targets/QUECTEL/BC95/QUECTEL_BC95_CellularStack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "AT_CellularStack.h"
2222

2323
#define BC95_SOCKET_MAX 7
24-
#define BC95_MAX_PACKET_SIZE 512
24+
#define BC95_MAX_PACKET_SIZE 1358
2525

2626
namespace mbed {
2727

0 commit comments

Comments
 (0)