Skip to content

Commit c05d72c

Browse files
authored
Merge pull request #6697 from ARMmbed/release-candidate
Release candidate for mbed-os-5.8.3
2 parents f9ee4e8 + ed4df0b commit c05d72c

File tree

278 files changed

+43770
-5539
lines changed

Some content is hidden

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

278 files changed

+43770
-5539
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
<!--
1313
Required
14-
Please tick only one of the following types. Do not tick more or change the layout.
14+
Please add only one X to one of the following types. Do not fill multiple types (split the pull request otherwise) or
15+
change the layout.
1516
1617
[X] Fix
1718
[ ] Refactor

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ matrix:
121121
# update status if we succeeded, compare with master if possible
122122
- |
123123
CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}')
124-
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
124+
PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
125125
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
126126
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
127127
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
@@ -193,7 +193,7 @@ matrix:
193193
# update status if we succeeded, compare with master if possible
194194
- |
195195
CURR=$(tail -n1 sizes | awk '{print $1}')
196-
PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
196+
PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \
197197
| jq -re "select(.sha != \"$TRAVIS_COMMIT\")
198198
| .statuses[] | select(.context == \"travis-ci/$NAME\").description
199199
| capture(\"code size is (?<size>[0-9]+)\").size" \

features/FEATURE_COMMON_PAL/mbed-coap/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [v4.4.2](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.4.2)
4+
**Closed issues:**
5+
- IOTCLT-2469 CoAP UDP retransmission does not work for blocks after first one for requests (Eg. registration POST)
6+
7+
-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v4.4.1...v4.4.2)
8+
39
## [v4.4.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v4.4.1)
410
**Closed issues:**
511
- IOTCLT-2539 Block wise messaging call-backs not working logically

features/FEATURE_COMMON_PAL/mbed-coap/module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mbed-coap",
3-
"version": "4.4.1",
3+
"version": "4.4.2",
44
"description": "COAP library",
55
"keywords": [
66
"coap",

features/FEATURE_COMMON_PAL/mbed-coap/source/sn_coap_protocol.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,8 +1732,17 @@ static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn
17321732
}
17331733

17341734
sn_coap_builder_2(dst_ack_packet_data_ptr, src_coap_blockwise_ack_msg_ptr, handle->sn_coap_block_data_size);
1735+
17351736
handle->sn_coap_tx_callback(dst_ack_packet_data_ptr, dst_packed_data_needed_mem, src_addr_ptr, param);
17361737

1738+
#if ENABLE_RESENDINGS
1739+
uint32_t resend_time = sn_coap_calculate_new_resend_time(handle->system_time, handle->sn_coap_resending_intervall, 0);
1740+
sn_coap_protocol_linked_list_send_msg_store(handle, src_addr_ptr,
1741+
dst_packed_data_needed_mem,
1742+
dst_ack_packet_data_ptr,
1743+
resend_time, param);
1744+
#endif
1745+
17371746
handle->sn_coap_protocol_free(dst_ack_packet_data_ptr);
17381747
dst_ack_packet_data_ptr = 0;
17391748

@@ -2053,13 +2062,13 @@ static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn
20532062
handle->sn_coap_tx_callback(dst_ack_packet_data_ptr,
20542063
dst_packed_data_needed_mem, src_addr_ptr, param);
20552064

2056-
#if ENABLE_RESENDINGS
2065+
#if ENABLE_RESENDINGS
20572066
uint32_t resend_time = sn_coap_calculate_new_resend_time(handle->system_time, handle->sn_coap_resending_intervall, 0);
20582067
sn_coap_protocol_linked_list_send_msg_store(handle, src_addr_ptr,
20592068
dst_packed_data_needed_mem,
20602069
dst_ack_packet_data_ptr,
20612070
resend_time, param);
2062-
#endif
2071+
#endif
20632072
handle->sn_coap_protocol_free(dst_ack_packet_data_ptr);
20642073
dst_ack_packet_data_ptr = 0;
20652074
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F2/TARGET_NUCLEO_F207ZG/stm32f2_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
8484
/* Disable the Ethernet global Interrupt */
8585
NVIC_DisableIRQ(ETH_IRQn);
8686
}
87-
}
87+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_ARCH_MAX/stm32f4_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
7878
/* Disable the Ethernet global Interrupt */
7979
NVIC_DisableIRQ(ETH_IRQn);
8080
}
81-
}
81+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_MTB_UBLOX_ODIN_W2/stm32f4_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,4 @@ uint8_t mbed_otp_mac_address(char *mac)
156156
memcpy(mac, _macAddr, 6);
157157

158158
return 1;
159-
}
159+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F429ZI/stm32f4_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
8484
/* Disable the Ethernet global Interrupt */
8585
NVIC_DisableIRQ(ETH_IRQn);
8686
}
87-
}
87+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F4/TARGET_NUCLEO_F439ZI/stm32f4_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
8484
/* Disable the Ethernet global Interrupt */
8585
NVIC_DisableIRQ(ETH_IRQn);
8686
}
87-
}
87+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F746ZG/stm32f7_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
8686
/* Disable the Ethernet global Interrupt */
8787
NVIC_DisableIRQ(ETH_IRQn);
8888
}
89-
}
89+
}

features/FEATURE_LWIP/lwip-interface/lwip-eth/arch/TARGET_STM/TARGET_STM32F7/TARGET_NUCLEO_F756ZG/stm32f7_eth_init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
8686
/* Disable the Ethernet global Interrupt */
8787
NVIC_DisableIRQ(ETH_IRQn);
8888
}
89-
}
89+
}

features/FEATURE_LWIP/lwip-interface/lwip_stack.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ nsapi_error_t mbed_lwip_bringup_2(bool dhcp, bool ppp, const char *ip, const cha
855855
if (lwip_blocking) {
856856
if (sys_arch_sem_wait(&lwip_netif_linked, 15000) == SYS_ARCH_TIMEOUT) {
857857
if (ppp) {
858-
ppp_lwip_disconnect();
858+
(void)ppp_lwip_disconnect();
859859
}
860860
return NSAPI_ERROR_NO_CONNECTION;
861861
}
@@ -872,7 +872,7 @@ nsapi_error_t mbed_lwip_bringup_2(bool dhcp, bool ppp, const char *ip, const cha
872872
if (!mbed_lwip_get_ip_addr(true, &lwip_netif)) {
873873
if (sys_arch_sem_wait(&lwip_netif_has_any_addr, DHCP_TIMEOUT * 1000) == SYS_ARCH_TIMEOUT) {
874874
if (ppp) {
875-
ppp_lwip_disconnect();
875+
(void)ppp_lwip_disconnect();
876876
}
877877
return NSAPI_ERROR_DHCP_FAILURE;
878878
}
@@ -1135,7 +1135,7 @@ static nsapi_error_t mbed_lwip_socket_bind(nsapi_stack_t *stack, nsapi_socket_t
11351135
return NSAPI_ERROR_PARAMETER;
11361136
}
11371137

1138-
if (!ip_addr_isany(&ip_addr) && !mbed_lwip_is_local_addr(&ip_addr)) {
1138+
if (!ip_addr_isany_val(ip_addr) && !mbed_lwip_is_local_addr(&ip_addr)) {
11391139
return NSAPI_ERROR_PARAMETER;
11401140
}
11411141

features/cellular/UNITTESTS/at/athandler/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ TEST_SRC_FILES = \
2020
../../stubs/mbed_poll_stub.cpp \
2121
../../stubs/Timer_stub.cpp \
2222
../../stubs/equeue_stub.cpp \
23+
../../stubs/Kernel.cpp \
2324

2425
include ../../MakefileWorker.mk
2526

features/cellular/UNITTESTS/stubs/ATHandler_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ device_err_t ATHandler_stub::device_err_value;
4242
Callback<void()> ATHandler_stub::callback = NULL;
4343
uint8_t ATHandler_stub::resp_info_true_counter = false;
4444

45-
ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter) :
45+
ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter, uint16_t send_delay) :
4646
_nextATHandler(0),
4747
_fileHandle(fh),
4848
_queue(queue)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) , 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+
#include "Kernel.h"
18+
19+
namespace rtos {
20+
21+
uint64_t Kernel::get_ms_count()
22+
{
23+
return 20;
24+
}
25+
}

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#ifdef MBED_CONF_RTOS_PRESENT
2525
#include "rtos/Thread.h"
2626
#endif
27+
#include "Kernel.h"
2728

2829
using namespace mbed;
2930
using namespace events;
@@ -58,7 +59,7 @@ static const uint8_t map_3gpp_errors[][2] = {
5859
{ 146, 46 }, { 178, 65 }, { 179, 66 }, { 180, 48 }, { 181, 83 }, { 171, 49 },
5960
};
6061

61-
ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter) :
62+
ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter, uint16_t send_delay) :
6263
_nextATHandler(0),
6364
_fileHandle(fh),
6465
_queue(queue),
@@ -68,6 +69,8 @@ ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char
6869
_oobs(NULL),
6970
_at_timeout(timeout),
7071
_previous_at_timeout(timeout),
72+
_at_send_delay(send_delay),
73+
_last_response_stop(0),
7174
_fh_sigio_set(false),
7275
_processing(false),
7376
_ref_count(1),
@@ -893,6 +896,8 @@ void ATHandler::resp_stop()
893896
set_tag(&_resp_stop, OK);
894897
// Reset info resp prefix
895898
memset(_info_resp_prefix, 0, sizeof(_info_resp_prefix));
899+
900+
_last_response_stop = rtos::Kernel::get_ms_count();
896901
}
897902

898903
void ATHandler::information_response_stop()
@@ -936,8 +941,21 @@ const char* ATHandler::mem_str(const char* dest, size_t dest_len, const char* sr
936941

937942
void ATHandler::cmd_start(const char* cmd)
938943
{
944+
945+
if (_at_send_delay) {
946+
uint64_t current_time = rtos::Kernel::get_ms_count();
947+
uint64_t time_difference = current_time - _last_response_stop;
948+
949+
if (time_difference < (uint64_t)_at_send_delay) {
950+
wait_ms((uint64_t)_at_send_delay - time_difference);
951+
tr_debug("AT wait %llu %llu", current_time, _last_response_stop);
952+
}
953+
}
954+
939955
tr_debug("AT> %s", cmd);
940956

957+
958+
941959
if (_last_err != NSAPI_ERROR_OK) {
942960
return;
943961
}

features/cellular/framework/AT/ATHandler.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ class ATHandler
7474
* @param queue Event queue used to transfer sigio events to this thread
7575
* @param timeout Timeout when reading for AT response
7676
* @param output_delimiter delimiter used when parsing at responses, "\r" should be used as output_delimiter
77+
* @param send_delay the minimum delay in ms between the end of last response and the beginning of a new command
7778
*/
78-
ATHandler(FileHandle *fh, events::EventQueue &queue, int timeout, const char *output_delimiter);
79+
ATHandler(FileHandle *fh, events::EventQueue &queue, int timeout, const char *output_delimiter, uint16_t send_delay = 0);
7980
~ATHandler();
8081

8182
/** Return used file handle.
@@ -196,6 +197,9 @@ class ATHandler
196197
uint32_t _at_timeout;
197198
uint32_t _previous_at_timeout;
198199

200+
uint16_t _at_send_delay;
201+
uint64_t _last_response_stop;
202+
199203
bool _fh_sigio_set;
200204

201205
bool _processing;

features/cellular/framework/AT/AT_CellularDevice.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ ATHandler* AT_CellularDevice::get_at_handler(FileHandle *fileHandle)
6060
atHandler = atHandler->_nextATHandler;
6161
}
6262

63-
atHandler = new ATHandler(fileHandle, _queue, _default_timeout, "\r");
63+
atHandler = new ATHandler(fileHandle, _queue, _default_timeout, "\r", get_send_delay());
6464
if (atHandler) {
6565
if (_modem_debug_on) {
6666
atHandler->enable_debug(_modem_debug_on);
@@ -225,6 +225,11 @@ void AT_CellularDevice::set_timeout(int timeout)
225225
}
226226
}
227227

228+
uint16_t AT_CellularDevice::get_send_delay()
229+
{
230+
return 0;
231+
}
232+
228233
void AT_CellularDevice::modem_debug_on(bool on)
229234
{
230235
_modem_debug_on = on;

features/cellular/framework/AT/AT_CellularDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ class AT_CellularDevice : public CellularDevice
7777

7878
virtual void set_timeout(int timeout);
7979

80+
virtual uint16_t get_send_delay();
81+
8082
virtual void modem_debug_on(bool on);
8183

8284
virtual NetworkStack *get_stack();

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,9 @@ CellularNetwork *TELIT_HE910::open_network(FileHandle *fh)
5858
}
5959
return _network;
6060
}
61+
62+
uint16_t TELIT_HE910::get_send_delay()
63+
{
64+
return DEFAULT_DELAY_BETWEEN_AT_COMMANDS;
65+
}
66+

features/cellular/framework/targets/TELIT/HE910/TELIT_HE910.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
#include "AT_CellularDevice.h"
2222

23+
//the delay between sending AT commands
24+
#define DEFAULT_DELAY_BETWEEN_AT_COMMANDS 20
25+
2326
namespace mbed {
2427

2528
class TELIT_HE910 : public AT_CellularDevice
@@ -32,6 +35,7 @@ class TELIT_HE910 : public AT_CellularDevice
3235
public: // from CellularDevice
3336
virtual CellularPower *open_power(FileHandle *fh);
3437
virtual CellularNetwork *open_network(FileHandle *fh);
38+
virtual uint16_t get_send_delay();
3539
};
3640
} // namespace mbed
3741
#endif /* CELLULAR_TARGETS_TELIT_HE910_TELIT_HE910_H_ */

0 commit comments

Comments
 (0)