Skip to content

Commit 6d39939

Browse files
committed
Rebuild variants
1 parent a32c3b7 commit 6d39939

File tree

118 files changed

+5368
-210
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+5368
-210
lines changed

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/API/ATHandler.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,12 @@ class ATHandler {
356356
*/
357357
void write_hex_string(const char *str, size_t size, bool quote_string = true);
358358

359+
/** Get the error detected during read_int()
360+
*
361+
* @return the latest negative integer error got from read_int().
362+
*/
363+
int32_t get_last_read_error();
364+
359365
/** Reads as string and converts result to integer. Supports only non-negative integers.
360366
*
361367
* @return the non-negative integer or -1 in case of error.
@@ -638,6 +644,7 @@ class ATHandler {
638644
rtos::Kernel::Clock::time_point _start_time;
639645
// eventqueue event id
640646
int _event_id;
647+
int32_t _last_read_error;
641648

642649
char _cmd_buffer[MBED_CONF_CELLULAR_AT_HANDLER_BUFFER_SIZE];
643650
};

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/API/CellularContext.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
*
3030
*/
3131

32+
/* Radio Access Technology type */
33+
enum RadioAccessTechnologyType {
34+
CATM1 = 7,
35+
CATNB = 8
36+
};
37+
3238
namespace mbed {
3339

3440
/**
@@ -153,6 +159,7 @@ class CellularContext : public CellularInterface {
153159
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
154160
const char *pwd = 0) = 0;
155161
virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0) = 0;
162+
virtual void set_access_technology(RadioAccessTechnologyType rat = CATM1) = 0;
156163
virtual bool is_connected() = 0;
157164

158165
/** Same as NetworkInterface::get_default_instance()

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/API/CellularDevice.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class CellularDevice {
7373
*/
7474
static CellularDevice *get_default_instance();
7575

76+
mbed::Callback<void(void)> enableCMUXChannel = nullptr;
77+
7678
/** Return target onboard instance of CellularDevice
7779
*
7880
* @remark Mbed OS target shall override (non-weak) this function for an onboard modem.
@@ -216,6 +218,13 @@ class CellularDevice {
216218
*/
217219
virtual nsapi_error_t get_sim_state(SimState &state) = 0;
218220

221+
virtual nsapi_error_t enable_cmux() = 0;
222+
223+
224+
virtual bool is_cmux_enabled() = 0;
225+
226+
virtual void set_cmux_status_flag(bool cmux_status) = 0;
227+
219228
/** Creates a new CellularContext interface.
220229
*
221230
* @param fh file handle used in communication to modem. This can be, for example, UART handle. If null, then the default
@@ -342,6 +351,12 @@ class CellularDevice {
342351
*/
343352
virtual void set_timeout(int timeout) = 0;
344353

354+
virtual unsigned long get_time() = 0;
355+
356+
virtual unsigned long get_local_time() = 0;
357+
358+
virtual bool set_time(unsigned long const epoch, int const timezone = 0) = 0;
359+
345360

346361
public: //Common functions
347362

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/AT/AT_CellularContext.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class AT_CellularContext : public CellularContext {
4747
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
4848
const char *pwd = 0);
4949
virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0);
50+
virtual void set_access_technology(RadioAccessTechnologyType rat = CATM1);
5051

5152
// from CellularContext
5253
virtual nsapi_error_t get_pdpcontext_params(pdpContextList_t &params_list);
@@ -107,6 +108,8 @@ class AT_CellularContext : public CellularContext {
107108
* @return NIDD context text, e.g. Non-IP or NONIP
108109
*/
109110
virtual const char *get_nonip_context_type_str();
111+
virtual void enable_access_technology();
112+
virtual void set_cid(int cid);
110113

111114
private:
112115
#if NSAPI_PPP_AVAILABLE
@@ -123,7 +126,6 @@ class AT_CellularContext : public CellularContext {
123126
nsapi_error_t check_operation(nsapi_error_t err, ContextOperation op);
124127
void ciot_opt_cb(mbed::CellularNetwork::CIoT_Supported_Opt ciot_opt);
125128
virtual void do_connect_with_retry();
126-
void set_cid(int cid);
127129

128130
private:
129131
ContextOperation _current_op;
@@ -132,6 +134,7 @@ class AT_CellularContext : public CellularContext {
132134

133135
PinName _dcd_pin;
134136
bool _active_high;
137+
RadioAccessTechnologyType _rat;
135138

136139
protected:
137140
char _found_apn[MAX_APN_LENGTH];

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ class AT_CellularDevice : public CellularDevice {
8484

8585
virtual nsapi_error_t get_sim_state(SimState &state);
8686

87+
nsapi_error_t enable_cmux();
88+
89+
nsapi_error_t config_cmux();
90+
91+
void set_cmux_status_flag(bool cmux_status);
92+
93+
virtual bool is_cmux_enabled();
94+
8795
virtual CellularContext *create_context(const char *apn = NULL, bool cp_req = false, bool nonip_req = false);
8896

8997
virtual void delete_context(CellularContext *context);
@@ -98,6 +106,12 @@ class AT_CellularDevice : public CellularDevice {
98106

99107
virtual void set_timeout(int timeout);
100108

109+
virtual unsigned long get_time();
110+
111+
virtual unsigned long get_local_time();
112+
113+
virtual bool set_time(unsigned long const epoch, int const timezone = 0);
114+
101115
virtual void modem_debug_on(bool on);
102116

103117
virtual nsapi_error_t init();
@@ -184,6 +198,7 @@ class AT_CellularDevice : public CellularDevice {
184198
private:
185199
void urc_nw_deact();
186200
void urc_pdn_deact();
201+
nsapi_error_t set_authomatic_time_zone_update();
187202

188203
protected:
189204
ATHandler _at;
@@ -199,6 +214,7 @@ class AT_CellularDevice : public CellularDevice {
199214

200215
std::chrono::duration<int, std::milli> _default_timeout;
201216
bool _modem_debug_on;
217+
bool _cmux_status;
202218
const intptr_t *_property_array;
203219
};
204220

cores/arduino/mbed/connectivity/cellular/include/cellular/framework/AT/AT_CellularStack.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,6 @@ class AT_CellularStack : public NetworkStack {
8888

8989
virtual void socket_attach(nsapi_socket_t handle, void (*callback)(void *), void *data);
9090

91-
92-
nsapi_size_or_error_t socket_sendto_control(nsapi_socket_t handle, const SocketAddress &address,
93-
const void *data, nsapi_size_t size,
94-
nsapi_msghdr_t *control, nsapi_size_t control_size) override
95-
{
96-
return NSAPI_ERROR_UNSUPPORTED;
97-
}
98-
99-
nsapi_size_or_error_t socket_recvfrom_control(nsapi_socket_t handle, SocketAddress *address,
100-
void *data, nsapi_size_t size,
101-
nsapi_msghdr_t *control, nsapi_size_t control_size) override
102-
{
103-
return NSAPI_ERROR_UNSUPPORTED;
104-
}
105-
10691
protected:
10792
class CellularSocket {
10893
public:

cores/arduino/mbed/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,14 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
4444
ModuleBGS2,
4545
ModuleEMS31,
4646
ModuleEHS5E,
47+
ModuleTX62,
4748
};
4849
static Module get_module();
4950

5051
protected: // AT_CellularDevice
5152
virtual AT_CellularContext *create_context_impl(ATHandler &at, const char *apn, bool cp_req = false, bool nonip_req = false);
5253
virtual AT_CellularInformation *open_information_impl(ATHandler &at);
54+
virtual AT_CellularNetwork *open_network_impl(ATHandler &at);
5355

5456
protected:
5557
virtual nsapi_error_t init();
@@ -60,6 +62,7 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
6062
void init_module_els61();
6163
void init_module_ems31();
6264
void init_module_ehs5e();
65+
void init_module_tx62();
6366
};
6467

6568
} // namespace mbed

cores/arduino/mbed/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularContext.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ class GEMALTO_CINTERION_CellularContext: public AT_CellularContext {
2525
public:
2626
GEMALTO_CINTERION_CellularContext(ATHandler &at, CellularDevice *device, const char *apn, bool cp_req = false, bool nonip_req = false);
2727
virtual ~GEMALTO_CINTERION_CellularContext();
28+
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
29+
const char *pwd = 0);
30+
virtual bool get_context();
2831

2932
protected:
3033
#if !NSAPI_PPP_AVAILABLE
3134
virtual NetworkStack *get_stack();
3235
#endif // NSAPI_PPP_AVAILABLE
36+
virtual nsapi_error_t do_user_authentication();
3337
};
3438

3539
} /* namespace mbed */
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2018, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
#ifndef GEMALTO_CINTERION_CELLULARNETWORK_H_
18+
#define GEMALTO_CINTERION_CELLULARNETWORK_H_
19+
20+
#include "AT_CellularNetwork.h"
21+
22+
namespace mbed {
23+
24+
class GEMALTO_CINTERION_CellularNetwork: public AT_CellularNetwork {
25+
public:
26+
GEMALTO_CINTERION_CellularNetwork(ATHandler &at, AT_CellularDevice &device);
27+
virtual ~GEMALTO_CINTERION_CellularNetwork();
28+
virtual nsapi_error_t set_attach();
29+
virtual void get_context_state_command();
30+
31+
32+
protected:
33+
};
34+
35+
} /* namespace mbed */
36+
37+
#endif // GEMALTO_CINTERION_CELLULARNETWORK_H_

cores/arduino/mbed/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,21 @@ class GEMALTO_CINTERION_CellularStack : public AT_CellularStack {
5858

5959
virtual nsapi_error_t socket_connect(nsapi_socket_t handle, const SocketAddress &address);
6060

61+
#ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES
62+
virtual nsapi_error_t gethostbyname(const char *host, SocketAddress *address, nsapi_version_t version, const char *interface_name);
63+
#endif
64+
6165
private:
6266
// socket URC handlers as per Cinterion AT manuals
6367
void urc_sis();
6468
void urc_sisw();
69+
void urc_sysstart();
6570
void sisw_urc_handler(int sock_id, int urc_code);
6671
void urc_sisr();
6772
void sisr_urc_handler(int sock_id, int urc_code);
6873

74+
void urc_gnss();
75+
6976
// sockets need a connection profile, one profile is enough to support single stack sockets
7077
nsapi_error_t create_connection_profile(int connection_profile_id);
7178
void close_connection_profile(int connection_profile_id);
@@ -77,6 +84,14 @@ class GEMALTO_CINTERION_CellularStack : public AT_CellularStack {
7784
const char *_apn;
7885
const char *_user;
7986
const char *_password;
87+
bool _engine;
88+
89+
mbed::Callback<void(char*)> _gnss_cb;
90+
91+
#ifdef MBED_CONF_CELLULAR_OFFLOAD_DNS_QUERIES
92+
hostbyname_cb_t _dns_callback;
93+
nsapi_version_t _dns_version;
94+
#endif
8095
};
8196

8297
} // namespace mbed

0 commit comments

Comments
 (0)