Commit Graph

3002 Commits (b567934ef0acf768b7aabbd7717ea7a2d2f72180)

Author SHA1 Message Date
Hasnain Virk 0d2e199280 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-29 17:11:50 +01:00
jeromecoutant 8397a9d38b TARGET_STM USB astyle 2018-06-29 17:11:50 +01:00
jeromecoutant 5612dac3b7 TARGET_STM_EMAC astyle 2018-06-29 17:11:50 +01:00
jeromecoutant 66a099867e TARGET_STM mbedtls astyle 2018-06-29 17:11:50 +01:00
Teppo Järvelin 92eab0f99f Cellular: improved observing of disconnect for callbacks. 2018-06-29 17:10:17 +01:00
Antti Yli-Tokola 88798899ae 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-29 17:10:17 +01:00
Teppo Järvelin 90f67902ba Cellular: review fixes for cellularinformation tests. 2018-06-29 17:10:17 +01:00
Teppo Järvelin 789a1c1720 Cellular: added greentea tests for CellularInformation. 2018-06-29 17:10:17 +01:00
Teppo Järvelin 7e82eb5647 Cellular: added more CellularInformation unit tests. 2018-06-29 17:10:17 +01:00
Christopher Haster 69ed638e2e Fixed issue with MBR init asserting on bad partition size 2018-06-29 17:10:17 +01:00
Vincent Coubard a5df9176a9 Nordic BLE: Fix return value verification 2018-06-29 17:10:17 +01:00
Vincent Coubard 2d97c91561 Nordi BLE: Fix formatting 2018-06-29 17:10:17 +01:00
Vincent Coubard 5711b295da Nordic BLE:
Cancel pairing if the device fail to allocate the resources necessary for the pairing operation.
2018-06-29 17:10:17 +01:00
Vincent Coubard 01f5c456f3 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-29 17:10:17 +01:00
Vincent Coubard e8b783b702 Nordic BLE: Store locally role for a given connection. 2018-06-29 17:10:17 +01:00
Vincent Coubard a6eefdfdcf Nordic BLE: Add default parameter to get the local instance of nrF5xn 2018-06-29 17:10:17 +01:00
Vincent Coubard c4ecbfb796 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-29 17:10:17 +01:00
Teppo Järvelin 9527ab33a8 Cellular: fixed unit tests after rebasing with master. 2018-06-29 17:10:17 +01:00
Teppo Järvelin 0e4ca1c46b Cellular: Added network unit tests. 2018-06-29 17:10:17 +01:00
Teppo Järvelin 440c10ad88 Cellular: added greentea tests for CellularNetwork. 2018-06-29 17:10:17 +01:00
Kari Haapalehto b955eb7e49 Add binary drivers for MTB_USI_WM_BN_BM_22 and MTB_ADV_WISE_1530 2018-06-29 17:10:17 +01:00
paul-szczepanek-arm a0b20720dd reuse existing call 2018-06-29 17:10:17 +01:00
paul-szczepanek-arm 338a8fc696 use sets to apply limits 2018-06-29 17:10:17 +01:00
paul-szczepanek-arm c17c674c82 add setScanParams overload 2018-06-29 17:10:17 +01:00
Amanda Butler e60566e85e Copy edit CellularConnectionFSM.h
Copy edit for consistent tense and comma usage.
2018-06-29 17:10:17 +01:00
Teppo Järvelin 83fbeea304 Cellular: fixed defect where SIM interface was closed too early causing crash with certain configurations. 2018-06-29 17:10:17 +01:00
Mika Leppänen 787ea51bad K64F, K66F: Update the ENET PHY driver
PHY init and autonegotation is split into own functions.
2018-06-29 17:10:17 +01:00
Mika Leppänen f1416c76fa 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-29 17:10:17 +01:00
Mika Leppänen 9d062c0352 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-29 17:10:17 +01:00
Hasnain Virk 600efe9906 Remaining style fixes 2018-06-29 17:10:17 +01:00
Hasnain Virk e8f9f4d9f2 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-29 17:10:17 +01:00
Hasnain Virk 6ab0c0b688 Adding port in trace & streamlining continuous RX2 2018-06-29 17:10:17 +01:00
Hasnain Virk 2db1b9a01d 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-29 17:10:17 +01:00
Hasnain Virk d10dee1449 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-29 17:10:17 +01:00
Teppo Järvelin 2cadd9d05c Cellular: fixed unit tests after rebase with latest changes. 2018-06-29 17:10:17 +01:00
Teppo Järvelin 33461805cb Cellular: Added power and sim greentea and unit tests. 2018-06-29 17:10:17 +01:00
Seppo Takalo cfe9225e4f 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-29 17:10:17 +01:00
Seppo Takalo ecef1f55f7 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-29 17:10:17 +01:00
Mika Leppänen 3bc03e3f5d Changed DNS global class definitions to singletons
This saves memory on platforms without network interface.
2018-06-29 17:10:17 +01:00
Mika Leppänen 50a79a6705 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-29 17:10:17 +01:00
Vincent Coubard 8f29bf5b9e 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-29 17:10:17 +01:00
David Saada dc3092fd9a Support erasing of more than one erase unit in the exhaustible block device 2018-06-29 17:10:17 +01:00
Kevin Bracey 1fde01c243 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-29 17:10:17 +01:00
Antti Yli-Tokola b60abe1c3b Update mbed-coap to version 4.4.4
Fixes one error: IOTCLT-2638 Hardfault during reconnection retry with Thread
2018-06-29 17:10:17 +01:00
Mika Leppänen 92a4cb2bc8 Added missing license to header of the file 2018-06-15 13:34:21 +01:00
Mika Leppänen dbbfdbc312 Added UBLOX_C027/ARCH_PRO memory configurations 2018-06-15 13:34:21 +01:00
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