From 070a412432d736cfaca2b32153c11b366f10a2bb Mon Sep 17 00:00:00 2001 From: Desmond Chen Date: Mon, 4 Mar 2019 11:08:15 +0800 Subject: [PATCH 01/10] BLE:Cordio:insert_descriptor check r/w properties --- .../targets/TARGET_CORDIO/source/CordioGattServer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp index 0b4bb8a82d..89f46fbfe4 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/source/CordioGattServer.cpp @@ -488,6 +488,10 @@ ble_error_t GattServer::insert_descriptor( #endif // BLE_FEATURE_SECURE_CONNECTIONS #endif // BLE_FEATURE_SECURITY } + + if (properties & READ_PROPERTY) { + attribute_it->settings |= ATTS_SET_READ_CBACK; + } } // configure write permission @@ -517,6 +521,10 @@ ble_error_t GattServer::insert_descriptor( #endif // BLE_FEATURE_SECURE_CONNECTIONS #endif // BLE_FEATURE_SECURITY } + + if (properties & WRITABLE_PROPERTIES) { + attribute_it->settings |= ATTS_SET_WRITE_CBACK; + } } attribute_it++; From 7ec9be6a6db9fbbc83e5f6d6bffcd907b7888d17 Mon Sep 17 00:00:00 2001 From: Arto Kinnunen Date: Mon, 4 Mar 2019 10:07:31 +0200 Subject: [PATCH 02/10] Update Wi-SUN network default name --- features/nanostack/mbed-mesh-api/mbed_lib.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/nanostack/mbed-mesh-api/mbed_lib.json b/features/nanostack/mbed-mesh-api/mbed_lib.json index 4c6c61ce40..90097639c4 100644 --- a/features/nanostack/mbed-mesh-api/mbed_lib.json +++ b/features/nanostack/mbed-mesh-api/mbed_lib.json @@ -112,7 +112,7 @@ }, "wisun-network-name": { "help": "default network name for wisun network", - "value": "\"NETWORK_NAME\"" + "value": "\"Wi-SUN Network\"" }, "wisun-regulatory-domain": { "help": "Regulator domain.", From 5d04df7afc6a059245c42f3556e03ebb03f379d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Tue, 5 Mar 2019 12:19:25 +0200 Subject: [PATCH 03/10] Fix lwip to compile if MBED_CONF_LWIP_DEBUG_ENABLED is defined File features/lwipstack/lwip-sys/arch/cc.h fails to compile with error: 'MBED_NORETURN' does not name a type. Fix with adding correct include. --- features/lwipstack/lwip-sys/arch/cc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/features/lwipstack/lwip-sys/arch/cc.h b/features/lwipstack/lwip-sys/arch/cc.h index 619e144efd..2510a11cfc 100644 --- a/features/lwipstack/lwip-sys/arch/cc.h +++ b/features/lwipstack/lwip-sys/arch/cc.h @@ -34,6 +34,7 @@ #include #include /* for size_t */ +#include "mbed_toolchain.h" #if LWIP_USE_EXTERNAL_MBEDTLS #include "mbedtls/md5.h" From a830dbf47dbcaea08e28ea22b039600b49dcf4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Fri, 1 Mar 2019 14:39:55 +0200 Subject: [PATCH 04/10] Cellular: removed manual registering state. Simplified state machine by removing manual registering state. This was done as some modems did not have all the needed at commands for checking the registered network. Some modem run out of memory as when checking correct network there might be so many networks available. Manual registration still works but it does not do any checks to which network it's registered. Moved manual registering at command earlier in state machine so it forces registering to a correct network. Internal refactor/fix, does not affect applications. --- .../cellularstatemachinetest.cpp | 5 +- .../framework/AT/AT_CellularNetwork.cpp | 7 +- .../framework/device/CellularStateMachine.cpp | 162 +++++------------- .../framework/device/CellularStateMachine.h | 4 - 4 files changed, 55 insertions(+), 123 deletions(-) diff --git a/UNITTESTS/features/cellular/framework/device/cellularstatemachine/cellularstatemachinetest.cpp b/UNITTESTS/features/cellular/framework/device/cellularstatemachine/cellularstatemachinetest.cpp index 5466b72ae6..b96a20f4be 100644 --- a/UNITTESTS/features/cellular/framework/device/cellularstatemachine/cellularstatemachinetest.cpp +++ b/UNITTESTS/features/cellular/framework/device/cellularstatemachine/cellularstatemachinetest.cpp @@ -34,7 +34,6 @@ enum UT_CellularState { UT_STATE_DEVICE_READY, UT_STATE_SIM_PIN, UT_STATE_REGISTERING_NETWORK, - UT_STATE_MANUAL_REGISTERING_NETWORK, UT_STATE_ATTACHING_NETWORK, UT_STATE_MAX_FSM_STATE }; @@ -392,8 +391,8 @@ TEST_F(TestCellularStateMachine, test_run_to_state) ut.set_plmn("12345"); ASSERT_EQ(NSAPI_ERROR_OK, ut.run_to_device_registered()); (void)ut.get_current_status(current_state, target_state); - ASSERT_EQ(UT_STATE_MANUAL_REGISTERING_NETWORK, current_state); - ASSERT_EQ(UT_STATE_MANUAL_REGISTERING_NETWORK, target_state); + ASSERT_EQ(UT_STATE_REGISTERING_NETWORK, current_state); + ASSERT_EQ(UT_STATE_REGISTERING_NETWORK, target_state); ut.cellular_event_changed((nsapi_event_t)CellularRegistrationStatusChanged, (intptr_t)&data); ut.reset(); diff --git a/features/cellular/framework/AT/AT_CellularNetwork.cpp b/features/cellular/framework/AT/AT_CellularNetwork.cpp index 23b88ab992..2d9f6a39d8 100644 --- a/features/cellular/framework/AT/AT_CellularNetwork.cpp +++ b/features/cellular/framework/AT/AT_CellularNetwork.cpp @@ -171,7 +171,9 @@ void AT_CellularNetwork::read_reg_params_and_compare(RegistrationType type) reg_params._status == RegisteredRoaming)) { if (previous_registration_status == RegisteredHomeNetwork || previous_registration_status == RegisteredRoaming) { - call_network_cb(NSAPI_STATUS_DISCONNECTED); + if (type != C_REG) {// we are interested only if we drop from packet network + _connection_status_cb(NSAPI_EVENT_CONNECTION_STATUS_CHANGE, NSAPI_STATUS_DISCONNECTED); + } } } } @@ -267,6 +269,9 @@ nsapi_error_t AT_CellularNetwork::set_registration(const char *plmn) tr_debug("Manual network registration to %s", plmn); _at.cmd_start("AT+COPS=1,2,"); _at.write_string(plmn); + if (_op_act != RAT_UNKNOWN) { + _at.write_int(_op_act); + } _at.cmd_stop_read_resp(); } diff --git a/features/cellular/framework/device/CellularStateMachine.cpp b/features/cellular/framework/device/CellularStateMachine.cpp index f4ad2bef65..ad64585c20 100644 --- a/features/cellular/framework/device/CellularStateMachine.cpp +++ b/features/cellular/framework/device/CellularStateMachine.cpp @@ -48,8 +48,7 @@ CellularStateMachine::CellularStateMachine(CellularDevice &device, events::Event _cellularDevice(device), _state(STATE_INIT), _next_state(_state), _target_state(_state), _event_status_cb(0), _network(0), _queue(queue), _queue_thread(0), _sim_pin(0), _retry_count(0), _event_timeout(-1), _event_id(-1), _plmn(0), _command_success(false), - _plmn_network_found(false), _is_retry(false), _cb_data(), _current_event(NSAPI_EVENT_CONNECTION_STATUS_CHANGE), - _status(0) + _is_retry(false), _cb_data(), _current_event(NSAPI_EVENT_CONNECTION_STATUS_CHANGE), _status(0) { #if MBED_CONF_CELLULAR_RANDOM_MAX_START_DELAY == 0 _start_time = 0; @@ -83,7 +82,6 @@ void CellularStateMachine::reset() _state = STATE_INIT; _event_timeout = -1; _event_id = -1; - _plmn_network_found = false; _is_retry = false; _status = 0; _target_state = STATE_INIT; @@ -161,7 +159,20 @@ bool CellularStateMachine::open_sim() } } - return state == CellularDevice::SimStateReady; + bool sim_ready = state == CellularDevice::SimStateReady; + + if (sim_ready) { + // If plmn is set, we should it right after sim is opened so that registration is forced to correct network. + if (_plmn && strlen(_plmn)) { + _cb_data.error = _network->set_registration(_plmn); + tr_debug("STM: manual set_registration: %d, plmn: %s", _cb_data.error, _plmn); + if (_cb_data.error) { + return false; + } + } + } + + return sim_ready; } bool CellularStateMachine::is_registered() @@ -169,7 +180,9 @@ bool CellularStateMachine::is_registered() CellularNetwork::RegistrationStatus status; bool is_registered = false; - for (int type = 0; type < CellularNetwork::C_MAX; type++) { + // accept only CGREG/CEREG. CREG is for circuit switch network changed. If we accept CREG attach will fail if also + // CGREG/CEREG is not registered. + for (int type = 0; type < CellularNetwork::C_REG; type++) { if (get_network_registration((CellularNetwork::RegistrationType) type, status, is_registered)) { if (is_registered) { break; @@ -178,6 +191,11 @@ bool CellularStateMachine::is_registered() } _cb_data.status_data = status; + // in manual registering we are forcing registration to certain network so we don't accept active context or attached + // as indication that device is registered to correct network. + if (_plmn && strlen(_plmn)) { + return is_registered; + } return is_registered || _status; } @@ -249,61 +267,13 @@ void CellularStateMachine::report_failure(const char *msg) const char *CellularStateMachine::get_state_string(CellularState state) const { #if MBED_CONF_MBED_TRACE_ENABLE - static const char *strings[STATE_MAX_FSM_STATE] = { "Init", "Power", "Device ready", "SIM pin", "Registering network", "Manual registering", "Attaching network"}; + static const char *strings[STATE_MAX_FSM_STATE] = { "Init", "Power", "Device ready", "SIM pin", "Registering network", "Attaching network"}; return strings[state]; #else return NULL; #endif // #if MBED_CONF_MBED_TRACE_ENABLE } -bool CellularStateMachine::is_registered_to_plmn() -{ - int format; - CellularNetwork::operator_t op; - - _cb_data.error = _network->get_operator_params(format, op); - if (_cb_data.error == NSAPI_ERROR_OK) { - if (format == 2) { - // great, numeric format we can do comparison for that - if (strcmp(op.op_num, _plmn) == 0) { - return true; - } - return false; - } - - // format was alpha, get operator names to do the comparing - CellularNetwork::operator_names_list names_list; - _cb_data.error = _network->get_operator_names(names_list); - if (_cb_data.error == NSAPI_ERROR_OK) { - CellularNetwork::operator_names_t *op_names = names_list.get_head(); - bool found_match = false; - while (op_names) { - if (format == 0) { - if (strcmp(op.op_long, op_names->alpha) == 0) { - found_match = true; - } - } else if (format == 1) { - if (strcmp(op.op_short, op_names->alpha) == 0) { - found_match = true; - } - } - - if (found_match) { - if (strcmp(_plmn, op_names->numeric)) { - names_list.delete_all(); - return true; - } - names_list.delete_all(); - return false; - } - } - } - names_list.delete_all(); - } - - return false; -} - void CellularStateMachine::enter_to_state(CellularState state) { _next_state = state; @@ -378,6 +348,7 @@ bool CellularStateMachine::device_ready() _event_status_cb((nsapi_event_t)CellularDeviceReady, (intptr_t)&_cb_data); } _cellularDevice.set_ready_cb(0); + return true; } @@ -410,16 +381,15 @@ void CellularStateMachine::state_sim_pin() _cellularDevice.set_timeout(TIMEOUT_SIM_PIN); tr_info("Setup SIM (timeout %d s)", TIMEOUT_SIM_PIN / 1000); if (open_sim()) { - bool success = false; for (int type = 0; type < CellularNetwork::C_MAX; type++) { _cb_data.error = _network->set_registration_urc((CellularNetwork::RegistrationType)type, true); - if (!_cb_data.error) { + if (!_cb_data.error && (type == CellularNetwork::C_EREG || type == CellularNetwork::C_GREG)) { success = true; } } if (!success) { - tr_warn("Failed to set any URC's for registration"); + tr_error("Failed to set CEREG/CGREG URC's for registration"); retry_state_or_fail(); return; } @@ -428,16 +398,13 @@ void CellularStateMachine::state_sim_pin() tr_debug("Active context found."); _status |= ACTIVE_PDP_CONTEXT; } - CellularNetwork::AttachStatus status; // check if modem is already attached to a network + CellularNetwork::AttachStatus status = CellularNetwork::Detached; // check if modem is already attached to a network if (_network->get_attach(status) == NSAPI_ERROR_OK && status == CellularNetwork::Attached) { _status |= ATTACHED_TO_NETWORK; tr_debug("Cellular already attached."); } - if (_plmn) { - enter_to_state(STATE_MANUAL_REGISTERING_NETWORK); - } else { - enter_to_state(STATE_REGISTERING_NETWORK); - } + + enter_to_state(STATE_REGISTERING_NETWORK); } else { retry_state_or_fail(); } @@ -448,44 +415,25 @@ void CellularStateMachine::state_registering() _cellularDevice.set_timeout(TIMEOUT_NETWORK); tr_info("Network registration (timeout %d s)", TIMEOUT_REGISTRATION / 1000); if (is_registered()) { - _cb_data.status_data = CellularNetwork::AlreadyRegistered; + if (_cb_data.status_data != CellularNetwork::RegisteredHomeNetwork && + _cb_data.status_data != CellularNetwork::RegisteredRoaming && _status) { + // there was already activated context or attached to network, and registration status is not registered, set to already registered. + _cb_data.status_data = CellularNetwork::AlreadyRegistered; + } _cb_data.error = NSAPI_ERROR_OK; _event_status_cb(_current_event, (intptr_t)&_cb_data); // we are already registered, go to attach enter_to_state(STATE_ATTACHING_NETWORK); } else { _cellularDevice.set_timeout(TIMEOUT_REGISTRATION); - if (!_command_success) { - _cb_data.error = _network->set_registration(); + if (!_command_success && !_plmn) { // don't call set_registration twice for manual registration + _cb_data.error = _network->set_registration(_plmn); _command_success = (_cb_data.error == NSAPI_ERROR_OK); } retry_state_or_fail(); } } -// only used when _plmn is set -void CellularStateMachine::state_manual_registering_network() -{ - _cellularDevice.set_timeout(TIMEOUT_REGISTRATION); - tr_info("Manual registration %s (timeout %d s)", _plmn, TIMEOUT_REGISTRATION / 1000); - if (!_plmn_network_found) { - if (is_registered() && is_registered_to_plmn()) { - // we have to send registration changed event as network thinks that we are not registered even we have active PDP context - _cb_data.status_data = CellularNetwork::AlreadyRegistered; - _cb_data.error = NSAPI_ERROR_OK; - _event_status_cb(_current_event, (intptr_t)&_cb_data); - _plmn_network_found = true; - enter_to_state(STATE_ATTACHING_NETWORK); - } else { - if (!_command_success) { - _cb_data.error = _network->set_registration(_plmn); - _command_success = (_cb_data.error == NSAPI_ERROR_OK); - } - retry_state_or_fail(); - } - } -} - void CellularStateMachine::state_attaching() { _cellularDevice.set_timeout(TIMEOUT_CONNECT); @@ -523,13 +471,8 @@ void CellularStateMachine::continue_from_state(CellularState state) nsapi_error_t CellularStateMachine::run_to_state(CellularStateMachine::CellularState state) { _mutex.lock(); - - CellularState tmp_state = state; - if (_plmn && tmp_state == STATE_REGISTERING_NETWORK) { - tmp_state = STATE_MANUAL_REGISTERING_NETWORK; - } // call pre_event via queue so that it's in same thread and it's safe to decisions - int id = _queue.call_in(0, this, &CellularStateMachine::pre_event, tmp_state); + int id = _queue.call_in(0, this, &CellularStateMachine::pre_event, state); if (!id) { report_failure("Failed to call queue."); stop(); @@ -620,10 +563,6 @@ void CellularStateMachine::event() _current_event = (nsapi_event_t)CellularRegistrationStatusChanged; state_registering(); break; - case STATE_MANUAL_REGISTERING_NETWORK: - _current_event = (nsapi_event_t)CellularRegistrationStatusChanged; - state_manual_registering_network(); - break; case STATE_ATTACHING_NETWORK: _current_event = (nsapi_event_t)CellularAttachNetwork; state_attaching(); @@ -694,23 +633,14 @@ bool CellularStateMachine::check_is_target_reached() void CellularStateMachine::cellular_event_changed(nsapi_event_t ev, intptr_t ptr) { cell_callback_data_t *data = (cell_callback_data_t *)ptr; - if ((cellular_connection_status_t)ev == CellularRegistrationStatusChanged && - (_state == STATE_REGISTERING_NETWORK || _state == STATE_MANUAL_REGISTERING_NETWORK)) { + if ((cellular_connection_status_t)ev == CellularRegistrationStatusChanged && _state == STATE_REGISTERING_NETWORK) { // expect packet data so only these states are valid - if ((data->status_data == CellularNetwork::RegisteredHomeNetwork || data->status_data == CellularNetwork::RegisteredRoaming) && data->error == NSAPI_ERROR_OK) { - if (_plmn) { - if (is_registered_to_plmn()) { - if (!_plmn_network_found) { - _plmn_network_found = true; - _queue.cancel(_event_id); - _is_retry = false; - _event_id = -1; - if (!check_is_target_reached()) { - continue_from_state(STATE_ATTACHING_NETWORK); - } - } - } - } else { + CellularNetwork::registration_params_t reg_params; + nsapi_error_t err = _network->get_registration_params(reg_params); + + if (err == NSAPI_ERROR_OK && (reg_params._type == CellularNetwork::C_EREG || reg_params._type == CellularNetwork::C_GREG)) { + if ((data->status_data == CellularNetwork::RegisteredHomeNetwork || + data->status_data == CellularNetwork::RegisteredRoaming) && data->error == NSAPI_ERROR_OK) { _queue.cancel(_event_id); _is_retry = false; _event_id = -1; @@ -718,6 +648,8 @@ void CellularStateMachine::cellular_event_changed(nsapi_event_t ev, intptr_t ptr continue_from_state(STATE_ATTACHING_NETWORK); } } + } else { + tr_debug("creg event, discard..."); } } } diff --git a/features/cellular/framework/device/CellularStateMachine.h b/features/cellular/framework/device/CellularStateMachine.h index a2c815a6c5..f0efa16454 100644 --- a/features/cellular/framework/device/CellularStateMachine.h +++ b/features/cellular/framework/device/CellularStateMachine.h @@ -58,7 +58,6 @@ private: STATE_DEVICE_READY, STATE_SIM_PIN, STATE_REGISTERING_NETWORK, - STATE_MANUAL_REGISTERING_NETWORK, STATE_ATTACHING_NETWORK, STATE_MAX_FSM_STATE }; @@ -146,12 +145,10 @@ private: void state_device_ready(); void state_sim_pin(); void state_registering(); - void state_manual_registering_network(); void state_attaching(); void enter_to_state(CellularState state); void retry_state_or_fail(); void continue_from_state(CellularState state); - bool is_registered_to_plmn(); void report_failure(const char *msg); void event(); void device_ready_cb(); @@ -179,7 +176,6 @@ private: int _event_id; const char *_plmn; bool _command_success; - bool _plmn_network_found; bool _is_retry; cell_callback_data_t _cb_data; nsapi_event_t _current_event; From a5c6d423bc48f1adc8ba02d9dd56d615fd234abf Mon Sep 17 00:00:00 2001 From: Jan Jongboom Date: Thu, 7 Mar 2019 16:36:29 +0100 Subject: [PATCH 05/10] tsi/main.cpp is using wrong `printf` format `%` needs to be escaped as well. --- features/unsupported/tests/mbed/tsi/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/unsupported/tests/mbed/tsi/main.cpp b/features/unsupported/tests/mbed/tsi/main.cpp index f1dfa08907..83664b34cd 100644 --- a/features/unsupported/tests/mbed/tsi/main.cpp +++ b/features/unsupported/tests/mbed/tsi/main.cpp @@ -6,7 +6,7 @@ int main(void) { TSISensor tsi; while (true) { - printf("slider percentage: %f%\r\n", tsi.readPercentage()); + printf("slider percentage: %f%%\r\n", tsi.readPercentage()); printf("slider distance: %dmm\r\n", tsi.readDistance()); wait(1); led = !led; From f3614abc30b467c6dce7e86e8445e6c38dd20822 Mon Sep 17 00:00:00 2001 From: Jan Jongboom Date: Thu, 7 Mar 2019 16:47:56 +0100 Subject: [PATCH 06/10] OdinWifiInterface is calling memcpy with a null pointer --- .../sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp index 3aa33c5108..f7430c8657 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp +++ b/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F439xI/TARGET_MODULE_UBLOX_ODIN_W2/sdk/ublox-odin-w2-drivers/OdinWiFiInterface.cpp @@ -879,7 +879,7 @@ void OdinWiFiInterface::handle_user_connect(user_connect_s *user_connect) if(error_code == NSAPI_ERROR_OK) { memset(&_wlan_status_connected_info, 0, sizeof(cbWLAN_StatusConnectedInfo)); - memcpy(&_wlan_status_disconnected_info, 0, sizeof(cbWLAN_StatusDisconnectedInfo)); + memset(&_wlan_status_disconnected_info, 0, sizeof(cbWLAN_StatusDisconnectedInfo)); _state_sta = entry_wait_connect(); } From 68399d7d4eabfb62d29ae22e7868bb1a80903c98 Mon Sep 17 00:00:00 2001 From: Lin Gao Date: Thu, 7 Mar 2019 15:20:13 -0600 Subject: [PATCH 07/10] Remove intervaltree from requirements.txt for mbed-os as it contradicts pyocd requirements --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 01570b82c4..80af885abb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,6 @@ idna>=2,<2.8 pyserial>=3,<=3.4 Jinja2>=2.7.3,<=2.10 intelhex>=1.3,<=2.2.1 -intervaltree>=2,<3 mbed-ls>=1.5.1,<1.8 mbed-host-tests>=1.4.4,<1.6 mbed-greentea>=0.2.24,<1.7 From a70f0e678066ec082b1e4c715a103865066e9b22 Mon Sep 17 00:00:00 2001 From: Desmond Chen Date: Thu, 14 Mar 2019 15:41:10 +0800 Subject: [PATCH 08/10] BLE:Fix cordio reset sequence --- .../targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp index 3040d0ba0f..271ff9463a 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.cpp @@ -223,6 +223,11 @@ void CordioHCIDriver::handle_reset_sequence(uint8_t *pMsg) } break; case HCI_OPCODE_LE_WRITE_DEF_DATA_LEN: + /* send next command in sequence */ + HciReadLocalVerInfoCmd(); + break; + + case HCI_OPCODE_READ_LOCAL_VER_INFO: if (hciCoreCb.extResetSeq) { /* send first extended command */ (*hciCoreCb.extResetSeq)(pMsg, opcode); From fc97a75632aba416a22040cee3e61f236bc3c8b6 Mon Sep 17 00:00:00 2001 From: Oren Cohen Date: Sun, 3 Mar 2019 14:53:25 +0200 Subject: [PATCH 09/10] Remove #ifndef NO_GREENTEA from tests --- TESTS/mbed-crypto/sanity/main.cpp | 2 -- TESTS/mbed_hal/spm/main.cpp | 2 -- TESTS/psa/attestation/main.cpp | 2 -- TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp | 2 -- TESTS/psa/crypto_init/main.cpp | 2 -- TESTS/psa/entropy_inject/main.cpp | 2 -- TESTS/psa/its_ps/main.cpp | 2 -- TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp | 2 -- TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp | 2 -- TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp | 3 --- features/frameworks/TARGET_PSA/val_greentea.cpp | 2 -- 11 files changed, 23 deletions(-) diff --git a/TESTS/mbed-crypto/sanity/main.cpp b/TESTS/mbed-crypto/sanity/main.cpp index 051d88b2e3..d71563dbcb 100644 --- a/TESTS/mbed-crypto/sanity/main.cpp +++ b/TESTS/mbed-crypto/sanity/main.cpp @@ -438,9 +438,7 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t utest::v1::status_t test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(120, "default_auto"); -#endif return verbose_test_setup_handler(number_of_cases); } diff --git a/TESTS/mbed_hal/spm/main.cpp b/TESTS/mbed_hal/spm/main.cpp index 8d654fb599..ba73753cb8 100644 --- a/TESTS/mbed_hal/spm/main.cpp +++ b/TESTS/mbed_hal/spm/main.cpp @@ -150,9 +150,7 @@ Case cases[] = { utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(20, "default_auto"); -#endif return greentea_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/attestation/main.cpp b/TESTS/psa/attestation/main.cpp index 72a5a29019..391c0a289f 100755 --- a/TESTS/psa/attestation/main.cpp +++ b/TESTS/psa/attestation/main.cpp @@ -44,9 +44,7 @@ using namespace utest::v1; utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif return greentea_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp b/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp index 01ecfea677..c6311a8dc3 100644 --- a/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp @@ -468,9 +468,7 @@ utest::v1::status_t case_teardown_handler(const Case *const source, const size_t utest::v1::status_t test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(120, "default_auto"); -#endif return verbose_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/crypto_init/main.cpp b/TESTS/psa/crypto_init/main.cpp index b7fa4824e2..cad0258d2a 100644 --- a/TESTS/psa/crypto_init/main.cpp +++ b/TESTS/psa/crypto_init/main.cpp @@ -41,9 +41,7 @@ using namespace utest::v1; utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif return greentea_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/entropy_inject/main.cpp b/TESTS/psa/entropy_inject/main.cpp index 355312f0fc..da3898c7d9 100644 --- a/TESTS/psa/entropy_inject/main.cpp +++ b/TESTS/psa/entropy_inject/main.cpp @@ -92,9 +92,7 @@ void run_entropy_inject_with_crypto_init() utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif /* fill seed in some data */ for (size_t i = 0; i < sizeof(seed); ++i) { diff --git a/TESTS/psa/its_ps/main.cpp b/TESTS/psa/its_ps/main.cpp index b78507487e..38ab54fddb 100644 --- a/TESTS/psa/its_ps/main.cpp +++ b/TESTS/psa/its_ps/main.cpp @@ -184,9 +184,7 @@ Case cases[] = { utest::v1::status_t greentea_test_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif return greentea_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp index f5e62328f4..aad62cbd1c 100644 --- a/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp @@ -475,9 +475,7 @@ Case cases[] = { utest::v1::status_t test_setup(const size_t number_of_cases) { // Setup Greentea using a reasonable timeout in seconds -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif return verbose_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp index e225e6fd10..1877e1059e 100644 --- a/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp @@ -213,9 +213,7 @@ utest::v1::status_t spm_setup(const size_t number_of_cases) error("Could not open a connection with SERVER_TESTS_PART1_CONTROL ROT_SRV"); } -#ifndef NO_GREENTEA GREENTEA_SETUP(60, "default_auto"); -#endif return greentea_test_setup_handler(number_of_cases); } diff --git a/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp index 2ab94f32ac..49dac6e3c2 100644 --- a/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp @@ -74,10 +74,7 @@ void example_main(void) utest::v1::status_t greentea_setup(const size_t number_of_cases) { -#ifndef NO_GREENTEA GREENTEA_SETUP(20, "default_auto"); -#endif - // Call the default reporting function return greentea_test_setup_handler(number_of_cases); } diff --git a/features/frameworks/TARGET_PSA/val_greentea.cpp b/features/frameworks/TARGET_PSA/val_greentea.cpp index 3ff074c2b6..6498c9b6ee 100644 --- a/features/frameworks/TARGET_PSA/val_greentea.cpp +++ b/features/frameworks/TARGET_PSA/val_greentea.cpp @@ -20,9 +20,7 @@ void mbed_val_test_init(uint32_t test_num, char8_t *desc, uint32_t test_bitfield mbed_val_print(PRINT_ALWAYS, "\nTEST: %d | DESCRIPTION: ", test_num); mbed_val_print(PRINT_ALWAYS, desc, 0); -#ifndef NO_GREENTEA GREENTEA_SETUP(100, "default_auto"); -#endif mbed_val_set_status(RESULT_START(VAL_STATUS_SUCCESS)); pal_mbed_os_compliance_test_initialize(); return; From 421e8dfa2372103edb2c618ba6a6e7fe0c6e02ac Mon Sep 17 00:00:00 2001 From: arekzaluski Date: Thu, 14 Mar 2019 14:37:49 +0000 Subject: [PATCH 10/10] Remove fuzzywuzzy dependency --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 01570b82c4..7c35a07df0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,6 @@ mbed-ls>=1.5.1,<1.8 mbed-host-tests>=1.4.4,<1.6 mbed-greentea>=0.2.24,<1.7 beautifulsoup4>=4,<=4.6.3 -fuzzywuzzy>=0.11,<=0.17 pyelftools>=0.24,<=0.25 git+https://github.com/armmbed/manifest-tool.git@v1.4.6 icetea>=1.2.1,<1.3