Skip to content

BG96 ipv6 support and socket id fix for BG96 and M26 #10764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ static const intptr_t cellular_properties[AT_CellularBase::PROPERTY_MAX] = {
1, // AT_CMGF
1, // AT_CSDH
1, // PROPERTY_IPV4_STACK
0, // PROPERTY_IPV6_STACK
0, // PROPERTY_IPV4V6_STACK
1, // PROPERTY_IPV6_STACK
1, // PROPERTY_IPV4V6_STACK
1, // PROPERTY_NON_IP_PDP_TYPE
1, // PROPERTY_AT_CGEREP
};
Expand Down
6 changes: 5 additions & 1 deletion features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ nsapi_error_t QUECTEL_BG96_CellularStack::socket_connect(nsapi_socket_t handle,
CellularSocket *socket = (CellularSocket *)handle;

int modem_connect_id = -1;
int request_connect_id = socket->id;
int err = -1;

int request_connect_id = find_socket_index(socket);
// assert here as its a programming error if the socket container doesn't contain
// specified handle
MBED_ASSERT(request_connect_id != -1);

_at.lock();
if (socket->proto == NSAPI_TCP) {
_at.cmd_start("AT+QIOPEN=");
Expand Down
8 changes: 5 additions & 3 deletions features/cellular/framework/targets/QUECTEL/M26/QUECTEL_M26_CellularStack.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,14 @@ nsapi_error_t QUECTEL_M26_CellularStack::socket_connect(nsapi_socket_t handle, c
{
CellularSocket *socket = (CellularSocket *)handle;

MBED_ASSERT(socket->id != -1);

int modem_connect_id = -1;
int request_connect_id = socket->id;
int err = -1;

int request_connect_id = find_socket_index(socket);
// assert here as its a programming error if the socket container doesn't contain
// specified handle
MBED_ASSERT(request_connect_id != -1);

_at.lock();
if (socket->proto == NSAPI_TCP) {
_at.cmd_start("AT+QIOPEN=");
Expand Down