Skip to content

Commit 3e6f5eb

Browse files
authored
Merge pull request #10764 from mirelachirica/bg96_sockid_fix_ipv6_support
BG96 ipv6 support and socket id fix for BG96 and M26
2 parents 4ad71c4 + b57d978 commit 3e6f5eb

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ static const intptr_t cellular_properties[AT_CellularBase::PROPERTY_MAX] = {
5757
1, // AT_CMGF
5858
1, // AT_CSDH
5959
1, // PROPERTY_IPV4_STACK
60-
0, // PROPERTY_IPV6_STACK
61-
0, // PROPERTY_IPV4V6_STACK
60+
1, // PROPERTY_IPV6_STACK
61+
1, // PROPERTY_IPV4V6_STACK
6262
1, // PROPERTY_NON_IP_PDP_TYPE
6363
1, // PROPERTY_AT_CGEREP
6464
};

features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp

100644100755
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ nsapi_error_t QUECTEL_BG96_CellularStack::socket_connect(nsapi_socket_t handle,
5050
CellularSocket *socket = (CellularSocket *)handle;
5151

5252
int modem_connect_id = -1;
53-
int request_connect_id = socket->id;
5453
int err = -1;
5554

55+
int request_connect_id = find_socket_index(socket);
56+
// assert here as its a programming error if the socket container doesn't contain
57+
// specified handle
58+
MBED_ASSERT(request_connect_id != -1);
59+
5660
_at.lock();
5761
if (socket->proto == NSAPI_TCP) {
5862
_at.cmd_start("AT+QIOPEN=");

features/cellular/framework/targets/QUECTEL/M26/QUECTEL_M26_CellularStack.cpp

100644100755
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,14 @@ nsapi_error_t QUECTEL_M26_CellularStack::socket_connect(nsapi_socket_t handle, c
302302
{
303303
CellularSocket *socket = (CellularSocket *)handle;
304304

305-
MBED_ASSERT(socket->id != -1);
306-
307305
int modem_connect_id = -1;
308-
int request_connect_id = socket->id;
309306
int err = -1;
310307

308+
int request_connect_id = find_socket_index(socket);
309+
// assert here as its a programming error if the socket container doesn't contain
310+
// specified handle
311+
MBED_ASSERT(request_connect_id != -1);
312+
311313
_at.lock();
312314
if (socket->proto == NSAPI_TCP) {
313315
_at.cmd_start("AT+QIOPEN=");

0 commit comments

Comments
 (0)