In some multithread cases there is possibility that process_oob function
was called after ATHandler was deleted. Fix is to wait if oob processing
is ongoing.
By default CoAP will create a copy of the whole data to be passed to application and it keeps the backward compatibility.
If enabled, application must NOT free the payload when it gets the COAP_STATUS_PARSER_BLOCKWISE_MSG_RECEIVED status.
And application must call sn_coap_protocol_block_remove() instead.
This PR is to fix the issues in LwIP for AutoIP which is required for passing Bonjour Conformance Test for mDNS. Following gives the summary of the changes/fixes added.
Changes:
1. Following issues are fixed in LwIP for AutoIP.
- Fixed bug in max conflict rate limiting: According to RFC section RFC 3927 Section 2.2.1 conflict probe interval should be increased to 60 seconds, once conflict count reaches after MAX_CONFLICTS (i.e., 10) counts. The initial value of 'autoip->tried_llipaddr' is 0. Hence the probe interval (i.e., autoip->ttw) should be increased to 60 secs when 'autoip->tried_llipaddr >= MAX_CONFLICTS'
- Added code to free 'autoip' client in autoip_stop() API: New 'autoip' client is allocated in autoip_start() API, and the client is not freed during autoip_stop(). This would result in memory leak, if not freed. Updated autoip_stop() API to take care of releasing the memory allocated for 'autoip' client.
2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h" to configure DHCP timeout based on the usecase requirement. For example: bonjour conformance test would need a DHCP timeout value which is grater than 320 secs to run mDNS probing test to verify protocol compilance of the implementation.
Tested the fixes using Bonjour Conformance Test tool Version 1.5.0 for IPv4. It has successfully passed Bonjour Conformance Test.
- Reduce heap footprint by storing only single block when receiving a blockwise message.
* User is now responsible of freeing the data by calling sn_coap_protocol_block_remove() and must not free the payload separately.
- Bug fix: Request blockwise transfer if incoming payload length is too large and when it comes without block indication.
When flashing a binary STLink won't skip writing padding which happens
to be the same value as flash's erase value. STM32L4 based targets
have an additional 8-bit of embedded ECC for each 64-bit word of data.
The initial value, when a sector is erased, for the ECC bits is 0xFF.
When you write the erase value to a given address these bits gets
modified to something different due to the ECC algoritm in use. The
visible bits are intact but difference in ECC value prevents flipping
any 1's to 0's. Only way to proceed is to erase the whole sector.
New ATHandler functions taken into use for rest of the targets (BG96 was updated initially) to reduce code size. This means basically that new functions using variadic list approach are taken into use and with those one can usually write AT commands in single line instead of multiple lines.
Only internal changes and API's are not modified.
Changes:
1. Following issues are fixed in LwIP for AutoIP.
a) Fixed bug in max conflict rate limitting.
- According to RFC section RFC 3927 Section 2.2.1 conflict probe interval
should be increased to 60 seconds, once conflict count reaches after
MAX_CONFLICTS (i.e., 10) counts.
- The initial value of 'autoip->tried_llipaddr' is 0. Hence the probe
interval (i.e., autoip->ttw) should be increased to 60 secs
when 'autoip->tried_llipaddr >= MAX_CONFLICTS'
b) Added code to free 'autoip' client in autoip_stop() API.
- New 'autoip' client is allocated in autoip_start() API, and the client
is not freed during autoip_stop(). This would result in memory leak
if not freed.
- Updated autoip_stop() API to take care of releasing the memory allocated
for 'autoip' client.
2. Introduced a configurable macro "MBED_CONF_LWIP_DHCP_TIMEOUT" in "lwipopts.h"
to configure DHCP timeout based on the usecase requirement. For example:
bonjour conformance test would need a DHCP timeout value which is grater than
320 secs to run mDNS probing test to verify protocol compilance of the implementation.
The default computation assumes that a flash sector is several times
larger than a flash page. On PSoC 6 targets this is not the case
(the two values are the same) so the computed size is too small.
This could cause incomplete data retrieval and mismatch when reading
data in more than one chunk, because every chunk would be read to the
same location at the beginning of the output buffer.
IAR compilation fails at `_fs = { 0 };` due to
```
[Error] FATFileSystem.cpp@285,0: [Pe029]: expected an expression
```
Changing that object initializer list instead, as that seems
to pass IAR compilation, too.
Changed original memset to object initialiser list based on review
feedback from Kevin Bracey.
We'll use the new ARM-software/psa-arch-tests directly instead for PSA
Crypto API 1.0b3. This commit removes the crypto compliance tests only
for now, leaving attestation and storage tests.
This allows to specify which hal version to use for each family.
It can also be used to modify the thread stack size.
Signed-off-by: Vincent Veron <vincent.veron@st.com>
- Store ACK's also into duplicate info list.
- ROM size optimization. Flash size has gone down ~1100 bytes.
**Closed issues:**
- IOTCLT-3592 - Client does not handle Duplicate ACK messages during blockwise registration correctly
This port is based on :
* CurryGuy ethernet branch :
https://github.com/CurryGuy/mbed-os/tree/feature-stm32h7-emac
* STM32 Cube example :
Applications/LwIP/LwIP_HTTP_Server_Netconn_RTOS example
Signed-off-by: Vincent Veron <vincent.veron@st.com>
To compile Mbed Bootloader with bare metal profile certain defines are
not added anymore automatically. Because of this checks for those
defines needed to be introduced.
Corrected PPP thread stack size for RZ_A1_EMAC, CYW943012P6EVB_01,
CY8CPROTO_062_4343W, CY8CKIT_062_WIFI_BT and CY8CKIT_062S2_43012
that have special configuration for PPP thread size. Removed
pppInterface() helper call from network interface. It causes binary
compatibility break with precompiled network interface classes. Call
is helper function to check network interface type in case it is
unknown, and is not mandatory or used with PPP.
If PPP interface is the lwIP default interface, adds the PPP DNS
servers to default DNS server storage. If PPP is not default
interface, then adds DNS servers to interface specific storage.
Created (a new) PPP interface for PPP service. Removed lwip
dependencies to PPP (memory allocations etc.). Moved PPP
configuration options away from lwIP mbed_lib.json to new
PPP service. For backwards compatibility, using the old
options is also currently supported.
PPP service encapsulates the PPP protocol. PPP interface can be used as
helper class to bind PPP protocol with network stack (similar to
EMAC and L3IP interface). Added PPP interface to onboard network
stack class.
Created PPP service class that encapsulates the PPP protocol.
Class is similar to EMAC and L3IP classes with additional methods
to read IP and DNS server addresses negotiation using PPP and
to set PPP specific parameters (file handle for modem access etc.).
PPP service can use on its own thread or in run in mbed os event
Queue thread.
Added ppp_nsapi.cpp module that implements the nsapi_ppp.h
services.
Added ppp_nsapi.cpp module that implements the nsapi_ppp.h
services.
When AT+CGML is used to retrieve list of SMS stored in modem inbox,
every message has an associated index. ETSI TS 127 005 v7.0.0 does not
specify what is the allowed range of such indices - all it says is
"integer type; value in the range of location numbers supported by the
associated memory".
Usually, AT modems use positive indexes (starting at 1). Quectel BG96
modem takes a different approach, indexing messages starting at 0.
Current implementation of `AT_CellularSMS::list_messages()` considers
index 0 invalid and ignores such message, effectively making it
impossible to access using mbed-os API.
This commit changes the behavior so that value of 0 is handled as any
other positive message index.
Currently, create_pdu receives a destination address without '+' prefix,
and always sets the "type of address" to "unknown". That means, the
number needs to contain appropriate international number prefix (00/011)
if necessary - which is not the case if the leading + is simply
stripped.
This changes send_sms behavior so that when a SMS is sent to an
international number (indicated by leading +):
- AT+CMGS command receives the number with + prefix,
- created PDU has the "international" flag set.
This prevents RX2 window to be enabled at the same time when repeating
transmission, when QoS repeated TX is in effect. Failure to do so
seems to place the LoRaWAN stack in a state where send() always fails
with WOULD_BLOCK error.
The portable and correct way to include Mbed TLS header files is
"mbedtls/someheader.h". It's Mbed OS specific, unecessary, and incorrect
to use "mbedtls/inc/mbedtls/someheader.h".
Thus far the default position has been after the application plus two
spare sectors. For simplicity and to have a predictable location for the
TDBStore with the default configuration the location is now switched to
the end of the flash. Two last sectors to be exact.
CellularContext now tries to get an IP address after connect and before
sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from
the modem we will send NSAPI_STATUS_GLOBAL_UP and return success.
Modem has an ip address but for some reason some modems don't
give it to us.
Macro which restricted compilation to GCC_ARM is removed.
Existing read_write() test is amended to call stat() and check that correct size is returned.
AT commands used in read_radio_technology() function are not supported
by all boards so moving the function where it's actually used. Usage was
already inside of the #ifdef's.
If delete fails there is nothing we or application can do. There is no point
returning an error for this. This affects to AT_CellularContext::disconnect
not returning an error if context delete fails.
* Modify Doxygen grouping of `drivers` Public/Internal APIs
* Correct classification of `mbed_events.h`
* Amend name of Doxygen group containing Device Key API
* Classify `CallChain.h` as public API and relocate file
* Remove Doxygen group from `equeue_platform.h` as it has no Doxygen compliant documentation
* Move USB target specific code back to `usb/device/targets`
* Fix rtos include path in NRFCordioHCIDriver
* Flatten USB driver directory structure
* Add missing include for us_ticker
* Add more missing includes for us_ticker
* Fix mbed_hal_fpga_ci_test_shield/uart test
* Fix bare-metal build
* Fix Watchdog UNITTEST
* Fix Mbed OS 2 build for Public/Internal headers relocating
Separate drivers, events, and rtos internal APIs from public APIs.
* Move source files to source subdirs
* Move internal headers to internal subdirs
* Add Doxygen comments for documenting internal and public APIs
* Remove source code from header files in order to remove include pre-processor directives
that included header files not directly used by said header files
* Explicitly include header files instead of implicit inclusions via third-party header files.
Release Notes
This will break user code that was using an internal API as the internal header files have been moved.
This will only break if the user was including the header file using a namespace (i.e #include "foo/bar.h" instead of #include "bar.h"