Commit Graph

2956 Commits (eee607b51a871cd5e0e8ce80e3514a012817f57b)

Author SHA1 Message Date
Mika Leppänen eee607b51a 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-15 13:34:21 +01:00
Mika Leppänen b744b50dca Ported NXP LPCxx ethernet driver to unified EMAC 2018-06-15 13:34:21 +01:00
Teppo Järvelin 77b0fc371b Cellular: Semaphore wasn't released in easycellular release build. 2018-06-15 13:30:56 +01:00
Mika Leppänen f94b2ea263 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-15 13:30:56 +01:00
Teppo Järvelin 97cdbf769d Cellular: release resources in state machine. Made sure that athandler does not try process urc's after switch to data mode. 2018-06-15 13:30:56 +01:00
Yoshihiro TSUBOI 7bc411eedb Changed suggested things
Removed context check from do_user_authentication.
2018-06-15 13:30:56 +01:00
Yoshihiro TSUBOI b3ebb5229a Changed suggested points
Changed accessibility cellular features member functions, fixed minor target issues
2018-06-15 13:30:56 +01:00
ytsuboi 4b1d0875b7 Adding platform 2018-06-15 13:30:56 +01:00
Teppo Järvelin a771f0458a Cellular: fixed unit tests to compile after rebasing to latest. 2018-06-15 13:30:56 +01:00
Teppo Järvelin 64e8363d69 Cellular: added more unit tests for CellularDevice. 2018-06-15 13:30:56 +01:00
Teppo Järvelin d5a6baf5cd Cellular: added greentea test for cellular device. 2018-06-15 13:30:56 +01:00
paul-szczepanek-arm bf6407e3b7 check that flags have the IRK stored before retrieving it 2018-06-15 13:30:56 +01:00
paul-szczepanek-arm d07d966d0f missing return
function would potentially send a reject and accept at the same time
2018-06-15 13:30:56 +01:00
Kevin Bracey 172c69ec0d 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-15 13:30:56 +01:00
Ari Parkkila 09e14567fe Cellular: Disable Greentea tracing to consume less memory 2018-06-15 13:30:56 +01:00
Kevin Bracey 0e676883c8 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-15 13:30:56 +01:00
Russ Butler 607f78213d 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-15 13:30:56 +01:00
Ari Parkkila 0aff4e836b Cellular: Enable AT debug also when mbed-trace is disabled 2018-06-15 13:30:56 +01:00
Teemu Kultala 80464502fa more effective port randomisation 2018-06-15 13:30:56 +01:00
Teemu Kultala 394b2f157d random socket port number 2018-06-15 13:30:56 +01:00
Teppo Järvelin 33653e89e3 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-15 13:30:56 +01:00
Teppo Järvelin 7a53ed276e Fixed ppp disconnect hangs when connection failure. 2018-06-15 13:30:56 +01:00
Amanda Butler 0d8b331eb0 Copy edit README.md
Tweak bullet's phrasing to clarify meaning
2018-06-15 13:30:56 +01:00
David Saada 4d7a15e0f1 Fix NVStore README file (changed APIs) 2018-06-15 13:30:56 +01:00
Kimmo Vaisanen 58230e0786 Lora: Check for valid ABP params
Check that ABP dev_addr and nwk_id is non-zero and keys are not null.
2018-06-15 13:30:56 +01:00
Hasnain Virk e6e3993d4a dr_range bitfield should be unsigned integer
If the value is an integer, the 4th bit is used for sign, so you can store
values upto 7 only whereas the datarate values could go upto 15. That's why
we need to turn this to an unsigned integer so that the last bit can also be used.
2018-06-15 13:30:56 +01:00
Hasnain Virk 1a074acbb5 Style changes only
Travis astyle check pointed out some of the style mismatches in the code.
Not all of them are worth changing as they make the code unreadable and
some of them are semantically wrong.

So in this commit, we have attempted to pick the most important style
mismatches and rectify.
2018-06-15 13:30:56 +01:00
Hasnain Virk c705f94e49 Moving missing public data structures
A few of the structures were missing from the storage space which is
visible topublic APIs. Suc structures are now being added.
2018-06-15 13:30:56 +01:00
Kimmo Vaisanen 05ee60f8cb Lora: All API methods should check if stack has been initialized 2018-06-15 13:30:56 +01:00
cyliangtw 790d24740a Support default tz_module for event loop & lwip 2018-06-15 13:30:56 +01:00
Kevin Bracey cfed8228eb 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-15 13:30:56 +01:00
Kevin Bracey b2a6e94cd8 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-15 13:30:56 +01:00
Kevin Bracey cedccc7daf 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-15 13:30:56 +01:00
Michael Schwarcz 4a4c9069f7 Upgrade uvisor to v0.31.1 2018-06-15 13:30:56 +01:00
Kevin Bracey 7c3c8c9d01 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-15 13:30:56 +01:00
Mika Leppänen f0bea4b0a9 Fixed DNS resolution in case all sendto operations fail
DNS resolver now counts how many sendto operations are successful
during one DNS server attempt cycle (attempting to contact DNS
servers from 0 to last index, including stack specific ones). If all
socket sendto operations fail, DNS resolution is aborted.

If one or more are successful, DNS resolution is continued until
total network attempts count is reached or all sendto operations
fails during a cycle.
2018-06-15 13:30:56 +01:00
Andrew Leech 5d751dfb8f Move mbed_lib.json from targets folder to feature_ble folder The functionality added all affects BLE features in use so this location is a better fit. 2018-06-15 13:30:56 +01:00
Andrew Leech c0341fa363 Allow configuration (via defines) of some of the key settings for the NRF51 softdevice. * CENTRAL_LINK_COUNT * PERIPHERAL_LINK_COUNT * gatts_enable_params.attr_tab_size * gatts_enable_params.service_changed * common_enable_params.vs_uuid_count
These settings control the range of functionality enabled in the softdevice as well as ram consumption.
In particular reducing these values is critical to enable usage of 16K nrf51 devices.
2018-06-15 13:30:56 +01:00
Yossi Levy 57ea7e188f Fixing some coverity issues. 2018-06-15 13:30:56 +01:00
Andrew Leech 2ba88ba8f6 Redirect NRF asserts to mbed error() in TARGET_NRF5x and SDK 14.2 Add related details to TARGET_NRF5x Readme's 2018-06-15 13:30:56 +01:00
Andrew Leech 97ba13b773 Enable ASSERTS's in nrf sdk to catch coding errors.
These will now flow through to mbed standard error handling.
2018-06-15 13:30:56 +01:00
Donatien Garnier d55cc644ab Cordio H4: Added some comments explaining the use of RawSerial as opposed to using Serial 2018-06-15 13:30:56 +01:00
Donatien Garnier 88e06862c3 BLE: Replace Serial with RawSerial in Cordio H4 Transport Driver 2018-06-15 13:30:56 +01:00
Mirela Chirica 51a3be6caf Cellular: BC95 socket creation to fail on missing socket id in the response 2018-06-15 13:30:56 +01:00
Veijo Pesonen 35f980ba4f gethostbyname won't accept empty name
Considers both versions - synchronous and asynchronous. Earlier the
underlying stack was trusted to do this check.
2018-06-15 13:30:56 +01:00
Mika Leppänen e703861333 Corrected asynchronous DNS functionality
- Set network stack to store event queue so that mbed::mbed_event_queue() call
  is not needed every time call_in() is called
- Added dns state variables and enum (states are: created, initiated and cancelled)
- Corrected DNS response handling so that if DNS server returns that host name is
  unknown the DNS query is not tried again
- Reorder mutexes in nsapi_dns_query_multiple_async()
- Created nsapi_dns_query_async_initiate_next() function to initiate the next
  DNS query from the queue after delete of previous query
- Added dsn_timer_running variable to supervise DNS timer start/stop
- Changed cancel function to only mark query as deleted and moved deletion
  to timer function. This allows to run socket close on DNS thread
- Added new nsapi error NSAPI_ERROR_TIMEOUT for DNS (and other) timeouts
2018-06-15 13:30:56 +01:00
Ari Parkkila 5cd450ce70 Cellular: Fix AT URC handler not to dismiss incoming chars 2018-06-15 13:30:56 +01:00
Kari Haapalehto a4ff62e145 Add check for _interface 2018-06-15 13:30:56 +01:00
Mirela Chirica 2b2f53e92f Cellular: Added ENOTTY define in mbed_retarget stub 2018-06-15 13:30:56 +01:00
Mirela Chirica ca0ba7727a Cellular: Added missing copyrights 2018-06-15 13:30:56 +01:00