- Improve detailed description of the class.
- Add undefined params tparams and return documentation.
- Add pre and postcondition when valuable.
- Put the elements of the file in the ble.common group.
We currently set the lwIP pbuf pool size small - to 5 x 576-byte
buffers.
This is insufficient to hold a single DTLS handshake flight, so can
cause cloud client connections to fail. STM-based platforms are failing
handshake because of this. (K64F works because it doesn't use the pbuf
pool for reception, but lwIP does recommend drivers use the pbuf pool).
Not changing the default memory sizes here, as intended for a patch
release, but adding mbed configuration options to allow the numbers to
be adjusted for memory tuning in an application.
In a future minor revision, I would recommend increasing the default
PBUF_POOL_SIZE - we are well below lwIP's out-of-the-box default - and
offsetting by a reduction in MEM_SIZE for the drivers that don't use
PBUF_RAM.
The constructor doc incorrectly suggested that only short (16-bit)
UUIDs were accepted. The same doc also referred to properties
instead of characteristics. (And to "value length", which seemed to
be completely out of place in the context of the current code.)
Target of LPC1769 links to mbed LPC1768.
The PinNames.h has conditional compile for the pin names.
LWIP lpc17xx emac driver modified to allow LPC1769 target
This changes introduce a platform adaptation over ATT/GATT that can be implemented by porter.
Unlike the GattClient interface, the ATT/GATT adaptation is simple, follow closely the Bluetooth specification and won't change over time.
Implementation of the GattClient interface is realized by the class GenericGattClient which accept in input a pal::GattClient.
This change will also free design space once adopted by partners, addition to the GattClient interface won't require partner support.
From C++11 and beyond string literals must be seperated by space
so that they are recongizable as seperate tokens.
Context macro in PPPCellularInterface (CTX) has been causing issues
as it was not augmented with a space from a nearby string literal.
STM32F439xI-family MD5, SHA1 and SHA256 hardware acceleration
occasionally produces incorrect output (#5079).
Don't enable MD5, SHA1 and SHA256 HW acceleration on STM32F439xI-family
targets by default until issue #5079 is fixed.
Cellular example had build issues with IAR8, combination of define and string
as argument to send function resulted in above error. Typecasting to const char *
didn't help, hence replacing the define explicitly.
Commit f602c936 incorrectly started defining LWIP_DEBUG as either 0 or
1.
lwipopts.h locally was changed to use #if, but all existing users
continued to use #ifdef. Therefore defining it to 0 was accidentally
enabling it for quite a few users.
This would have pulled in some unwanted lwIP code, and affected some
drivers, eg k64f_emac.c allocating an extra 2K of stack.
Correct lwipopts.h to either define it as 1 or leave it undefined, and
change the #if tests back to #ifdef, so all are consistent.
When building with VisualGDB the compilation fails due to the lack of required include files Dir.h and File.h.
Compiler report:
1>------ Build started: Project: exported-mbed-STM32F429-nucleo, Configuration: Debug VisualGDB ------
1> FileSystem.cpp
1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::File>':
1> mbed-os\features\filesystem\FileSystem.cpp(141,19): note : required from here
1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error : invalid use of incomplete type 'class mbed::File'
1> class Managed : public F {
1> ^~~~~~~
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File'
1> class File;
1> ^~~~
1> mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::FileHandle**, const char*, int)':
1>mbed-os\features\filesystem\FileSystem.cpp(141,19): error : cannot convert 'Managed<mbed::File>*' to 'mbed::File*' in initialization
1> File *f = new Managed<File>;
1> ^~~~~~~~~~~~~
1>mbed-os\features\filesystem\FileSystem.cpp(142,16): error : invalid use of incomplete type 'class mbed::File'
1> int err = f->open(this, path, flags);
1> ^~
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File'
1> class File;
1> ^~~~
1>mbed-os\features\filesystem\FileSystem.cpp(144,16): warning : possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
1> delete f;
1> ^
1>mbed-os\features\filesystem\FileSystem.cpp(141,11): warning : 'f' has incomplete type
1> File *f = new Managed<File>;
1> ^
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(39,7): note : forward declaration of 'class mbed::File'
1> class File;
1> ^~~~
1> mbed-os\features\filesystem\FileSystem.cpp(144,16): note : neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
1> delete f;
1> ^
1>mbed-os\features\filesystem\FileSystem.cpp(148,13): error : cannot convert 'mbed::File*' to 'mbed::FileHandle*' in assignment
1> *file = f;
1> ^
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(39,7): note : class type 'mbed::File' is incomplete
1> class File;
1> ^~~~
1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'class Managed<mbed::Dir>':
1> mbed-os\features\filesystem\FileSystem.cpp(153,18): note : required from here
1>mbed-os\features\filesystem\FileSystem.cpp(130,7): error : invalid use of incomplete type 'class mbed::Dir'
1> class Managed : public F {
1> ^~~~~~~
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir'
1> class Dir;
1> ^~~
1> mbed-os/features/filesystem/FileSystem.cpp: In member function 'virtual int mbed::FileSystem::open(mbed::DirHandle**, const char*)':
1>mbed-os\features\filesystem\FileSystem.cpp(153,18): error : cannot convert 'Managed<mbed::Dir>*' to 'mbed::Dir*' in initialization
1> Dir *d = new Managed<Dir>;
1> ^~~~~~~~~~~~
1>mbed-os\features\filesystem\FileSystem.cpp(154,16): error : invalid use of incomplete type 'class mbed::Dir'
1> int err = d->open(this, path);
1> ^~
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir'
1> class Dir;
1> ^~~
1>mbed-os\features\filesystem\FileSystem.cpp(156,16): warning : possible problem detected in invocation of delete operator: [-Wdelete-incomplete]
1> delete d;
1> ^
1>mbed-os\features\filesystem\FileSystem.cpp(153,10): warning : 'd' has incomplete type
1> Dir *d = new Managed<Dir>;
1> ^
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(38,7): note : forward declaration of 'class mbed::Dir'
1> class Dir;
1> ^~~
1> mbed-os\features\filesystem\FileSystem.cpp(156,16): note : neither the destructor nor the class-specific operator delete will be called, even if they are declared when the class is defined
1> delete d;
1> ^
1>mbed-os\features\filesystem\FileSystem.cpp(160,12): error : cannot convert 'mbed::Dir*' to 'mbed::DirHandle*' in assignment
1> *dir = d;
1> ^
1> mbed-os\features\filesystem\FileSystem.cpp(18):
1> mbed-os\features\filesystem\FileSystem.h(38,7): note : class type 'mbed::Dir' is incomplete
1> class Dir;
1> ^~~
1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::Dir]':
1> mbed-os\features\filesystem\FileSystem.cpp(162,1): note : required from here
1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error : incomplete type 'mbed::Dir' used in nested name specifier
1> int err = F::close();
1> ~~~~~~~~^~
1> mbed-os/features/filesystem/FileSystem.cpp: In instantiation of 'int Managed<F>::close() [with F = mbed::File]':
1> mbed-os\features\filesystem\FileSystem.cpp(162,1): note : required from here
1>mbed-os\features\filesystem\FileSystem.cpp(133,27): error : incomplete type 'mbed::File' used in nested name specifier
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If only buffer-full events and LF characters trigger the flush of
the send buffer then only line-based communication can be
implemented over the BLE UART Service. This patch extends the
service API by adding an explicit `flush` method to force sending
the buffer contents, thus enabling protocols with short (e.g.,
single character) messages.
Enable the compile-time option MBEDTLS_AES_ROM_TABLES in the mbed TLS
main config.h file in mbed OS. This option has the effect of labelling
the AES tables as 'const' so they are placed in ROM, which saves some
RAM space.
d65b6b0 Update unittests for nsdynmemlib API change (#71)
bc69b8b Disable CoAP duplicate message detection (#69)
ccb65f8 Change year 2017 to copyright (#68)
76490a7 Add option to join COAP multicast group (#67)
381d910 Register to multicast groups (#66)
dce323c Add transaction delete to CoAP service (#65)
feea33e Add option to select used socket interface (#63)
5a5c0f9 Merge pull request #62 from ARMmbed/coap_separation
0d26c00 Modifying file headers and Makefile to adapt from libcoap to mbed-coap
d323c3a Fixing unit tests based on new coap library
d1a3d25 Modifying Makefile and source file based on new coap library
git-subtree-dir: features/nanostack/FEATURE_NANOSTACK/coap-service
git-subtree-split: d65b6b0eb890be93f667debe8da83aa498021ccf
Merged lwip 2.0.2 stable path 1 from https://github.com/ARMmbed/lwip
Patch allows lwip to do autonomous address configuration for prefixes
that are not on-link.
ad7cf16 Add David's IPv6 improvements to CHANGELOG
af9d783 Fix (bogus) MSVC 2010 warning about uninitialized variable usage in ip6.c It's wrong because the variables are initialized during first loop iteration due to best_addr == NULL
68358d7 nd6: cull destination cache on router removal
7323fa1 nd6: some work on basic RFC 4861 compliance
10eb2ca ip6: improve source address selection
6c06ecd ip6/nd6: route using on-link prefixes, not addresses
9f1714d nd6: improve router selection
2486b41 netif: more ip6 state changes invoke status callback
519d809 nd6: fix Duplicate Address Detection
9f3c6dd nd6: check link status before sending packets
8c761a2 nd6: improve address autoconfiguration support
Some block devices (for example I2C EEPROM) can be erased at the byte
level. These aren't really block devices, but fall under the block
device API. For these devices, the fat filesystem needs to use a lower
bound on the block size. In this case we used 512 bytes is used since
it is already a standard.
This function provides a shortcut to reformatting a mounted filesystem.
Also, since this function is a virtual member of the FileSystem class,
the user does not need to know the underlying filesystem to reformat
the underlying storage.
Fixes errors reported in Github
- #4798
- Fixed Lwm2m blockwise data transfer (using Block1 option) with Leshan
- ARMmbed/mbed-client#512
- Fixed an ongoing blocktransfer (Block 1 option) interruption by out of order Block to return error 4.08 Request Entity Incomplete as specified in the coap specification.
- ARMmbed/mbed-client#511
- Fixed detected duplicate message duplications will not stop mbed-client
Some devices have RAM memory split into two sections.
This becames a problem for GCC based toolchains as they don't
support splitting .bss or .data sections into two memory parts.
When we run out of memory from .bss sections, allocating the stack
by malloc() allows it to be moved to .data section which might already
be in the second memory section. For example KW24D platform.
* Use _C flags at compile time in SHA to avoid compiling in unconfigured features
* Don't define ECP_SHORTWEIERSTRASS since it is part of the application's configuration
MAX32630FTHR gets BLE, uses timer peripheral 5 for HCI timing
libexactLE update for 610,620
Fixup hal_sleep and hal_deepsleep for 620
LEDn outputs now forced to open-drain
Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning
Warning #1-D: last line of file ends without a newline
- New line added at the end of file
Warning #997-D:
function "MeshInterfaceNanostack::initialize(NanostackPhy *)" is hidden
by "ThreadInterface::initialize" -- virtual function override intended?
- virtual keyword removed from "MeshInterfaceNanostack::initialize"
Warning #1300-D: inherits implicit virtual
- Adding the virtual keyword in the derived class prevents the warning
PPP is running close to the edge of its default thread stack size of 512 bytes. When it experiences an FCS error on the incoming data (for example. caused by character loss when the incoming serial rate is too high for it to process in time) it performs some additional work which overruns the thread's stack, hitting the OS "stack underflow" check. Increasing the PPP stack size to 768 bytes resolves this problem.
This is only an issue when multiple fatfss are used simultaneously.
Repeated use of a single fatfs instance (even with different storages)
do not show this issue.
Full support requires path prefixes being applied for every function
that takes a path. Note: this is only required filesystems after the
first mounted filesystem. The first filesystem has no penalty.
Device needs to wait for connectivity:
-routers will create new network and get local connectivity
-end device will get connectivity once attached to existing network
-devices without network settings gets connectivity once
commissioned and attached to network
Signed-off-by: Kari <kari.haapalehto@arm.com>
Unlike the other disk_ioctl options, GET_SECTOR_SIZE is interpreted
as a 16-bit WORD, instead of a 32-bit DWORD. This caused an unaligned
access error on M0 platforms.
At some point the "mount" parameter for "f_mount" was name "force". This
led to a bit of confusion that ended with the default mount function
never calling block device init.
This is fine, since the block device can be manually initialized, but
a better user experience is where the filesystem initializes the block
device for the user.
This is backwards compatible due to the repeatability of the block
device init functions.
A message of "Failed to close socket" was always being printed, not
just when the socket failed to close. This patch fixes this in
addition to a simplifying the call to a thread safe printf.
The function _eth_arch_low_level_input() is meant to pass data into
LWIP and to prepare the ethernet buffers to receive more data.
If the LWIP heap is empty and the call to pbuf_alloc() in
_eth_arch_low_level_input returns null, the ethernet receive buffers
are not updated to receive data. Because of this the ethernet RX
interrupt will not fire. Since the RX interrupt is the only thing that
triggers a call to _eth_arch_low_level_input(), the receive buffers
will never get cleared, and the device stops receiving data.
To prevent this from happening, this patch ensures that the function
_eth_arch_low_level_input() clears the receive buffers even if a new
pbuf for the data couldn't be allocated.
This issue can be reproduce by running the test
"features-feature_lwip-tests-mbedmicro-net-udp_echo_parallel"
and on the same machine running the below python script to flood the
device with UDP broadcast packets:
MY_IP = #ADD your local IP here
from socket import *
s = socket(AF_INET, SOCK_DGRAM)
s.bind((MY_IP, 1234))
s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
s.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
for _ in range(1000):
s.sendto("test data", ('255.255.255.255', 1234))
print("Message sent")
lwipopts_conf.h is used by target dependent Ethernet drivers for
configuring various parameters.
By default, Ethernet is enabled and in this case lwipopts_conf.h
will be included.
In case of PPP being enabled, it is desirable to not pull in any Ethernet
related code.
This creates a macro for the UUID length used by Greentea. This cuts
down on the use of "magic numbers" in test cases that use
the GREENTEA_SETUP_UUID function.
This is a workaround for IAR's lack of flexibility with memory regions.
Otherwise these tests would use very little heap and be mostly global
allocations.
This matches the timeout used in linux:
https://linux.die.net/man/5/dhclient.conf
This resolves several issues noticed during testing when we
have a very large number of devices that try to get an IP address
around the same time.
Before, the UDP test was very strict on the number of packets it would
try to match before failing. Now it will keep trying for the whole test
to get enough passing packets. It also includes the test's UUID so you
can validate which packets are being received.
The dtls test already has the ability to retry upon a UDP failure.
However the sockets are currently configured to be blocking and to wait
forever. I added a timeout of 1.5 seconds in order the test to correctly
timeout.
Based on lwip_ethernetif.c skeleton file,
use init, receive and transfer
functionality of SMSC9220 Ethernet driver
for the lightweight IP stack.
Receive mechanism is interrupt driven.
HW buffer sizes:
Tx = 4608 bytes (MTU)
Rx = 10560 bytes
lwIP fine tuning:
mbed-os/features/FEATURE_LWIP/lwip-interface/lwip/src/include/lwip/opt.h
Change-Id: I0ea95650c65fb32cafb5c2d3dde11420c61dba66
Signed-off-by: Gabor Kertesz <gabor.kertesz@arm.com>
Basic TCP/UDP tests for PPP based onboard cellular modems.
Tests basic public APIs defined in CellularBase.h
A customer port must pass this test set, hence verifying their
particular implementation.
This commit includes:
* Add support for sending response to duplicate messages
* Add randomness for retransmission time
* Fix usage sn coap blockwise max time data stored
* CoAP parser option handler does not seem to handle "Option Length" completely according to spec
* Handle '0' value if duplication buffer size is set through the sn_coap_protocol_set_duplicate_buffer_size()
Silence deprecation warnings in the config store C and C++ files. This
removes warnings that not relevant to applications. Note - using
these deprecated functions still gives an error outside of these files.
Move the metrics mutex into the ifdef MBED_STACK_STATS_ENABLED since
it is not used ouside of it. This fixes the warning:
[Warning] greentea_metrics.cpp@37,28: 'mutex' defined but not used [-Wunused-variable]
The semaphore xTXDCountSem had the count to match the number of
resources available, but was being used as a binary semaphore in a
loop to listen for events. This patch updates the logic to make use of
the resource count.
With RTX5 the OS traps with an error if the a semaphore is released
more times than its count with an error similar to
"Semaphore 10000e6c error -17". Because xTXDCountSem is being used
as a binary semaphore it triggered this trap. With this patch the
semaphore is no longer used as a binary semaphore and no longer traps.
This patch split the Case class in two entities: Case and case_t. case_t contains the test case data structure while Case provide the interface to the test case. Unlike the class Case, case _t is a POD and can be instantiated at compile time and put in the constant data section (in ROM).
The Specification class has also been modified to accept arrays of case_t.
In class MBRBlockDevice the tole32 function had used union member
names u32 and u8. The introduction of REALTEK_RTL8195AM cauesd a
conflict with type names in basic_types given they're aliased as
macros to uint32_t and uint8_t respectively.
The old open/opendir functions did not provide a route for errors and
relied on implementations manually setting errno. Updated to return
errors directly.
Required for other representations of FileSystems, ie LocalFileSystem
Introduces FileSystemHandle for the same behaviour as FileHandle and
DirHandle.
Requires the following to hook into file/dir lookup:
```
int open(FileHandle **file, const char *filename, int flags)
int open(DirHandle **dir, const char *path)
```
This hook is provided by the FileSystem class, so requires no changes
from implementations.