Skip to content

Commit

Permalink
Merge pull request #452 from pennam/cellular
Browse files Browse the repository at this point in the history
Add Cellular support using Arduino Mid Carrier
  • Loading branch information
pennam authored Jun 10, 2024
2 parents 092d7ac + f9c4543 commit b93768d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
- name: arduino:mbed_portenta
libraries: |
- name: ArduinoECCX08
- name: Arduino_Cellular
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
Expand Down Expand Up @@ -211,6 +212,8 @@ jobs:
platforms: |
# Install renesas_portenta platform via Boards Manager
- name: arduino:renesas_portenta
libraries: |
- name: Arduino_Cellular
sketch-paths: |
- examples/utility/Provisioning
# UNO R4 WiFi
Expand Down
8 changes: 5 additions & 3 deletions src/utility/time/TimeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,11 @@ unsigned long TimeServiceClass::getRemoteTime()
* This is the most reliable time source and it will
* ensure a correct behaviour of the library.
*/
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
if(isTimeValid(ntp_time)) {
return ntp_time;
if(_con_hdl->getInterface() != NetworkAdapter::CELL) {
unsigned long const ntp_time = NTPUtils::getTime(_con_hdl->getUDP());
if(isTimeValid(ntp_time)) {
return ntp_time;
}
}

/* As fallback if NTP request fails try to obtain the
Expand Down

0 comments on commit b93768d

Please sign in to comment.