Skip to content

Add TLS support to Portenta CAT.M1/NB IoT GNSS Shield #759

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 20 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
GSM: add isConnected() method
  • Loading branch information
pennam committed Nov 13, 2023
commit 984b4fd2f353e4e4f2ca0f56ae2b56669e63bf1f
9 changes: 9 additions & 0 deletions libraries/GSM/src/GSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ bool arduino::GSMClass::setTime(unsigned long const epoch, int const timezone)
return _device->set_time(epoch, timezone);
}

bool arduino::GSMClass::isConnected()
{
if (_context) {
return _context->is_connected();
} else {
return false;
}
}

static PlatformMutex trace_mutex;

static void trace_wait()
Expand Down
1 change: 1 addition & 0 deletions libraries/GSM/src/GSM.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class GSMClass : public MbedSocketClass {
int ping(const char* hostname, uint8_t ttl = 128);
int ping(const String& hostname, uint8_t ttl = 128);
int ping(IPAddress host, uint8_t ttl = 128);
bool isConnected();

friend class GSMClient;
friend class GSMUDP;
Expand Down