Commit Graph

21 Commits (125f1693422257164a0557b070af3a9ec2833e18)

Author SHA1 Message Date
Martin Kojtal d847f9f164
Merge pull request #12305 from kivaisan/remove_multi_athandler_support_v2
Cellular: Remove support for multiple ATHandlers
2020-02-07 11:00:41 +00:00
Kimmo Vaisanen bd0f939277 Cellular: Remove support for multiple ATHandlers
Major changes:
- Dependency to FileHandle removed from base classes
- AT_CellularDevice owns the default FileHandle and shares it with AT -classes
- Hang-up -detection moved as CellularContext::configure_hup(). Cannot be configured via CellularDevice any more.

Result on NRF52840_DK + BG96:
GCC:
Total Static RAM memory (data + bss): 29360(+296) bytes
Total Flash memory (text + data): 130660(-832) bytes

ARM:
Total Static RAM memory (data + bss): 261554(+8) bytes
Total Flash memory (text + data): 127573(-1193) bytes

IAR:
Total Static RAM memory (data + bss): 25479(+296) bytes
Total Flash memory (text + data): 102418(-527) bytes

RAM increase is because now ATHandler is no longer created with new -operator but is now member of AT_CellularDevice,
so image tool is able to count it. Actually total RAM consumption has decreased due to removed variables.
2020-01-23 09:27:44 +02:00
Mirela Chirica e2048b06b2 Cellular: Remove API's empty default implemetations 2020-01-21 10:45:09 +02:00
Kimmo Vaisanen f7cc3db70b Cellular: Refactor cellular variable visibilities
- Earlier some variables were public even though used only internally
- Also refactored variables to the end of class definitions
- Removed duplicate _property_array from CellularDevice
- Changed _impl methods as protected
2019-12-30 10:00:24 +02:00
Antti Kauppila bda2d37bda Unittests fixed
PRs 12051 and 11996 were merged simultaneously without running tests in between.
This caused unittests to brake and those are fixed with this commit.
2019-12-10 18:02:14 +02:00
Ari Parkkila 94dcab9d69 Cellular: Add API to clear CellularDevice
A new API `CellularDevice::clear()` to clean-up the modem to a default initial state.
Function is virtual so it can be overridden. The default implementation clears all PDP contexts,
but the the first one if that has APN defined as `nsapi.default-cellular-apn`.

CellularStateMachine calls `clear()` to clean-up the modem on initial `connect()`,
if the flag `cellular.clear-on-connect: true` is defined.
2019-09-09 06:14:20 -07:00
Teppo Järvelin 8922eeb014 Cellular: add method to set authentication type to CellularContext
Authentication type must be able to set. It was hard coded to CHAP.
Added unit tests for CellularContext to be able to add test for new function.
2019-05-29 09:46:15 +03:00
Cruz Monrreal dbb33ef423
Merge pull request #9801 from vmedcy/fix-eventqueue-h
Correctly include EventQueue.h
2019-03-16 22:52:40 -05:00
Teppo Järvelin ec73c8a9c7 Cellular: fix connect-disconnect sequence called many times
Fix syncing back to at mode after ppp disconnect.
Fix AT_CellularContext flags and states to allow new connect after disconnect.
Fix that state machine is not reseted in disconnect is it's running (might be
running because of another context or new connect already started).
2019-03-01 14:47:41 +02:00
Volodymyr Medvid b0a33273ff Correctly include EventQueue.h
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h

By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:

mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared

Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
2019-02-21 17:59:05 +02:00
Ari Parkkila 139d506a24 Cellular: Move power on/off to device and remove CellularPower 2019-01-22 02:24:45 -08:00
Mirela Chirica d301e13610 Cellular: Non-IP socket and PDP context for EPS control plane data delivery 2019-01-22 02:24:44 -08:00
Ari Parkkila c7486b2a0d Cellular: Added shutdown() 2019-01-22 02:23:04 -08:00
Teppo Järvelin 22d9105318 Removed CellularSIM interface.
Moved methods to classes CellularDevice and CellularInformation.
SIM interface was removed to simplify cellular usage and
methods better suite new classes.
Updated greentea and unit tests.
2019-01-22 02:23:03 -08:00
Teppo Järvelin e5c3024849 Cellular: adding unit tests for new class CellularContext and changed classes. 2018-11-16 13:14:38 +02:00
Martin Kojtal 3f289c217f unittest: fix stubs coding style 2018-11-15 10:47:14 +00:00
Teppo Järvelin 1a047efade Cellular: review fixes, added missing fixes from master. 2018-11-11 14:13:05 +02:00
Teppo Järvelin 9fb83024ea Changed CellularContext to inherit from CellularBase instead of NetworkInterface. \n Changed Device constructor to take Filehandle instead of eventqueue. 2018-11-11 14:13:05 +02:00
Teppo Järvelin 43e08a0adf Cellular: fixing unit test after refactor. 2018-11-11 14:12:49 +02:00
Martin Kojtal 3a5ef5ee24 unittests: fix astyle 2018-10-25 09:58:18 +01:00
Antti Kauppila 4f97eaee67 CellularDevice_stub added 2018-09-19 10:30:43 +03:00