Commit Graph

5469 Commits (7b0915c7d4073a1e40edebab285a0cfb22a5c67c)

Author SHA1 Message Date
paul-szczepanek-arm ebcff4b2d2 improve wording of the docs 2019-05-15 13:25:28 +01:00
Anna Bridge 8e44a75a75
Merge pull request #10575 from paul-szczepanek-arm/CCC-writeback-fix
BLE: fix CCC callback not being called when writing to a CCC
2019-05-15 12:06:58 +01:00
Martin Kojtal 26aa16ff39
Merge pull request #10557 from jarvte/fix_cellularcontext_init
Cellular: Initialize CellularContext member variables in correct class
2019-05-15 08:48:54 +01:00
kevin.ong 75162f9e1a cellular: fix style 2019-05-15 01:08:11 +08:00
Vincent Coubard ca7be271c9 BLE: Remove incorrect calls to GattServer::handleDataSentEvent 2019-05-14 17:16:05 +01:00
Vincent Coubard de482e4029 BLE: Create and handle write_command Event.
This event is raised when a write command has been sent to the controller. It can be used to queue a new write command.
2019-05-14 17:13:51 +01:00
Vincent Coubard e814a3cfb3 BLE: handle GattServerEvents::GATT_EVENT_DATA_SENT 2019-05-14 17:12:02 +01:00
Vincent Coubard 134f71e6ba BLE: Connect generic gatt client as pal EventHandler. 2019-05-14 17:11:29 +01:00
paul-szczepanek-arm 26fe4dd174 add info on rx acl buf size 2019-05-14 16:57:14 +01:00
paul-szczepanek-arm 064e8de93d put the acl buffer size in config 2019-05-14 16:52:24 +01:00
kevin.ong 20a06d8c2d cellular: fix Quectel BG96 missing unlock at socket_connect 2019-05-14 22:39:42 +08:00
paul-szczepanek-arm eda064563c no read callback for CCC 2019-05-14 11:20:14 +01:00
paul-szczepanek-arm de2743b702 not include attribute write cback for CCC 2019-05-14 10:16:08 +01:00
Teppo Järvelin d56c8cafa8 Cellular: fixed compile warnings from cellular 2019-05-14 08:48:29 +03:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Martin Kojtal 1aa95c017b
Merge pull request #10456 from tymoteuszblochmobica/multihoming
LWIP 2.1.2 tcpip thread stack overflow fix.
2019-05-13 14:17:36 +01:00
Martin Kojtal f65e30eb21
Merge pull request #10523 from yossi2le/yossi_fix_general_filesystem_tests
Removing support of FLASHIAP in general_filesystem tests
2019-05-13 13:28:34 +01:00
Martin Kojtal e7b8ccf0ae
Merge pull request #10511 from AriParkkila/cell-statemachine-timeout
Cellular: Fix setting of statemachine timeout
2019-05-13 06:41:29 +01:00
Martin Kojtal 03cda262c3
Merge pull request #10500 from andrewc-arm/patch-2
This removes many const char* warnings related with LWIP_ASSERT()
2019-05-12 20:07:52 +01:00
Anna Bridge 97e1c9cbaf
Merge pull request #10287 from linlingao/pr10177
Enable MTS_DRAGONFLY_F411RE to register with Pelion
2019-05-10 16:21:46 +01:00
Tymoteusz Bloch 51610cc90c Fixed TCP connection close.
If TCP FSM is in ESTABLISHED state,  waits  for TCP close handshaking until TIME_WAIT
The purpose is to prevent eth/wifi driver stop and  FIN ACK corrupt.
This may happend if network interface disconnect follows immediately after socket_close.
2019-05-10 17:00:38 +02:00
Teppo Järvelin e4ee870b2e Cellular: Initialize CellularContext member variables in correct class
CellularContext member variables were initialized in inheriting class.
Now in base class where they should be initialized so that every inheriting
class don't have to init them.
2019-05-10 11:43:48 +03:00
Ari Parkkila 830b4234e9 Cellular: Fix setting of statemachine timeout 2019-05-09 04:42:30 -07:00
aqin 43759c0c4b Enterprise mode + wifi configuraiton api 2019-05-08 17:52:04 +05:00
Olli-Pekka Puolitaival 842d145d91 Py3 fixes for test scripts 2019-05-08 13:46:01 +03:00
Anna Bridge 41fe7ed728
Merge pull request #10496 from andrewc-arm/patch-1
Allow application to override LWIP_RAW
2019-05-07 15:59:22 +01:00
Anna Bridge 0ac1c97ed2
Merge pull request #10355 from OpenNuvoton/nuvoton_kvstore_other_bd
KVStore: Support external storage out of mbed-os tree
2019-05-07 15:56:41 +01:00
Tymoteusz Bloch 461efaae0a LWIP 2.1.2 tcpip thread stack overflow fix.
Applied missing LWIP patch to PPP/utils.c
"Major Refactoring & extensions" commited on May 23, 201 by hasnainvirk
LWIP 2.1.2 tcpip thread stack is restored to 1200 bytes
2019-05-07 15:19:41 +02:00
Martin Kojtal 13880dcd1b
Merge pull request #10465 from jarvte/fix_imsi_length
Cellular: fix calls to ATHandler::read_string(...) give correct size
2019-05-03 08:38:40 +01:00
Martin Kojtal 4da21c04fe
Merge pull request #10463 from mirelachirica/wise_1570_tcp_endpoint_close
Cellular:  Add WISE-1570 handling for socket closing URC
2019-05-03 08:35:45 +01:00
Martin Kojtal 3eaad5fd9f
Merge pull request #10485 from JanneKiiskila/nvstore-compiler-warning
NVStore.cpp compiler warning removal (os_ret)
2019-05-03 08:20:45 +01:00
Lin Gao 84b8517905 Increase tcpip thread size for MTS_DRAGONFLY_F411RE 2019-05-02 11:34:30 -05:00
Lin Gao 2c22f549e9 Add option to keep post_binary_hook and make it default. It can be disabled by setting it to null 2019-05-02 11:25:20 -05:00
Yossi Levy 130cab4bb4 Removing FLASHIAP support form general_filesystem tests as it is marked as skip anyway 2019-05-02 15:40:48 +03:00
Yossi Levy f74d545a9d When reading ROT from KVStore the return ROT key size was ignored 2019-04-30 17:44:24 +03:00
Martin Kojtal 094f648123
Merge pull request #10488 from kivaisan/add_cellularproperty_description
Cellular: Add description for CellularProperty
2019-04-30 09:40:08 +01:00
Martin Kojtal 1ce073a9c2
Merge pull request #10402 from jarvte/disconnect_per_context
Cellular: send disconnect to correct ctx
2019-04-29 13:17:59 +01:00
Andrew Chong aba02273ea This removes many const char* warnings related with LWIP_ASSERT() 2019-04-27 22:47:00 +08:00
Andrew Chong 058f07452a
Allow application to override LWIP_RAW 2019-04-27 00:22:00 +09:00
Anna Bridge f28b82b831
Merge pull request #10475 from kivaisan/ns_eventloop_tick_timer
Implement nanostack eventloop tick timer
2019-04-26 13:38:17 +01:00
Anna Bridge 1647282de9
Merge pull request #10462 from michalpasztamobica/nanostack_semaphore_release_connecting
Nanostack: release connect_semaphore only when it is pending
2019-04-26 13:37:53 +01:00
Anna Bridge 1b63aadb5e
Merge pull request #10461 from caixue1102/mbed-os-rda
Update wifi driver for rda target UNO_91H
2019-04-26 13:37:28 +01:00
Anna Bridge a98157a387
Merge pull request #10453 from hasnainvirk/minor_doc_update
Cellular: Minor doc update for CellualrSocket object
2019-04-26 13:37:01 +01:00
Anna Bridge 016ce322b4
Merge pull request #10434 from michalpasztamobica/nanostack_network_handler_fix
Nanostack network handle does not always call status cb for BOOTSTRAP events
2019-04-26 13:33:46 +01:00
Anna Bridge 9f18456114
Merge pull request #10410 from michalpasztamobica/nanostack_translate_sendmsg_errors
Nanostack: translate errors from sendmsg
2019-04-26 13:32:59 +01:00
Anna Bridge b1cd3dab16
Merge pull request #10258 from davidsaada/david_remove_feature_storage
Remove FEATURE_STORAGE and all underlying deprecated features
2019-04-26 13:31:37 +01:00
Kevin Bracey 87396e0bf6 Assembler atomics
Reimplement atomic code in inline assembly. This can improve
optimisation, and avoids potential architectural problems with using
LDREX/STREX intrinsics.

API further extended:
* Bitwise operations (fetch_and/fetch_or/fetch_xor)
* fetch_add and fetch_sub (like incr/decr, but returning old value -
  aligning with C++11)
* compare_exchange_weak
* Explicit memory order specification
* Basic freestanding template overloads for C++

This gives our existing C implementation essentially all the functionality
needed by C++11.

An actual Atomic<T> template based upon these C functions could follow.
2019-04-26 13:12:35 +03:00
Kimmo Vaisanen 38aa56efa8 Cellular: Add description for CellularProperty 2019-04-26 12:37:52 +03:00
Mirela Chirica 948f8b52d0 Cellular: Added WISE-1570 handling for socket closing URC 2019-04-26 10:12:12 +03:00
Janne Kiiskila 300c3e767c NVStore.cpp compiler warning removal (os_ret)
One gets this compiler warning from nvstore.cpp:

```
Compile [ 48.6%]: nvstore.cpp
[Warning] nvstore.cpp@814,9: variable 'os_ret' set but not used [-Wunused-but-set-variable]
```

Turns out it's caused by the fact that the variable is only used
with MBED_ASSERTs, which get optimized out or not, depending on your
build profile. In reality we do not need a separate variable for that
in my opinion though, so we can just use the ret-variable instead
and drop the os_ret variable completely and thus avoid this
compiler warning.
2019-04-25 22:55:29 +03:00
Kimmo Vaisanen 7349bc8a47 Implement nanostack eventloop tick timer
Nanostack eventloop tick timer can be used in case high resolution
platform timer is not needed. One usecase for that is Pelion
Cloud client when using for example cellular connectivity. This enables
PDMC application to enter deep sleep state.
2019-04-25 12:01:52 +03:00
Teppo Järvelin 1abf600d03 Cellular: fix calls to ATHandler::read_string(...) give correct size
ATHandler::read_string(...) buffer size param was changed a long time ago
to include also NULL. Some calls still gave wrong size after this change.
2019-04-25 11:20:05 +03:00
ccli8 63d9cde507 KVStore: Support block device out of mbed-os tree
To support block device out of mbed-os tree in KVStore, user needs to:
1. Configure blockdevice to "other".
2. Override get_other_blockdevice() to provide block device out of mbed-os tree.
2019-04-25 09:56:20 +08:00
Michal Paszta 2b26a62cc7 Nanostack: release connect_semaphore only when it is pending
Only release if the current _connect_status is CONNECTING. If the semaphore is released many times for each connect, then the next connect will not wait(), as it will be able to decrement the semaphore imediatelly.
2019-04-24 11:31:16 +03:00
蔡雪 (Xue Cai) d6730f5afc Update wifi driver for rda target UNO_91H 2019-04-24 11:29:50 +08:00
Hasnain Virk 4eaffb4b03 Minor doc update
Socket ID is usually spitted out by the modem, however there are cases
when the modem is actully taken in as an input argument, e.g., in the
case of QUECTEL M26 modem. This minor knit clarifies that the
CellularSocket::id can be an input argument.
2019-04-23 12:36:29 +03:00
Martin Kojtal 46603f831e
Merge pull request #10411 from mirelachirica/bg96_tcp_endpoint_close
Cellular: Added BG96 handling for socket closing URC
2019-04-18 18:00:30 +01:00
Martin Kojtal 7392d51460
Merge pull request #10394 from kjbracey-arm/networking_warnings
Networking: Fix some ARMC6 warnings
2019-04-18 13:15:45 +01:00
Martin Kojtal 3ec9c190d0
Merge pull request #10314 from kjbracey-arm/rt1050_dcache
i.MX RT1050: Reactivate data cache
2019-04-18 09:49:13 +01:00
Martin Kojtal 658a41c015
Merge pull request #10417 from paul-szczepanek-arm/fix-coverity
suppress coverity error
2019-04-18 08:16:14 +01:00
Martin Kojtal 998cdf2223
Merge pull request #10418 from marcemmers/fix-cordio-gattserver-insert-characteristic
CordioGattServer: reset settings variable before ANDing the properties to it
2019-04-18 08:14:34 +01:00
Michal Paszta 8d1edc7db8 Nanostack network handle does not always call status cb for BOOTSTRAP events
UBLOX_EVK_ODIN_W2 advertises more events than we expect.
1) When disconnecting first network connectivity is lost and then an
actual disconnection event arrives. The first one is unexpected.
2) When reconnecting MESH_BOOTSTRAP_START_FAILED shows up, but the board
eventually manages to connect
2019-04-17 19:31:36 +03:00
Kevin Bracey 69c6cc341b Networking: Fix some ARMC6 warnings
Some int-versus-long and signed-versus-unsigned format string
mismatches, and missing `class` keyword.
2019-04-17 16:03:44 +03:00
Teppo Järvelin 9d67a8b61c Cellular: send disconnect to correct ctx
Disconnect was sent to all CellularContext classes even it concerned
one specific context. Some disconnect events are still sent to all
context classes. These event are coming from network and ment for all
context classes or event did not specify cid.
2019-04-17 13:53:40 +03:00
Mirela Chirica 88ea0db30d Cellular: Added BG96 handling for socket closing URC 2019-04-17 11:25:58 +03:00
Martin Kojtal b2b2fcea7b
Merge pull request #10375 from AriParkkila/cell-context-cleanup
Cellular: Fix to delete PDP context on disconnect
2019-04-17 09:23:52 +01:00
Marc Emmers d11cf287ac Make sure to reset settings before applying the properties 2019-04-16 16:28:28 +02:00
paul-szczepanek-arm 482e9c390c suppress coverity error 2019-04-16 14:19:31 +01:00
Michal Paszta d1d0118752 Nanostack: translate errors from sendmsg
Translate errors to NSAPI_ERROR_*, instead of always returning
NSAPI_ERROR_DEVICE_ERROR
2019-04-16 15:03:50 +03:00
Martin Kojtal 1a14b9705a ExhaustibleBD: licensed under Apache 2.0
Fixing license, to the same one as .cpp file.
2019-04-16 10:32:23 +01:00
Martin Kojtal 4401d41428
Merge pull request #10053 from AriParkkila/cellular-state-timeout
Cellular: Make CellularStateMachine timeouts configurable
2019-04-15 08:53:11 +01:00
Martin Kojtal b0ba3d3dad
Merge pull request #10353 from tymoteuszblochmobica/multihoming
Update to LWIP 2.1.2
2019-04-15 08:49:51 +01:00
Cruz Monrreal f1c4a029c2
Merge pull request #9844 from cmonr/travisCI-refactor
Travis CI: Stages, OS update, apt-get relief!
2019-04-12 09:17:55 -05:00
Tymoteusz Bloch 42b5680697 Multihoming fixed according to new LWIP implementation. 2019-04-11 20:54:48 -05:00
Tymoteusz Bloch 1632cc9ee4 Initial version of LWIP 2.1.2 2019-04-11 20:54:48 -05:00
Cruz Monrreal b8410d85ab
Merge pull request #10369 from tymoteuszblochmobica/l3_interfacefix
L3IP interface input handler change.
2019-04-11 20:21:20 -05:00
Martin Kojtal f56808f9bf
Merge pull request #10368 from kfnta/sequana_flash_ps
FUTURE_SEQUANA_PSA fix PSA Protected storage
2019-04-11 14:00:39 +01:00
Ari Parkkila 79c54372f2 Cellular: Fix to delete PDP context on disconnect 2019-04-11 03:58:56 -07:00
Tymoteusz Bloch 7d13b758cb L3IP input now use tcpip_input instead of ip_input 2019-04-10 17:49:04 +02:00
Oren Cohen f70e069838 Configure PS with tdbstore 2019-04-10 17:33:37 +03:00
Hasnain Virk 34fc828601 Flagging WEAK method implementation for default construction
CellularDevice::get_default_instance() is a weak method and is overriden
by either a default construction provided in the code or by application
at some stage. This method needs to be flagged otherwise using another
driver will be hindered by the default overriding of this driver.
2019-04-10 12:52:38 +03:00
Ari Parkkila e0f8b2116a Cellular: Fix CellularStateMachine timeout configurations 2019-04-09 22:02:38 -07:00
Cruz Monrreal 6dbc00dd8a
Merge pull request #10292 from hasnainvirk/ec2x_driver
Cellular: Basic driver for Quectel EC25/EC21
2019-04-09 11:06:51 -05:00
Cruz Monrreal cec5a85761
Merge pull request #10354 from hasnainvirk/compile_error_at_handler
Cellular: Using new rather than malloc in debug_print
2019-04-09 11:06:15 -05:00
Cruz Monrreal d1672d0200
Merge pull request #10341 from mirelachirica/check_urc_resp_stop_1
Cellular: Check for URC during AT response stop
2019-04-09 11:05:56 -05:00
Teppo Järvelin 8234f00506 Cellular: fix state machine to compile after master rebase
Fix automatic rebase error with cellulardevice.cpp
2019-04-09 14:00:59 +03:00
Teppo Järvelin 2470a3611c Cellular: new state machine state and better info from stm
Added new state (signal quality) and more information about progress
so application/driver can build recovery logic.
2019-04-09 13:44:45 +03:00
Hasnain Virk 9229aba87d Using new rather than malloc in debug_print
Using malloc will require us to add stdlib.h somewhere in the path for
the application. Maybe the CI apps are adding stdlib.h and that's why
the code would have worked. In a custom app, it can happen that the
header is not included. Using new avoids the need to add stdlib.h
anywhere and it is more in line with C++.
2019-04-09 12:25:59 +03:00
Martin Kojtal a59ba20aec
Merge pull request #10338 from jarvte/fix_deleting_of_stm
Cellular: Fix deleting of state machine to correct class
2019-04-09 10:59:15 +02:00
Martin Kojtal 47838ea4be
Merge pull request #10340 from paul-szczepanek-arm/fix-negotiate-mtu
BLE: fix missing implementation call
2019-04-09 10:58:59 +02:00
Mirela Chirica f100cd59c8 Cellular: Check for URC during AT response stop 2019-04-09 11:15:28 +03:00
Hasnain Virk 69efed266d Marking TX and RX pins for UARTSerial as NC
For default construction of the driver, it would be necessary to define
the pins. However as we don't know the correct pins, until/unless user
sets them up for us. So it makes sense to mark the pins as NC. It would
be easier to debug if the pins are set to NC if user forgot to set them
up.
2019-04-09 10:20:38 +03:00
Cruz Monrreal II f6b9109934 Fixed littlefs tests to be Py3 compat 2019-04-08 10:45:07 -05:00
Hasnain Virk 7ebfa90753 Adding pin polarity and changing the constructor
To make this driver more useful, we needed to do some changes. The
wirings for the modem can differ on the board so we also need to be
flexible in our approach.
It is now mandatory to provide the power pin and pin polarity in the
constructor alongwith the file handle. Reset pin is optional.
2019-04-08 17:32:52 +03:00
Hasnain Virk 57d9e27532 Tidying up the boiler plate code
A little tidying up was needed as there was some boiler plate code that
could be shoved into a corner and reused.
2019-04-08 17:32:52 +03:00
Hasnain Virk 24178bc374 AT+CGSN with EC2X does not take parameter
Standard 3GPP TS27.007 states that the AT+CGSN command can optionally
have type parameter that determines the output. However Quiectel EC2X
series doesn't accept parameters. We need to reflect that in the
cellular properties setup.
2019-04-08 17:32:52 +03:00
Hasnain Virk df7f8cdfcf CREG can handle lac/ci/lat
AT+CREG command can also provide information regarding lac/ci/lat etc so
we should set the mode correctly in cellular properties structure.
2019-04-08 17:32:52 +03:00
Hasnain Virk ab978bde6c Removing left over tracing
A test trace was left lurking around. Removed in this commit.
2019-04-08 17:32:52 +03:00
Hasnain Virk 04299e45a3 Basic driver for Quectel EC25/EC21
Provides basic power up / power down sequences for Quectel EC2X series
modems. Can be used in PPP mode. For using the on-board IP stack, we
will need to add and implement classes that provide context.

Driver constructor takes power and reset control pins along with the
FileHandle. A default construction is provided which can be chosen by
the application in its mbed_app.json. Otherwise the user is free to
construct as per demand.
2019-04-08 17:32:52 +03:00
paul-szczepanek-arm 217b295f46 missing default impl 2019-04-08 14:56:23 +01:00