Skip to content

Commit 4461602

Browse files
Remove band from Cinterion driver (for now, doesn't seem to be needed)
1 parent 411b91c commit 4461602

File tree

4 files changed

+10
-38
lines changed

4 files changed

+10
-38
lines changed

connectivity/cellular/include/cellular/framework/API/CellularContext.h

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,8 @@ namespace mbed {
4343

4444
/// Radio Access Technology type
4545
enum RadioAccessTechnologyType {
46-
CATM1 = 7, ///< LTE CAT-M or LTE-M
47-
CATNB = 8 ///< NB-IoT (Narrowband IoT)
48-
};
49-
50-
enum FrequencyBand {
51-
BAND_1 = 0x01,
52-
BAND_2 = 0x02,
53-
BAND_3 = 0x04,
54-
BAND_4 = 0x08,
55-
BAND_5 = 0x10,
56-
BAND_8 = 0x80,
57-
BAND_12 = 0x800,
58-
BAND_13 = 0x1000,
59-
BAND_18 = 0x20000,
60-
BAND_19 = 0x40000,
61-
BAND_20 = 0x80000,
62-
BAND_25 = 0x1000000,
63-
BAND_26 = 0x2000000,
64-
BAND_28 = 0x8000000
46+
CATM1, ///< LTE CAT-M or LTE-M
47+
CATNB ///< NB-IoT (Narrowband IoT)
6548
};
6649

6750
/// CellularContext is CellularInterface/NetworkInterface with extensions for cellular connectivity
@@ -182,7 +165,6 @@ class CellularContext : public CellularInterface {
182165
const char *pwd = 0) = 0;
183166
virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0) = 0;
184167
virtual void set_access_technology(RadioAccessTechnologyType rat = CATM1) = 0;
185-
virtual void set_band(FrequencyBand band = BAND_20) = 0;
186168
virtual bool is_connected() = 0;
187169

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

connectivity/cellular/include/cellular/framework/AT/AT_CellularContext.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ class AT_CellularContext : public CellularContext {
5656
const char *pwd = 0);
5757
virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0);
5858
virtual void set_access_technology(RadioAccessTechnologyType rat = CATM1);
59-
virtual void set_band(FrequencyBand band = BAND_20);
6059

6160
// from CellularContext
6261
virtual nsapi_error_t get_pdpcontext_params(pdpContextList_t &params_list);
@@ -157,7 +156,6 @@ class AT_CellularContext : public CellularContext {
157156
bool _is_connected;
158157
ATHandler &_at;
159158
std::optional<RadioAccessTechnologyType> _rat;
160-
std::optional<FrequencyBand> _band;
161159
};
162160

163161
/**

connectivity/cellular/source/framework/AT/AT_CellularContext.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,6 @@ void AT_CellularContext::set_access_technology(RadioAccessTechnologyType rat)
296296
_rat = rat;
297297
}
298298

299-
void AT_CellularContext::set_band(FrequencyBand band)
300-
{
301-
_band = band;
302-
}
303-
304299
// PDP Context handling
305300
void AT_CellularContext::delete_current_context()
306301
{

connectivity/drivers/cellular/GEMALTO/COMPONENT_GEMALTO_CINTERION/GEMALTO_CINTERION_CellularContext.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,24 @@ void GEMALTO_CINTERION_CellularContext::enable_access_technology()
7676
switch (*_rat)
7777
{
7878
case CATM1:
79-
_at.at_cmd_discard("^SXRAT", "=","%d", *_rat);
80-
_at.cmd_start_stop("^SCFG", "=","%s%d", "Radio/Band/CatM", *_band);
81-
_at.resp_start("^SCFG");
82-
_at.cmd_start_stop("^SCFG", "=","%s%d%d", "Radio/Band/CatNB",0,0);
79+
_at.at_cmd_discard("^SXRAT", "=","%d", 7); // 7 = CAT.M1
80+
81+
// Ensure all bands are enabled by setting ^SCFG to the bitmask of all valid bands
82+
_at.cmd_start_stop("^SCFG", "=","%s%d", "Radio/Band/CatM", "F0E189F");
8383
_at.resp_start("^SCFG");
8484
break;
8585

8686
case CATNB:
87-
_at.at_cmd_discard("^SXRAT", "=","%d", *_rat);
88-
_at.cmd_start_stop("^SCFG", "=","%s%d", "Radio/Band/CatNB", *_band);
89-
_at.resp_start("^SCFG");
90-
_at.cmd_start_stop("^SCFG", "=","%s%d%d", "Radio/Band/CatM",0,0);
87+
_at.at_cmd_discard("^SXRAT", "=","%d", 8); // 8 = CAT.NB1
88+
89+
// Ensure all bands are enabled by setting ^SCFG to the bitmask of all valid bands
90+
_at.cmd_start_stop("^SCFG", "=","%s%s", "Radio/Band/CatNB", "10000200000000");
9191
_at.resp_start("^SCFG");
9292
break;
9393

9494
default:
9595
break;
9696
}
97-
98-
_at.cmd_start_stop("^SCFG", "=", "%s%s", "Tcp/withURCs", "on");
99-
_at.resp_start("^SCFG");
10097
}
10198

10299
} /* namespace mbed */

0 commit comments

Comments
 (0)