Commit Graph

2211 Commits (278df6938a085eca975e26f01dbdba5748eef4d2)

Author SHA1 Message Date
Vincent Coubard 278df6938a BLE: update cordio porting guide.
Improve description of the requirements of the H4 driver.
2018-05-18 12:37:11 +01:00
Vincent Coubard ea5a7bf45b GenericGattClient: Fix discovery termination.
The procedure should be terminated whenever the server returns an error not equal
to ATTRIBUTE_NOT_FOUND. The block was effectivelly terminated but the
procedure was not. As a result the discovery was operating on already
freed memory.
2018-05-18 12:37:11 +01:00
Kimmo Vaisanen 30a978ac04 Lora: Fix max tx power check
In LoRa TX power value 0 means the maximum allowed TX power and values >0
are limiting the allowed TX power to lower.

tx_config was incorrectly checking the power level and causing the maximum
TX power to be always used. Lora gateway can request node to use lower TX
power with LinkAdrReq MAC command.
2018-05-04 12:22:29 +01:00
Christopher Haster 420df0c793 littlefs: Fixed issue with trailing dots in file paths
Paths such as the following were causing issues:
/tea/hottea/.
/tea/hottea/..

Unfortunately the existing structure for path lookup didn't make it very
easy to introduce proper handling in this case without duplicating the
entire skip logic for paths. So the lfs_dir_find function had to be
restructured a bit.

One odd side-effect of this is that now lfs_dir_find includes the
initial fetch operation. This kinda breaks the fetch -> op pattern of
the dir functions, but does come with a nice code size reduction.
2018-05-04 12:22:29 +01:00
Brendan McDonnell 05c07b1744 reduce variable scope 2018-05-04 12:22:29 +01:00
Brendan McDonnell f1cf7cc176 use separate variable to resolve compiler warning 2018-05-04 12:22:29 +01:00
Seppo Takalo bec428ec1b Clarify mesh configuration values.
Most of the help fields were correct. Just add field specifying
acceptable ranges.
2018-05-04 12:22:29 +01:00
Steven Cooreman 640af767ef Update to EFR32 15.4 driver
* Updates driver library to v2.3.1 (2018q1) for bugfixes and convenience functions
* Provides library in correct format (2-byte wchar_t flag) for compiling with ARMCC (#6695 uncovered by #6577)
* Reverts to using a statically-allocated packet buffer since malloc is not thread-safe (and the asserts have been turned on)
2018-05-04 12:22:29 +01:00
Christopher Haster 86d049d812 littlefs: Fixed lookahead overflow and removed unbounded lookahead pointers
As pointed out by davidefer, the lookahead pointer modular arithmetic
does not work around integer overflow when the pointer size is not a
multiple of the block count.

To avoid overflow problems, the easy solution is to stop trying to
work around integer overflows and keep the lookahead offset inside the
block device. To make this work, the ack was modified into a resetable
counter that is decremented every block allocation.

As a plus, quite a bit of the allocation logic ended up simplified.
2018-04-20 15:31:55 +01:00
Christopher Haster 790ca4d31c littlefs: Fixed issue with lookahead trusting old lookahead blocks
One of the big simplifications in littlefs's implementation is the
complete lack of tracking free blocks, allowing operations to simply
drop blocks that are no longer in use.

However, this means the lookahead buffer can easily contain outdated
blocks that were previously deleted. This is usually fine, as littlefs
will rescan the storage if it can't find a free block in the lookahead
buffer, but after changes that caused littlefs to more conservatively
respect the alloc acks (e611cf5), any scanned blocks after an ack would
be incorrectly trusted.

The fix is to eagerly scan ahead in the lookahead when we allocate so
that alloc acks are better able to discredit old lookahead blocks. Since
usually alloc acks are tightly coupled to allocations of one or two blocks,
this allows littlefs to properly rescan every set of allocations.

This may still be a concern if there is a long series of worn out
blocks, but in the worst case littlefs will conservatively avoid using
blocks it's not sure about.

Found by davidefer
2018-04-20 15:31:55 +01:00
Amanda Butler 0286455c68 Copy edit UARTCellularInterface.h
Copy edit file for grammar.
2018-04-20 15:31:55 +01:00
Amanda Butler 6431ae2e9d Copy edit PPPCellularInterface.h
Copy edit file for grammar.
2018-04-20 15:31:55 +01:00
Amanda Butler 5499b377a6 Copy edit OnboardCellularInterface.h
Copy edit file for grammar.
2018-04-20 15:31:55 +01:00
Amanda Butler a7160844b8 Copy edit CellularInterface.h
Copy edit for grammar.
2018-04-20 15:31:55 +01:00
Teppo Järvelin 1e4e656609 Cellular: Updated doxygen for deprecated API's. 2018-04-20 15:31:55 +01:00
Paul Thompson 0bfc5ca8c0 Explicitly ignore return value or bare expression (macro expands to a number)
Compile: lwip_stack.c
In file included from ../features/FEATURE_LWIP/lwip-interface/lwip_stack.c:41:0:
../features/FEATURE_LWIP/lwip-interface/lwip_stack.c: In function 'mbed_lwip_bringup_2':
../features/FEATURE_LWIP/lwip-interface/ppp_lwip.h:58:44: warning: statement with no effect [-Wunused-value]
 #define ppp_lwip_disconnect()              ERR_IF
                                            ^
../features/FEATURE_LWIP/lwip-interface/lwip_stack.c:858:21: note: in expansion of macro 'ppp_lwip_disconnect'
                     ppp_lwip_disconnect();
                     ^~~~~~~~~~~~~~~~~~~
../features/FEATURE_LWIP/lwip-interface/ppp_lwip.h:58:44: warning: statement with no effect [-Wunused-value]
 #define ppp_lwip_disconnect()              ERR_IF
                                            ^
../features/FEATURE_LWIP/lwip-interface/lwip_stack.c:875:21: note: in expansion of macro 'ppp_lwip_disconnect'
                     ppp_lwip_disconnect();

                     ^~~~~~~~~~~~~~~~~~~
2018-04-20 15:31:55 +01:00
Marcus Chang be172ab5e6 Enable flow control in Greentea
Flow control is enabled in Greentea for targets that has
console-uart-flow-control set.
2018-04-20 15:31:55 +01:00
jeromecoutant 452dbbc538 STM32F7 : correct compilation warnings 2018-04-20 15:31:55 +01:00
jeromecoutant 3fdee88dc6 STM32F4 : correct compilation warnings 2018-04-20 15:31:55 +01:00
jeromecoutant 48a56ba898 STM32F2 : correct compilation warnings 2018-04-20 15:31:55 +01:00
Paul Thompson 0f908e4d1e Switch to using ip_addr_isany_val 2018-04-20 15:31:55 +01:00
Teppo Järvelin dc2be3a9b9 Cellular: fixed athandler unit tests. 2018-04-20 15:31:55 +01:00
Antti Yli-Tokola f6a3f633a0 Update mbed-coap to version 4.4.2
Contains one error fix:
IOTCLT-2469 CoAP UDP retransmission does not work for blocks after first one for requests (Eg. registration POST)

NOTE! These are internal changes required for cloud client. This has no direct relevance to any mbed-os functionality.
2018-04-20 15:31:55 +01:00
Hasnain Virk 4129825127 Setting up channels for AU915
Bug was reported by @tpet93 and it was correctly diagnosed that channels
were not being set in the phy_params structure. This commit fixes the bug
and sets up channels correctly.
2018-04-20 15:31:55 +01:00
Teemu Kultala 6a5cd54ac4 cellular: doxygen correction 2018-04-20 15:31:55 +01:00
Teemu Kultala cd2477fb6f cellular: ATHandler send delay 2018-04-20 15:31:55 +01:00
Krzysztof Stachowiak 1a529090de Move the new check into the end of the previous line 2018-04-20 15:31:55 +01:00
Krzysztof Stachowiak 0b402f9044 Add an NV_SEED test to the config adjustment script 2018-04-20 15:31:55 +01:00
Kimmo Vaisanen 153b137953 Lora: Fix resetting of max_eirp and antenna_gain values
This is a fix for issue #6391

max_eirp and antenna_gain are floating point variables. Values of these
were incorrectly read from MIB as integer and therefore incorrect values
were set.
2018-04-09 15:06:27 +01:00
Antti Kauppila aa65a10e06 LoRa: Fixed cflist decoding issue
- This fixes defect IOTCELL-754
2018-04-09 15:00:48 +01:00
Max Payne 9b4491c14d Fix IPv4 address parsing due to not-so-portable scanf modifier
Bug is raised when using newlib-based toolchains.
%hh format is only avaliable in scanf if newlib is compiled
with _WANT_IO_C99_FORMATS option.
2018-04-09 15:00:48 +01:00
Antti Yli-Tokola 5b7e67e098 Update mbed-coap to version 4.4.1
- Fixes error: IOTCLT-2539 Block wise messaging call-backs not working logically
- Allow TCP+TLS transport method to send larger messages without blockwising.

NOTE! These are internal changes required for cloud client. This has no direct relevance to any mbed-os functionality.
2018-04-09 15:00:48 +01:00
Marcus Chang de417d6487 Inrease thread stack size to 1024 bytes in NVStore test for NRF52 2018-04-09 15:00:48 +01:00
Donatien Garnier a84d08ec59 Fixed inconsistent casing issue for SecurityDb 2018-04-09 15:00:48 +01:00
Seppo Takalo 7cd9919496 Add missing Doxygen descriptions for Nanostack
Fix couple of parameter issues as well.
2018-04-09 15:00:48 +01:00
Kevin Bracey 37fbb7c133 lwIP: fix some IPv6 errors, eg TCP keepalive
Glue code was inspecting lwIP's netconn "type", checking directly for
NETCONN_UDP and NETCONN_TCP.

Unfortunately the type byte has some flag bits like
"IPv6", which means the tests fail if it's an IPv6 socket. So, for
example, TCP socket options were rejected for IPv6.

Add the necessary NETCONNTYPE_GROUP macros to fix this.
2018-04-09 15:00:48 +01:00
Antti Yli-Tokola a48b62d1a6 Update mbed-coap to version 4.4.0
Make sn_coap_protocol_send_rst as public needed for CoAP ping sending
Allow disabling resendings by defining SN_COAP_DISABLE_RESENDINGS
2018-03-27 12:09:14 +01:00
Antti Yli-Tokola 3ba208a96d Update mbed-coap to version 4.3.0
Add new api to clear whole sent blockwise message list
2018-03-27 12:08:19 +01:00
Mika Leppänen 9d5908695b Corrected lwip adaptation TCP flagging 2018-03-26 18:52:24 +01:00
Christopher Haster 4c93aa262e littlefs: Fixed issue updating dir struct when extended dir chain
Like most of the lfs_dir_t functions, lfs_dir_append is responsible for
updating the lfs_dir_t struct if the underlying directory block is
moved. This property makes handling worn out blocks much easier by
removing the amount of state that needs to be considered during a
directory update.

However, extending the dir chain is a bit of a corner case. It's not
changing the old block, but callers of lfs_dir_append do assume the
"entry" will reside in "dir" after lfs_dir_append completes.

This issue only occurs when creating files, since mkdir does not use
the entry after lfs_dir_append. Unfortunately, the tests against
extending the directory chain were all made using mkdir.

Found by schouleu
2018-03-26 18:52:24 +01:00
Mudassar Hussain a8cde30c2d Removed strncmp 2018-03-26 18:52:24 +01:00
Mudassar Hussain 6d4e280160 Cellular: update attach test 2018-03-26 18:52:24 +01:00
Deepika aad97a6d34 dir seek fixed - dptr was not updated before checking 2018-03-26 18:52:24 +01:00
Mirela Chirica 3cbfd3faad Quectel BC95 echo test fixes
Fixing get host by name and iterate send/recv socket operations.
2018-03-26 18:52:24 +01:00
Mirela Chirica b620a35ed3 Use of APN lookup decision logic fixed 2018-03-26 18:52:24 +01:00
Mirela Chirica 79fa5775b4 Fix wrong header define name 2018-03-26 18:52:24 +01:00
Mirela Chirica a708296f29 Release AT handler if network not created 2018-03-26 18:52:24 +01:00
Mirela Chirica 5cb29a7ea4 Own SIM state retrieval for Quectel BC95 2018-03-26 18:52:24 +01:00
Teppo Järvelin b7526edf68 Fixed correct includes so that compile log is not polluted. 2018-03-26 18:52:24 +01:00
Teppo Järvelin 08d681a82a PR review findings, updated deprecated comments. 2018-03-26 18:52:24 +01:00