Commit Graph

3394 Commits (e75ca75e17d280aedbad05352685af0d11dffe4e)

Author SHA1 Message Date
paul-szczepanek-arm 34d985a4ac set correct default privacy configuration for centrals 2018-08-03 09:54:46 +01:00
Cruz Monrreal 88316e87e7
Merge pull request #7660 from deepikabhavnani/namespace_fs_update
Remove inclusion of mbed.h and mbed namespace from filesystem code
2018-08-02 23:04:45 -05:00
Cruz Monrreal 4000e009c1
Merge pull request #7564 from wajahat-ublox/ublox_idle_mode
Cellular: Make ATHandler::cmd_start() virtual
2018-08-02 10:11:55 -05:00
Cruz Monrreal 952930c23f
Merge pull request #7495 from hasnainvirk/scheduling_failure_report
LoRaWAN: Reporting scheduling failures
2018-08-02 10:10:47 -05:00
paul-szczepanek-arm e92863a7be store secure connections ltk in both local and peer entry 2018-08-02 15:33:47 +01:00
Teppo Järvelin b761e7b5a3 Cellular: fixed greentea tests C027 and BG96. 2018-08-02 08:10:32 +03:00
Cruz Monrreal 35fb35a3b2
Merge pull request #7661 from EnsilicaEdd/fix_lorawan_incomplete_connect
Clear CONN_IN_PROGRESS flag after incomplete connect()
2018-08-01 21:36:59 -05:00
Cruz Monrreal 94d1b98d95
Merge pull request #7621 from 0xc0170/fix_cellular_style
cellular: astyle fix
2018-08-01 08:57:07 -05:00
Hasnain Virk b07c3e791f Reporting scheduling failures
It is quite possible that the user request for scheduling an uplink is deferred because of backoff or if it was a CONFIRMED message, a retry may take place on a different datarate and different channel.
We didn't have a hook for such deferred scheduling, telling the user whether the async rescheduling worked or not. This commit adds that capability and now we can tell the application if a scheduling failure took place after the original schedule request was accepted.
2018-08-01 16:28:00 +03:00
Martin Kojtal d65e614a14
Merge pull request #7648 from davidsaada/david_init_ref_count
Add init reference count to all block devices
2018-08-01 15:06:57 +02:00
Martin Kojtal d5f70f0d21
Merge pull request #7465 from davidsaada/david_tests_not_enough_memory
Skip a few tests if not enough memory can be allocated for them
2018-08-01 15:03:45 +02:00
Martin Kojtal 03ad9d63ec
Merge pull request #7620 from kivaisan/fix_cancel_sending
Lora: Fix cancel_sending
2018-08-01 15:00:04 +02:00
Wajahat Abbas dfc8ca91fa made destructor virtual as class has a virtual method now 2018-08-01 16:59:18 +05:00
Ari Parkkila c6ab45b6e1 Cellular: Added CellularDevice::init_module API to be called at startup 2018-08-01 04:52:10 -07:00
Ari Parkkila f059fb36bd Cellular: Updated coding guidelines 2018-08-01 04:50:14 -07:00
David Saada ec4e2ce09a Check max possible keys in NVStore tests. 2018-08-01 14:03:43 +03:00
Cruz Monrreal 63f62165d8
Merge pull request #7565 from OpenNuvoton/nuc472_emac_rst
Nuvoton: Fix NUC472 SD-Host HW IP reset definition
2018-07-31 11:44:01 -05:00
Cruz Monrreal f4a804fff1
Merge pull request #7653 from anttiylitokola/master
Update mbed-coap version to 4.5.1
2018-07-31 11:41:56 -05:00
David Saada 235f175cba Add init reference count to all block devices 2018-07-31 19:41:55 +03:00
Cruz Monrreal 4e0a076612
Merge pull request #7641 from hasnainvirk/abp_armc6_fix
LoRaWAN: Fixing incorrect NetID causing ABP Failures
2018-07-31 11:41:34 -05:00
deepikabhavnani 079b751df5 Remove inclusion of mbed.h and mbed namespace from filesystem code 2018-07-31 11:24:42 -05:00
Edd Inglis 88b2858af4 An incomplete connect (either abandoned with a disconnect() or just
failed of its own accord) would prevent futher connect()'s  due to the
CONN_IN_PROGRESS_FLAG remaining set.  This change clears that flag in
the two cases described.
2018-07-31 17:01:54 +01:00
Martin Kojtal 85ef7a008f cellular: fix tests that astyle breaks
Ignore TEST_GROUP by AStyle. As this uses macro, is not visible to formatter.
By default, it assumes it is a function and treats methods as blocks inside a
function (inlined {}). We ignore it.

We might just not format UNITTESTS in the future if we face similar issues
in the future.
2018-07-31 13:15:57 +01:00
mudassar-ublox 122e771063 socket_open function removed 2018-07-31 15:09:29 +05:00
Antti Yli-Tokola 20f647435a Update mbed-coap version to 4.5.1
Fixes error: IOTCLT-2883 - Blockwise observations not completing
2018-07-31 10:31:09 +03:00
cyliangtw 2fcbcf1789
Initialized return value of numaker_emac link-out 2018-07-31 12:01:43 +08:00
mudassar-ublox ffb4f926e9 Artistic style applied and updated power function 2018-07-30 19:41:02 +05:00
Hasnain Virk c7f3585e28 Clear distinction b/w class A & C data paths 2018-07-30 15:25:37 +03:00
Hasnain Virk d76f6c07e9 Making recv timing error and preamble length configurable
We had a bug especially in the reception path. Our recv window opening
delays were being calculated on the premise that the radio has to capture
5 preamble symbols out of 8 transmitted by the base station. However, in PHY
layer while setting radio rc settings, we were setting preamble length to be 8.
Preamble length register needs to be configured differently for Uplink and Downlink.
For uplink, we wish to transmit 8 preamble symbols whereas in the reception path we need
to receive 5 preamble symbols at least out of 8.
Alongwith that the maximum range of timing error may vary from platform to platform as it
is based upon the crystal in the chip. We have now made these parameters configurable and
have loaded them with the most optimal defaults.
2018-07-30 15:25:36 +03:00
Hasnain Virk 24c5c58d4f Mark an error in post processing if ack not recvd
If an ack is not received after maximum retries, we need to mark an error
which was missing from the post processing sequence.
2018-07-30 15:25:18 +03:00
Hasnain Virk 31aaea6749 [IOTCELL-1181] Fixing incorrect NetID causing ABP Failures
The issue rose up when using ARMC6. A test case didn't initialize NetID
parameter for ABP while using connect(params) API. NetID is the first 7 bits
of the Device Address. It makes sense to actually remove the net-id parameter
from ABP settings as the stack can deduce it from device address. However, the ABP
structure is exposed in public APIs, so we can't really do that at the moment.
Simpler fix is to move the mask that helps us to extract first 7 bits of the device address
is exposed in lorawan_types.h and the user can use it to deduce correct net-id.
2018-07-30 15:02:35 +03:00
deepikabhavnani feda35503b Remove debug print 2018-07-27 13:40:43 -05:00
Martin Kojtal cde18aa0bc cellular: astyle fix 2018-07-27 13:33:20 +01:00
Hasnain Virk 465fb447e5 AS923: Using LoRa modulation comatible DR as default
DR7 is used for FSK in AS932 region. As a default max DR, we should use a LoRa modulation
compatible data rate. Ofcourse if a device wishes to use FSK, it can set DR7 using set_data_rate() API
and turning off ADR, or an NS can configure a new channel for the device utilizing DR7.
2018-07-27 15:04:31 +03:00
Hasnain Virk b0b026126c [IOTCELL-1181] Using higher data rates to connect
The stack was trying to connect with default data rates which happened to be
the lowest data rates in a specific region. In the beginning device and NS do
not have agreed upon tx rx parameters and there can be synchronization issues.
When we use lower datarates, we may end up having a minute and a half long
transmissions that hnot only blocks the channel for a long time but also reduce
the chance of proper synch between device and NS. That's why we have decided to
begin with higher data rates and gradually decrease datarate if we do not hear
from the network server.
2018-07-27 15:04:31 +03:00
Hasnain Virk 36a4c557b7 [IOTCELL-1182] User TX priority over automatic uplinks
In the case when an automatic uplink was queued and the user do have something send,
we should give priority to user data instead od automatic uplink message.
2018-07-27 15:04:31 +03:00
Kimmo Vaisanen 668c6ab6fa Lora: Fix cancel_sending
This commit fixes some bugs from cancel_sending() method:
-  System crashed if method was called before initialization.
   Now LORAWAN_STATUS_NOT_INITIALIZED will be returned.
-  Method returned LORAWAN_STATUS_BUSY error when no send request was pending.
   LORAWAN_STATUS_OK should be returned in this case.
-  LORAWAN_STATUS_BUSY is now returned if backoff timer is just about to be
   dispatched (time_left returns 0).
2018-07-27 13:30:27 +03:00
mudassar-ublox a8abeccdac UBLOX cellular api's for UDP and TCP 2018-07-26 19:20:38 +05:00
Martin Kojtal b170e1c44d
Merge pull request #7587 from SeppoTakalo/fix-tpcserver-warning
Allow legacy TCPServer::accept() to override inherited Socket::accept()
2018-07-25 14:20:05 +02:00
Cruz Monrreal 0df9e15e4e
Merge pull request #7549 from TomoYamanaka/improve_ether
Revise heap and stack size for Ethernet of GR-PEACH
2018-07-24 11:47:45 -05:00
Seppo Takalo 96a90c2f2f Allow legacy TCPServer::accept() to override inherited Socket::accept() 2018-07-24 18:06:04 +03:00
cyliangtw 7ea02d95a3 Add error handling for getting null tx buffer 2018-07-20 18:23:54 +08:00
Wajahat Abbas fda096b4c4 Make ATHandler:cmd_start() virtual 2018-07-20 13:49:43 +05:00
Cruz Monrreal d91d3a6e4c
Merge pull request #7520 from hasnainvirk/cont_join_issue
LoRaWAN: Wrong return code for JoinRequest retry
2018-07-19 13:06:57 -05:00
TomoYamanaka f272472f2d Revise heap and stack size for Ethernet of GR-PEACH
I changed stack size because the deafult stack size may not be enough for
Ethernet of GR-PEACH(Cortex-A).
- Stack size is default size + 128 byte
In order to maximize the performance of Ethernet, I changed heap size to
below.
- Heap size is default size * 32 byte(send descriptor num is 16 and recv
descriptoer num is 16).
2018-07-19 16:12:32 +09:00
Cruz Monrreal e9e1ff997d
Merge pull request #7302 from OpenNuvoton/nuvoton_m2351_v1.1
Support Nuvoton's NUMAKER_PFM_M2351 target
2018-07-18 08:49:55 -05:00
Andres Amaya Garcia 5ced8e4fdf Integrate mbed OS RTC with mbed TLS
The integration is simply to define the macro MBEDTLS_HAVE_TIME_DATE
in the features/mbedtls/platform/inc/platform_mbed.h. The default
implementation of the mbedtls_time() function provided by mbed TLS is
sufficient to work with mbed OS because both use POSIX functions.
2018-07-16 20:39:43 +01:00
David Saada a224ca764a Skip a few tests if not enough memory can be allocated for them. 2018-07-16 17:21:21 +03:00
Cruz Monrreal be215a310d
Merge pull request #7448 from davidsaada/david_unity_test_skip
Unity: Add macros for test skipping.
2018-07-16 09:06:52 -05:00
Hasnain Virk 4a4f8de6f2 LoRaWAN: Wrong return code for JoinRequest retry
51f92b0efd introduced
handling for connection attempts while a connection was already underway or have been
completed. Unfortunately a similar check slipped through and the stack was not able to continue
sending join requests if an error happened.
2018-07-16 16:28:52 +03:00
Cruz Monrreal 602b0cea09
Merge pull request #7079 from SiliconLabs/feature/EFM32GG11-OS5.9
Add support for EFM32GG11
2018-07-13 17:33:34 -05:00
Cruz Monrreal c5ba97fbe0
Merge pull request #7445 from hasnainvirk/issue_7230
LoRaWAN: Remedy for issue #7230
2018-07-13 11:48:13 -05:00
Cruz Monrreal a4117f65e2
Merge pull request #7318 from AriParkkila/cellular-max-packet-size
Cellular: Remove max_packet_size
2018-07-13 11:39:35 -05:00
Cruz Monrreal 4c1a89c6a7
Merge pull request #7459 from hasnainvirk/issue_7232_7432
LoRaWAN: FRMPayload size validity
2018-07-13 11:03:10 -05:00
Cruz Monrreal 68002155d3
Merge pull request #7107 from kjbracey-arm/ns-global-events
Add option to make Nanostack use global event queue
2018-07-12 10:06:03 -05:00
Hasnain Virk ed9048f79c Correcting unit for timeout
timeout unit should be ms not micro second.
2018-07-12 13:28:21 +03:00
Hasnain Virk 9a77b5d05f FRMPayload size validity
It was pointed out in #7432 and #7232 that the stack was comparing frame payload size
with the allowed payload size in a wrong manner in shcedule_tx().
We must strip the overhead from the frame before comparison.

We did have a similar check in prepare_ongoing_tx() API which would correctly analyse
the situation but a check was needed in schedule_tx() as well. The reason is that the
schedule_tx() API can be called automatically by the stack if the user intiated requested
was not promptly entertained because of duty cycle restriction. Now, the datarate can change
here (for CONFIRMED messages if the ack was not received after retries max out). That's why
a test for validity was needed.

We now perform a comparison using _ongoing_tx_message structure which contains the actual
FRMPayload size.

For proprietary type of messages only MHDR and Port field is used so we shouldn't add MAC commands
and other overhead into them.

In order to have consistent frame overhead, we have opted to always include Port field in the
frame.
2018-07-12 13:28:15 +03:00
ccli8 43b98cf405 Fix Greentea test code with Cortex-M23/M33
Enlarge stack size of forked thread for Cortex-M23/M33 targets
2018-07-12 18:01:27 +08:00
Steven Cooreman da377c6ed3 Add EFM32GG11 Ethernet driver 2018-07-11 18:13:04 +02:00
Cruz Monrreal b290ff33f3
Merge pull request #7127 from davidsaada/david_nvstore_fix_test_alloc
NVStore tests: Tune memory consumption; stop threads greafully
2018-07-11 07:39:25 -05:00
David Saada 2b7d83652e Unity: Add macros for test skipping.
The TEST_SKIP and TEST_SKIP_UNLESS macros (w/ and w/o messages) allow the test
to skip the test case execution from the point the macro was called (without
failing the test).
2018-07-11 14:51:05 +03:00
Mirela Chirica ee41015304 Cellular: Fix socket_send unit test 2018-07-11 13:45:00 +03:00
Ari Parkkila 4d431cd1ae Cellular: Removed max_packet_size 2018-07-11 13:11:47 +03:00
Cruz Monrreal 3f742c9b73
Merge pull request #7430 from kivaisan/user_constructed_phy_v2
Lora: Add support for runtime PHY selection
2018-07-10 22:11:21 -05:00
Mirela Chirica 7de9770f0c Cellular: More unit tests for ATHandler's read routines 2018-07-10 15:09:09 +03:00
Mirela Chirica aff55462f5 Cellular: Fix for ATHandler's read string and hexstring NULL termination 2018-07-10 15:09:09 +03:00
Hasnain Virk f0844b4cfc Streamlining connect() API with posix like retcodes
For ABP: First call to connect() or connect(params) will return LORAWAN_STATUS_OK
         and a CONNECTED event will be sent. Any subsequent call will return
         LORAWAN_STATUS_ALREADY_CONNECTED (posix EISCONN) and no event is generated.

FOR OTAA: First call to connect() or connect(params) will return LORAWAN_STATUS_CONNECT_IN_PROGRESS
          and a CONNECTED event will be sent whenever the JoinAccept is received. If the application
          calls connect again before receiving the CONNECTED event, LORAWAN_STATUS_BUSY will be returned.
          After the CONNECTED event is dispatched, any subsequent call to connect() or connect(params) API
          will be returned with LORWAN_STATUS_ALREADY_CONNECTED.

No new parameters are accepted after the first call. The application must disconnect before making
a connect() call with new parameters.
2018-07-10 13:31:50 +03:00
Cruz Monrreal 8f43223646
Merge pull request #7412 from bmcdonnell-ionx/bugfix-fatfs-dir-list-when-full
apply FatFs 0.13b hotfix - fix readdir() never terminates when dir is full
2018-07-09 10:17:12 -05:00
Melinda Weed bae4c89d0f Remove shall, whole lotta other changes. Not done yet. 2018-07-09 15:06:11 +03:00
Hasnain Virk 24db1c81ec Updating docs
API documentation is updated to clear how the connection related return codes will
work from now on.
2018-07-09 13:00:01 +03:00
Hasnain Virk 51f92b0efd LoRaWAN: Handling re-joining when already Joined
This is a remedy for the issue #7230.
While the device is joining, LORAWAN_STATUS_CONNECT_IN_PROGRESS is returned.
However, if the device is already joined, we will return LORAWAN_STATUS_ALREADY_CONNECTED.
2018-07-09 12:59:54 +03:00
Kevin Bracey 229dfe5ce2 Add Apache licenses to ns_hal files 2018-07-09 12:58:39 +03:00
Kevin Bracey 8ad3e47a7e Add option to make Nanostack use global event queue 2018-07-09 12:58:38 +03:00
Kimmo Vaisanen 0397b0b292 Lora: Support user provided LoRaPHY object
To support custom PHY object, a new LoRaWANInterface constructor was
added.
2018-07-06 15:11:10 +03:00
Kimmo Vaisanen 50004ca89a Lora: Add initialize() method to set LoRaWANTimeHandler class for phy
Instead of giving LoRaWANTimeHandler object as parameter for constructor,
object is now given via own initialize() method.

This change is needed for future refactoring where application can give own
PHY object for LoRa stack.
2018-07-06 10:04:44 +03:00
Cruz Monrreal 93233c4f5d
Merge pull request #7364 from 0xc0170/fix_storage_rtos
Fix storage rtos types - remove including internal header file
2018-07-05 14:29:46 -05:00
Cruz Monrreal cec30ae4cb
Merge pull request #7414 from mikaleppanen/nano_heap_stats_conf
Added json options for nanostack heap statictics
2018-07-05 10:42:58 -05:00
Cruz Monrreal 87b3faeff0
Merge pull request #7399 from hasnainvirk/bug_fix_recv_window
Bug fix for receive windows
2018-07-05 10:40:51 -05:00
Vincent Coubard 7a8cc0243f Cordio Documentation: Explain how to tests and what tools are available. 2018-07-04 12:46:41 +01:00
Mika Leppänen 46bcbf2a28 Added json options for nanostack heap statictics
Added configuration options to mbed-mesh-api mbed_lib.json to enable
nanostack nsdynmemLIB heap statistics.
2018-07-04 10:35:35 +03:00
Brendan McDonnell efc03293dd FatFs 0.13b hotfix - fix readdir() never terminates when dir is full.
http://elm-chan.org/fsw/ff/patches.html
http://elm-chan.org/fsw/ff/ff13b_p1.diff
https://github.com/ARMmbed/mbed-os/issues/5780
2018-07-03 17:03:35 -04:00
Cruz Monrreal b50f09d57d
Merge pull request #7384 from OpenNuvoton/nuvoton_fix_mbr_memleak
Fix memory leakage with MBR on exiting error path
2018-07-03 07:37:43 -05:00
Hasnain Virk bf78e264c8 Bug fix for receive windows
In rx_config(params) API we shouldn't check for radio state as radio may never get
idle for a class C device. That check made sense only for class A. As the PHY layer
have no conecpt of receive windows which is a MAC layer construct, we should remove the
state check.
The API will be changed later to void rx_config(params).

In addition to that another bug is fixed in the open_rx2_windows() API. We should set the rx slot
first before instantiating a test based on its value.
2018-07-02 18:42:21 +03:00
Martin Kojtal 226e799d5b
Merge pull request #7389 from artokin/update_libservice
Update nsdynmemlib in frameworks/nanostack-libservice
2018-07-02 17:32:23 +02:00
Martin Kojtal 20adbf0c05
Merge pull request #7239 from TeroJaasko/let_config_remove_dns_cache_code
netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
2018-07-02 17:26:46 +02:00
Martin Kojtal 3ee8f3214f
Merge pull request #7348 from hasnainvirk/doc_fix
LoRaWAN: Correcting doxygen
2018-07-02 17:24:52 +02:00
Arto Kinnunen 3d5010de12 Merge commit 'a184ff592b547f153aa14c99329f65fd18515b0d'
* commit 'a184ff592b547f153aa14c99329f65fd18515b0d':
  Squashed 'features/frameworks/nanostack-libservice/' changes from ddd45db..2705b9b
2018-07-02 13:15:58 +03:00
ccli8 7cc1245308 Fix memory leakage with MBR on exiting error path 2018-07-02 11:29:29 +08:00
Cruz Monrreal 58b725be85
Merge pull request #7359 from u-blox/sim_pin_init
Cellular: EasyCellularConnection::connect doesn't have any check that "CellularConnectionFSM" object is created or not
2018-06-29 20:08:16 -05:00
Cruz Monrreal f10bb88b97
Merge pull request #7294 from jeromecoutant/PR_GREENTEA_STAT
Add CPU stats for greentea tests
2018-06-29 19:57:42 -05:00
Amanda Butler aa53ee6204
Copy edit LoRaWANBase.h
Copy edit for precise language and comma use.
2018-06-29 14:28:44 -05:00
Amanda Butler 563d742872
Copy edit LoRaWANinterface.h
Copy edit for precise language and comma use.
2018-06-29 14:27:45 -05:00
Tero Jääskö 2e89fa22a5 netsocket: dns: make dns-cache-size:0 remove whole DNS cache code
Setting ""nsapi.dns-cache-size": 0" still left some of the DNS
caching code in. Add crude #if to remove all of it.
This allows one to save 429 bytes of flash and 48 bytes of RAM on
ARMC5 builds.
2018-06-29 18:17:19 +03:00
David Saada 1b5b8390ea NVStore tests: Tune memory consumption; stop threads greafully
- Tune thread stack size in nvstore test using heap stats
- Stop threads gracefully instead of killing them (in multi-thread test)
2018-06-29 14:35:34 +03:00
Martin Kojtal 4d8baa7451 emac targets: fix thread cb type 2018-06-29 08:35:20 +01:00
Cruz Monrreal d06826b2a4
Merge pull request #7335 from hasnainvirk/recieve_api_change
LoRaWAN: Refactoring LoRaRadio::receive(uint32_t) API
2018-06-28 19:41:39 -05:00
Cruz Monrreal 34fd640955
Merge pull request #7344 from hasnainvirk/tx_timeout_fix
LoRaWAN: Fixing transport of fatal TX timeout event
2018-06-28 10:08:26 -05:00
Cruz Monrreal cb000ceeab
Merge pull request #7336 from SeppoTakalo/fix_udp_filtering
Fix connected UDPSocket filtering
2018-06-28 10:06:52 -05:00
Cruz Monrreal bf21bac52d
Merge pull request #7351 from jeromecoutant/PR_ASTYLE
STM32 files with MBED astyle rules
2018-06-28 10:06:03 -05:00
Martin Kojtal 82b490b0cf kinetis: fix rtos storage type for thread 2018-06-28 15:11:00 +01:00
Martin Kojtal 1188f4a0b9 lwip: fix rtx storage types 2018-06-28 14:40:00 +01:00
Martin Kojtal f2cc21d038 device key: add memset include 2018-06-28 14:17:15 +01:00
jeromecoutant 35c9ddc356 Add CPU stats for greentea tests 2018-06-28 10:54:58 +02:00
mudassar-ublox 1e150c96b5 Cellular: Fixed set_sim_pin method calling 2018-06-28 11:49:20 +05:00
Cruz Monrreal 719d8e0ea5
Merge pull request #7341 from jarvte/packet_domain_urc_for_disconnect_callback
Cellular: improved observing of disconnect for callbacks.
2018-06-27 18:44:06 -05:00
Cruz Monrreal d3641fd4a0
Merge pull request #7320 from anttiylitokola/master
Update mbed-coap to version 4.5.0
2018-06-27 18:43:23 -05:00
jeromecoutant 408209989e TARGET_STM USB astyle 2018-06-27 15:01:23 +02:00
jeromecoutant 6391b7f2fa TARGET_STM_EMAC astyle 2018-06-27 15:00:51 +02:00
jeromecoutant 057142167b TARGET_STM mbedtls astyle 2018-06-27 15:00:04 +02:00
Hasnain Virk ce1e210e4a Correcting doxygen
Use of MSG_FLAGS was updated in previous PRs but the doc was not updated
accordingly.
2018-06-27 15:25:22 +03:00
Hasnain Virk 7ce434b274 LoRaWAN: Fixing transport of fatal TX timeout event
This commit fixes the issue reported in #7285.
If the radio is unable to transmit, its a fatal error and can happen
both while joining or sending a normal packet. In the case of such
a catastrophy we ought to tell the application that this happened.

A fix for the radio driver will also be patched.
2018-06-27 11:41:30 +03:00
Teppo Järvelin 5ccfd9f83c Cellular: improved observing of disconnect for callbacks. 2018-06-27 09:34:09 +03:00
Cruz Monrreal 0132e7c1a7
Merge pull request #7273 from jarvte/update_cellular_unit_tests
Cellular: added unit tests for new API functions (sim, power, base, device).
2018-06-26 20:41:52 -05:00
Seppo Takalo f2c0c4e248 Fix connected UDPSocket filtering
Was dropping all packets from connected peer
2018-06-26 17:01:19 +03:00
Hasnain Virk 10c3019e06 Refactoring LoRaRadio::receive(uint32_t) API
receive(uint32_t) API in the LoRaRadio class (base class for the radio drivers) should
not take any argument as we decided to take hardware timers for RX timeout interrupts
instead of software timers. It is being refactored to receive(void).
This is an API change, but as it is not an application interface, we will not put a
deprecation notice. Only user of this API is our stack (LoRaPHY layer) which has been updated
accordingly.
Actual driver comes out of the tree and a PR is open there to update the drivers:
https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers/pull/22

In addition to this an internal API belonging to LoRaPHY class is refactored.
set_rx_window(parameters) is refactored to handle_receive(void) which is more consistent with
handle_send().
2018-06-26 15:47:51 +03:00
Teppo Järvelin 9f68977fee Cellular: Rebase and fix tests as they got broken in rebase. 2018-06-26 09:14:15 +03:00
Teppo Järvelin 4bd4042101 Cellular: updated unit tests. 2018-06-26 09:08:26 +03:00
Teppo Järvelin f64c84b1b7 Cellular: review fixes for cellularinformation tests. 2018-06-26 09:05:46 +03:00
Teppo Järvelin 8624765c06 Cellular: added greentea tests for CellularInformation. 2018-06-26 09:05:46 +03:00
Teppo Järvelin f84862191c Cellular: added more CellularInformation unit tests. 2018-06-26 09:05:46 +03:00
Cruz Monrreal f3424da060
Merge pull request #7287 from SeppoTakalo/remove_feature_lwip
Remove FEATURE_LWIP
2018-06-25 11:23:15 -05:00
Martin Kojtal 8756183478
Merge pull request #7299 from ARMmbed/g-fix-mbr-invalid
MBR: Fix issue with MBR init asserting on bad partition size
2018-06-25 17:45:12 +02:00
Cruz Monrreal 24efa4c06e
Merge pull request #7192 from SeppoTakalo/socket-refactor
Create abstract Socket interface
2018-06-25 10:18:51 -05:00
Cruz Monrreal dd7555e9ed
Merge pull request #7243 from k-stachowiak/disable-mbedtls-xts-default
Disable XTS cipher mode by default when importing Mbed TLS
2018-06-25 10:13:21 -05:00
Cruz Monrreal 2e233a96d3
Merge pull request #7210 from pan-/fix-nordic-security-cancellation
Fix nordic security cancellation
2018-06-25 10:12:23 -05:00
Cruz Monrreal 335fd58a7c
Merge pull request #7269 from jarvte/add_cellular_network_tests
Cellular: add cellular network tests
2018-06-25 10:05:20 -05:00
Antti Yli-Tokola c887248544 Update mbed-coap to version 4.5.0
Fix error:  IIOTCLT-2769 - mbed-coap: extra response received after registration

Added own flag to enable blockwise support, without setting default blockwise
payload size. This allows to receive blockwise messages while still sending
without blockwise.

Fix CoAP request blockwise response handling
When request is sent, response can have blockwise option set. All requests must
be stored to the linked list.
2018-06-25 17:08:52 +03:00
Cruz Monrreal d160cc6cd0
Merge pull request #7284 from KariHaapalehto/wise1530_usi22_support
Add binary drivers for MTB_USI_WM_BN_BM_22 and MTB_ADV_WISE_1530
2018-06-22 10:16:16 -05:00
Cruz Monrreal d18aa9072f
Merge pull request #7262 from paul-szczepanek-arm/gap-params
BLE: Add setScanParams overload to the Gap API
2018-06-22 10:15:14 -05:00
Vincent Coubard 4b8fb0be78 Nordic BLE: Fix return value verification 2018-06-22 09:36:06 +01:00
Vincent Coubard b68e18cdb4 Nordi BLE: Fix formatting 2018-06-22 09:35:34 +01:00
Cruz Monrreal 85f66ca96f
Merge pull request #7275 from jarvte/fix_sim_null_when_used
Cellular: fixed defect where SIM interface was closed too early
2018-06-21 23:33:03 -05:00
Cruz Monrreal 34513f2a92
Merge pull request #7221 from pan-/cordio-port-test
Cordio: Add tests that validates a cordio port.
2018-06-21 23:30:39 -05:00
Christopher Haster 28a78308af
Fixed issue with MBR init asserting on bad partition size 2018-06-21 17:09:23 -05:00
Amanda Butler da6f2d958b
Copy edit CellularConnectionFSM.h
Copy edit for consistent tense and comma usage.
2018-06-21 11:12:08 -05:00
Kari Haapalehto 699811be72 Add binary drivers for MTB_USI_WM_BN_BM_22 and MTB_ADV_WISE_1530 2018-06-21 12:15:53 +03:00
Seppo Takalo c544ce0a3b Add deprecation warning for those who enable LWIP or NANOSTACK
This is dropped by linker so does not cause any RAM/ROM cost.
2018-06-21 11:00:00 +03:00
Seppo Takalo e4d1a9a85a Remove FEATURE_LWIP. The LwIP stack is enabled on all builds now
Leave the FEATURE_LWIP enabled in build scripts so that it does
not break any builds.

Removed 'feature_add: ["LWIP"]' on all targets.
2018-06-21 11:00:00 +03:00
Seppo Takalo adce2d9172 Remove deprecatd LwIP eth drivers 2018-06-21 10:28:50 +03:00
Vincent Coubard d2ecdb8900 Cordio BLE: Rewrite reset test strategy
The existing test was expecting that the acknowledgement of the reset command would be the first and only event receive. This assumption is false.

As a consequence, the new code parse all incoming packets and raise a flag in the following circumstances:
* a reset packet has been successfully received.
* RX stream is not synchronized
* The status of the reset command is an error.

Another test has been added that send a serie of reset commands.
2018-06-20 15:24:37 +01:00
Teppo Järvelin 1a60422b74 Cellular: fixed defect where SIM interface was closed too early causing crash with certain configurations. 2018-06-20 14:15:22 +03:00
Vincent Coubard 4f8a006f3b Cordio BLE: Document in test what fields are expected to be set after init. 2018-06-20 12:01:28 +01:00
Vincent Coubard 5b7f7aa77b Cordio BLE: Fix test failure when controller initialization failed. 2018-06-20 12:00:52 +01:00
Seppo Takalo 1ca9ccda73 Filter incoming UDP packets based on connected peer address. 2018-06-20 12:38:07 +03:00
Seppo Takalo e7cb4752fa Fix small issues from the review 2018-06-20 12:38:07 +03:00
Seppo Takalo 2b60e42756 Close Doxygen group at the end of file 2018-06-20 12:38:07 +03:00
Seppo Takalo 96ef8e345d Move string allocation to a point where get_ip_address() is called
This saves RAM/stack on typical socket usage where human readable
format is not exchanged so often.
2018-06-20 12:38:07 +03:00
Seppo Takalo 407b2f275d Move accept() to abstract socket class and implement in TCPSocket
Deprecate TCPServer in favor of just TCPSocket::accept()
2018-06-20 12:38:07 +03:00
Seppo Takalo cdbe43c0d5 Refactor Sockets by moving functions up into common base.
* Move IP Socket stuff to InternetSocket class which is inherited by TCP/UDP
* Implement sendto() and recvfrom() on TCP socket
* Implement connect() call on UDP
* Implement send() and recv() calls on UDP socket
2018-06-20 12:38:06 +03:00
paul-szczepanek-arm 399191fc9c reuse existing call 2018-06-20 08:24:26 +01:00
Teppo Järvelin 1fb4d2dfc9 Cellular: fixed unit tests after rebasing with master. 2018-06-20 09:08:51 +03:00
Teppo Järvelin 861867e3cc Cellular: Added network unit tests. 2018-06-20 08:28:00 +03:00
Teppo Järvelin 7efa041fcb Cellular: added greentea tests for CellularNetwork. 2018-06-20 08:28:00 +03:00
Cruz Monrreal e8005f6d72
Merge pull request #7206 from mikaleppanen/k64f_async_powerup
K64f non-blocking powerup
2018-06-19 21:49:37 -05:00
Cruz Monrreal ba5b5a3870
Merge pull request #7191 from hasnainvirk/precise_timing
LoRaWAN: Fine tuning timing for delays and receive windows
2018-06-19 09:48:52 -05:00
paul-szczepanek-arm 4b1ce49ee1 use sets to apply limits 2018-06-19 15:18:11 +01:00
Cruz Monrreal fcfe6e1c43
Merge pull request #7217 from AriParkkila/cellular-info-sim
Cellular: Add AT+CCID and AT+CGSN
2018-06-19 08:54:49 -05:00
Cruz Monrreal d1dc1e849e
Merge pull request #7146 from jarvte/add_cellular_sim_and_power_tests
Cellular: Added power and sim greentea and unit tests.
2018-06-19 08:46:51 -05:00
Cruz Monrreal 2bb686ff1e
Merge pull request #7245 from SeppoTakalo/fix-default-interface
Fix default interface selection by using correct macro names.
2018-06-19 08:46:28 -05:00
paul-szczepanek-arm 588e68bccf add setScanParams overload 2018-06-19 14:36:18 +01:00
Martin Kojtal 0658544cb6
Merge pull request #7207 from mikaleppanen/dns_singletons
Change DNS global class definitions to singletons
2018-06-19 14:14:21 +02:00
Seppo Takalo 384fc7e778 Fix typo: WifiInterface -> WiFiInterface and add missing return.
Default WiFiInterface did not even build. And when it was fixed to build,
it was always returning NULL.
2018-06-19 10:47:12 +03:00
Cruz Monrreal 94a06cef66
Merge pull request #7229 from mikaleppanen/stm_chksum_disable
Disabled STM ethernet driver hardware checksum calculation
2018-06-18 17:23:28 -05:00
Seppo Takalo 412f654c8d Fix default interface selection by using correct macro names.
Code was written using MBED_CONF_DEFAULT_* but the mbed_lib.json file
that created these values is prefixed with "nsapi" and therefore
final macros are MBED_CONF_NSAPI_DEFAULT_*
2018-06-18 18:59:43 +03:00
Cruz Monrreal 701d49d8eb
Merge pull request #7211 from pan-/ble-workaround-connections-param-update-request
Nordic BLE: Accept connection parameter update
2018-06-18 10:09:22 -05:00
Krzysztof Stachowiak 7b22ede77a Disable XTS cipher mode by default when importing Mbed TLS 2018-06-18 16:48:33 +02:00
Cruz Monrreal 74a75d5bb0
Merge pull request #7058 from davidsaada/david_exhaustible_bd_fix
Fix two issues in ExhaustibleBlockDevice
2018-06-15 10:03:54 -05:00
Ari Parkkila 7d006f6f6a Cellular: Target support for AT+CCID and AT+CGSN 2018-06-15 14:28:48 +03:00
Mika Leppänen 9b0cbe064d Disabled STM ethernet driver hardware checksum calculation
No need for driver level hardware IPv4/TCP/UDP/ICMP checksum insertion
since LWIP and nanostack handles those already.

Related to issue: https://github.com/ARMmbed/mbed-os/issues/7227
2018-06-15 14:24:05 +03:00
Anna Bridge 3e2e6a714a
Merge pull request #7195 from jarvte/fixing_easycellular_release_version
Cellular: Semaphore wasn't released in easycellular release build.
2018-06-15 11:13:34 +01:00
Mika Leppänen b7627e823b K64F, K66F: Update the ENET PHY driver
PHY init and autonegotation is split into own functions.
2018-06-15 10:41:31 +03:00
Teppo Järvelin f821b02468 Cellular: fixed unit tests after rebase with latest changes. 2018-06-15 09:51:16 +03:00
Teppo Järvelin 7e1b0480b0 Cellular: Added power and sim greentea and unit tests. 2018-06-15 09:03:08 +03:00
Vincent Coubard 14e229e00a Cordio: Add tests that validates a cordio port.
The first test focuse on the transport by testing that the reset sequence is
correctly sent to the controller and properly received.

The second test validates that the reset sequence fullfill the right state
of the stack and ensure that bluetooth initialization succeed.
2018-06-14 18:24:23 +01:00
Cruz Monrreal a588d15ab4
Merge pull request #7194 from mikaleppanen/lwip_debug_stack
Increased LWIP main worker thread stack size for debug builds
2018-06-14 11:01:47 -05:00
Cruz Monrreal baf563709a
Merge pull request #7090 from jorisa/usbserial-write-nonblocking
Add non-blocking write function for USBCDC
2018-06-14 10:20:26 -05:00
Cruz Monrreal ac107e955f
Merge pull request #6962 from jarvte/release_resources_cellular_statemachine
Cellular: release resources in state machine.
2018-06-14 10:19:12 -05:00
Cruz Monrreal 276588f9fa
Merge pull request #7098 from SeeedJP/feature-cellular-mux
[Wio 3G] Adding platform
2018-06-14 10:17:19 -05:00
Cruz Monrreal c82af3dbe9
Merge pull request #7102 from jarvte/adding_cellular_tests
Adding cellular tests
2018-06-14 10:16:58 -05:00
Cruz Monrreal c3e639aad2
Merge pull request #7123 from paul-szczepanek-arm/fix-generate-whitelist
BLE: check flags to make sure the IRK has been stored before retrieving it
2018-06-14 10:15:15 -05:00
Hasnain Virk d335f82440 Remaining style fixes 2018-06-14 14:52:46 +03:00
Hasnain Virk 27290bb12f Adding valid frequency check for RXParamSetup cmd
We must check for a valid value of a frequency being sent
by the network server.
2018-06-14 14:52:46 +03:00
Hasnain Virk ffb0698ce7 Adding port in trace & streamlining continuous RX2 2018-06-14 14:52:45 +03:00
Hasnain Virk eab2bad593 Queuing the automatic uplink
If the automatic uplink is sent directly the call-stack becomes larger than 1K
which may cause serious problems in debug builds. Just to have a respite between
RX and TX we queue an event for the automatic uplink rather than directly undergoing
an automatic uplink.
2018-06-14 14:52:38 +03:00
Ari Parkkila 44365bccd0 Cellular: Added AT+CCID and AT+CGSN 2018-06-14 13:47:17 +03:00
Vincent Coubard 92fa40b1c7 Nordic BLE: Accept connection parameter update
A peer device that sends a connection parameter update may get block if it doesn't receive a response.

This patch accept the peer request unconditionnally. At some point this event will be managed by the application.
2018-06-13 15:54:51 +01:00
Vincent Coubard 5237c3ec40 Nordic BLE:
Cancel pairing if the device fail to allocate the resources necessary for the pairing operation.
2018-06-13 15:11:13 +01:00
Vincent Coubard f0c3f14887 Nordic BLE: Fix pairing cancellation.
Depending on the role and the current state of the local device; pairing cancelation should be made with a call to a specific function. Normally the Nordic stack would reject invalid calls if the device is not in the correct state; therefore it was assumed that it was possible to detect the state from sd errors. Unfortunatelly this is not true with the latest softdevices as some calls succeed even if the device is not in the right state.

To solve that issue cancelation looks at the current state of the device first to select the right function that will trigger the pairing cancellation.

Note: the call to sd_ble_gap_authenticate was missing in the previous algorithm
2018-06-13 15:10:10 +01:00
Vincent Coubard 301e527af7 Nordic BLE: Store locally role for a given connection. 2018-06-13 15:03:43 +01:00
Vincent Coubard 5c7b8c8ea4 Nordic BLE: Add default parameter to get the local instance of nrF5xn 2018-06-13 15:02:45 +01:00
Vincent Coubard 8e7936d327 Nordic BLE: Improve return of nRF5xn::getGap.
Return the derived type instead of the abstract one. This is legal as C++ supports covariant returns.
2018-06-13 15:02:07 +01:00
Cruz Monrreal fff3564012
Merge pull request #7166 from paul-szczepanek-arm/fix-cancel-pairing
BLE: fix pairing for misconfigured devices (deny pairing correctly)
2018-06-13 08:45:46 -05:00
Mika Leppänen 9457bd13b0 Changed DNS global class definitions to singletons
This saves memory on platforms without network interface.
2018-06-13 15:50:22 +03:00
Mika Leppänen 48825aa847 Increased LWIP main worker thread stack size for debug builds
LWIP stack is configured to be 1200 as default. Without debug enabled,
maximum stack size used for asynchronous DNS operations is 880 bytes. With
debug enabled maximum used stack size is 1248. Added configuration
to LWIP to increase stack size by 25 percent when debug is enabled on build.
2018-06-13 10:34:14 +03:00
Mika Leppänen 5e8ed3364a Added delay to K64F/K66F ethernet TX when all descriptors are in use
Currently, if all TX descriptors are in use and IP stack calls K64F/K66F
ethernet driver link out, link out drops the packet. Added 10ms delay
to link out to wait for a descriptor to become available before dropping
the packet.
2018-06-13 10:02:13 +03:00
Mika Leppänen db672b36c5 Non-blocking K64F/K66F ethernet power up
Changed K64F/K66F power up to return without waiting for link up i.e. for
the ethernet cable to be connected. This is needed for non-blocking use
of driver e.g. for using the driver from event queue.
2018-06-13 09:53:32 +03:00
Teppo Järvelin 7e34349628 Cellular: Semaphore wasn't released in easycellular release build. 2018-06-12 16:04:39 +03:00
Hasnain Virk 828815c7e3 Adding precise timing for receive delays
RX1 and 2 delays needed to be more precise and aggregate tx time was
drifiting because of timing difference between actual tx interrupt and
our processing of that interrupt ever so slightly.

We now take a timestamp of the tx interrupt and take a time diff while
instantiating delay timers. The timestamp is then used to update the aggregate
tx time.

Two new methods are introduced in the LoRaMac class which provide current
timing and current receive slot. These functions are used by LoRaWANStack
for its processing.
2018-06-12 12:32:13 +03:00
Teppo Järvelin d9a99b0a45 Cellular: release resources in state machine. Made sure that athandler does not try process urc's after switch to data mode. 2018-06-12 09:01:03 +03:00
Cruz Monrreal ed9a1f1327
Merge pull request #7161 from kjbracey-arm/ppp-gateway
Correct PPPCellularInterface::get_gateway()
2018-06-11 22:11:18 -05:00
Cruz Monrreal af55378c26
Merge pull request #7182 from AriParkkila/cellular-greentea-fix
Cellular: Disable Greentea tracing to consume less memory
2018-06-11 21:28:02 -05:00
Cruz Monrreal 0eac433a66
Merge pull request #7119 from kjbracey-arm/nsapi-ip6string
NSAPI: Use IPv6 conversion routines from frameworks
2018-06-11 21:27:21 -05:00
Cruz Monrreal 12211178c3
Merge pull request #7179 from c1728p9/fix_unsupported_k64f
Fix USB on Kinetis devices
2018-06-11 16:46:13 -05:00
David Saada 4af2c9d483 Support erasing of more than one erase unit in the exhaustible block device 2018-06-11 19:40:35 +03:00
Cruz Monrreal 093a6066c2
Merge pull request #7158 from kjbracey-arm/thread-eui64
Add API to read Thread EUI-64
2018-06-11 10:21:22 -05:00
Cruz Monrreal 1b14351e28
Merge pull request #7084 from AriParkkila/cellular-debug
Cellular: Enable AT debug also when mbed-trace is disabled
2018-06-11 09:06:53 -05:00
Cruz Monrreal 5e8a0a853a
Merge pull request #7097 from TeemuKultala/random_port
cellular: random socket port number
2018-06-11 08:57:47 -05:00
Cruz Monrreal de99c0f3a3
Merge pull request #7160 from jarvte/ppp_lwip_disconnect_hangs
Fixed ppp_lwip_disconnect hangs when connection failure.
2018-06-11 08:50:27 -05:00
Cruz Monrreal 02e90ef469
Merge pull request #7163 from pan-/cordio-driver-hook
Cordio driver hook
2018-06-11 08:49:49 -05:00
Cruz Monrreal a78208166c
Merge pull request #7164 from davidsaada/david_fix_nvstore_readme_apis
Fix NVStore README file (changed APIs)
2018-06-11 08:47:39 -05:00
Cruz Monrreal b00a91d15b
Merge pull request #6938 from hasnainvirk/style_and_bug_fixes
LoRaWAN: Style and bug fixes
2018-06-11 08:46:52 -05:00
Cruz Monrreal 3206b81437
Merge pull request #6978 from OpenNuvoton/nuvoton_m23_tz_module
Support default tz_module in event loop thread for M23/M33
2018-06-11 08:44:21 -05:00
Cruz Monrreal 8c6a664380
Merge pull request #7086 from mikaleppanen/nxp_lpc17xx_emac
NXP lpc17xx emac driver
2018-06-11 08:43:43 -05:00
Cruz Monrreal ef86bf97b8
Merge pull request #7121 from kjbracey-arm/ns-emac-hardfault
Nanostack EMAC - avoid initialisation race
2018-06-11 08:42:03 -05:00
Cruz Monrreal 2ac81de533
Merge pull request #7141 from kjbracey-arm/kinetis-mem-conf
Kinetis EMAC: Make number of buffers configurable
2018-06-11 08:41:14 -05:00
Cruz Monrreal ddf5a1d8b8
Merge pull request #7147 from mikisch81/uvisor-fix
Upgrade uvisor to v0.31.1
2018-06-11 08:39:47 -05:00
Cruz Monrreal 084e747160
Merge pull request #7173 from kjbracey-arm/ns-init
Make Nanostack C++ constructor initialise Nanostack
2018-06-11 08:31:02 -05:00
Ari Parkkila 150a204e2b Cellular: Disable Greentea tracing to consume less memory 2018-06-11 12:57:26 +03:00
Yoshihiro TSUBOI 0751dd7c95 [Wio 3G] Changed suggested things
Removed context check from do_user_authentication.
2018-06-11 15:20:15 +09:00
Amanda Butler b983ca98cb
Copy edit README.md
Tweak bullet's phrasing to clarify meaning
2018-06-08 11:05:49 -05:00
Russ Butler 96d3667f20 Fix USB on Kinetis devices
Set correct SYSMPU register for proper USB operation.  This bug was
introduced when the SYSMPU register names and defines were updated
in the commit:
"K64F: Updated the SYSMPU SDK driver"
93f8cfed05
2018-06-08 10:56:09 -05:00
Yoshihiro TSUBOI 16e706ecd4 [Wio 3G] Changed suggested points
Changed accessibility cellular features member functions, fixed minor target issues
2018-06-08 20:13:58 +09:00
Kevin Bracey e06923c64a Make Nanostack C++ constructor initialise Nanostack
Nanostack object constructor didn't actually initialise Nanostack.
Nanostack initialisation was deferred until an interface was actually
attached to the stack, which generally happened at first interface
connect.

Not normally a problem, unless you're trying to make direct Nanostack
setup calls prior to connect - some applications do this, and were
relying on ThreadInterface::initialise to do Nanostack
initialisation.

Unfortunately in 5.9 ThreadInterface::initialise no longer does
initialise Nanostack immediately, because the mesh interfaces were
aligned and integrated with the Ethernet interfaces, which did
initialisation on connect().

Make the Nanostack object constructor initialise Nanostack (as the LWIP
constructor does for lwIP), so calling Nanostack::get_instance() is the
5.9 API for Nanostack initialisation.

For future work, APIs like ns_file_system_set_root_path should be
exposed as methods of Nanostack, so everything happens with a single
Nanostack::get_instance().file_system_set_root_path().
2018-06-08 13:00:58 +03:00
Teppo Järvelin b35dc6a582 Review fix:
- set ppp_active false if close fails in ppp disconnect.
- unset sigio in ppp disconnect
- take ownership of filehandle in CellularNetwork::disconnect even in case of failure
2018-06-08 12:29:50 +03:00
Martin Kojtal 73cfc7baea
Merge pull request #7135 from k-stachowiak/update-mbedtls-2.10.0-rc1
Update Mbed TLS to version 2.10.0
2018-06-08 10:18:06 +02:00
Cruz Monrreal fd6f3cd4a4
Merge pull request #7144 from k-stachowiak/add-cmac-to-mbedtls
Add configuration options to enable CMAC in mbedtls by default
2018-06-07 14:44:22 -05:00
paul-szczepanek-arm bd8572e20f missing return
function would potentially send a reject and accept at the same time
2018-06-07 17:18:08 +01:00
Cruz Monrreal e10a3b306d
Merge pull request #7120 from mikaleppanen/dns_fail_corr
Fixed DNS resolution in case all sendto operations fail
2018-06-07 10:13:03 -05:00
Cruz Monrreal bacf6a9dec
Merge pull request #6860 from andrewleech/nordic_ble_config
Nordic BLE: Allow configuration of softdevice parameters
2018-06-07 10:10:23 -05:00
David Saada 099b924b13 Fix NVStore README file (changed APIs) 2018-06-07 15:34:52 +03:00
Vincent Coubard 06d9aac14c Cordio BLE: Allow replacement of hci RX handler. 2018-06-07 12:30:34 +01:00
Vincent Coubard 569fd9ed30 Cordio BLE: Add hook to HCI driver and transport.
A friend class living in the namespace ble::vendor::cordio and named CordioHCITransportDriver can be added in applications requiring access to internal data of the HCI driver and HCI transport driver.

This is meant to be internal and not easily exploitable by application code.
2018-06-07 12:29:57 +01:00
Kevin Bracey 45e24d4682 Correct PPPCellularInterface::get_gateway()
Two cascading copy-paste errors stopped this working:

  * PPPCellularInterface::get_gateway() called
    nsapi_ppp_get_ip_address();
  * nsapi_ppp_get_gateway() called the interface's get_netmask().

First bug has always been there - second one was introduced in 5.9.

AT_CellularNetwork currently lacks calls to get both netmask and gateway
- this patch would be needed for that when added.
2018-06-07 14:28:19 +03:00
Teppo Järvelin dab4215a9a Fixed ppp disconnect hangs when connection failure. 2018-06-07 12:47:01 +03:00
Kevin Bracey fc5c2fa84b Add API to read Thread EUI-64
Previously get_mac_address on a ThreadInterface returned the EUI-64
reported by the radio driver. This was required for commissioning, but
was inconsistent with other interfaces, and the API concept.

5.9.0 inadvertently changed this so that get_mac_address returned the
actual MAC address used by the radio, which is a hash result of the
EUI-64 for Thread.

The original "return the EUI-64" form was somewhat faulty, as
get_mac_address would not return the EUI-64 set by set_device_eui64() or
another mechanism before connect() was called.

Rather than revert to old behaviour, add a new API to get the device
EUI-64 to ThreadInterface, alongside the existing set API.
2018-06-07 12:17:03 +03:00
Krzysztof Stachowiak 843b1a19e7 Update Mbed TLS after corrections for the import procedure 2018-06-07 10:25:21 +02:00
Krzysztof Stachowiak 7eeb694dd9 Update MbedTLS to 2.10.0 (from an RC) 2018-06-06 17:31:18 +02:00
Krzysztof Stachowiak 8c9a967ef2 Improve the documenting comment in a config adjustment script 2018-06-06 15:33:28 +02:00
Michael Schwarcz a5a1d1170e Upgrade uvisor to v0.31.1 2018-06-06 15:18:24 +03:00
Krzysztof Stachowiak 9c6a85a6e9 Add configuration options to enable CMAC in mbedtls by default 2018-06-06 13:36:28 +02:00
Mika Leppänen 97de145adf Added missing license to header of the file 2018-06-06 14:29:49 +03:00
Mika Leppänen 03541dfc2f Added UBLOX_C027/ARCH_PRO memory configurations 2018-06-06 14:29:49 +03:00
Mika Leppänen a8402256a3 Corrected TX buffer reclaim error
When all TX descriptors were reserved in a row so that TX buffer
reclaim interrupt did not happen during reservation sequence, after
the interrupt occurred, TX buffer reclaim did no longer free buffers.

This happened because when all descriptors were in use, last free
index pointed to consumed index.
2018-06-06 14:29:49 +03:00
Mika Leppänen a5a8b350ce Ported NXP LPCxx ethernet driver to unified EMAC 2018-06-06 14:29:49 +03:00
Kevin Bracey a8e8775aa9 Kinetis EMAC: Correct TX ring pointer array size
TX pointer array was using RX ring length in its declaration.
Wasted memory if RX ring > TX ring, as is the default, but would
be broken if RX ring < TX ring.
2018-06-06 13:30:01 +03:00
Kevin Bracey 30e68f3201 Kinetis EMAC: Make number of buffers configurable
16 RX buffers and 8 TX buffers is probably excessive. Nanostack
version of driver successfully used 4+4, and data pump should be
broadly equivalent.

This means that switching K64F devices from Nanostack to EMAC increases
base heap usage by 18K - observed in Nanostack border router builds.

Add a config option to make it possible to lower the number of buffers.
Defer consideration of lowering the default to later.
2018-06-06 13:30:01 +03:00
Krzysztof Stachowiak f85e3f6177 Update Mbed TLS do version 2.10.0-rc1 2018-06-06 09:13:06 +02:00
paul-szczepanek-arm 265132c5a8 check that flags have the IRK stored before retrieving it 2018-06-05 15:15:19 +01:00
Kevin Bracey 852445a364 Nanostack EMAC - avoid initialisation race
Hard fault was possible if packet reception occurred during
initialisation. Adjust start-up ordering and add NULL check to
avoid.
2018-06-05 17:02:34 +03:00
Kevin Bracey 6c6bcc3575 NSAPI: Use IPv6 conversion routines from frameworks
Share IPv6 conversion code with mbed_trace, Nanostack and
mbed client.

Output formatting is better, being conformant to RFC 5952.
2018-06-05 15:31:18 +03:00