Commit Graph

444 Commits (mbed-os-5.12)

Author SHA1 Message Date
kevin.ong f179be9817 cellular: fix style 2019-05-17 15:38:41 +01:00
kevin.ong 4536193e8d cellular: fix Quectel BG96 missing unlock at socket_connect 2019-05-17 15:38:41 +01:00
Teppo Järvelin a1f0c46cb9 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-05-03 12:24:48 +01:00
Mirela Chirica 1088162208 Cellular: Added WISE-1570 handling for socket closing URC 2019-05-03 12:24:48 +01:00
Kimmo Vaisanen d5889859c7 Cellular: Add description for CellularProperty 2019-05-03 12:24:48 +01:00
Hasnain Virk c8bc33cf3d 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-05-03 12:24:48 +01:00
Mirela Chirica 651e4e2641 Cellular: Added BG96 handling for socket closing URC 2019-04-24 13:37:42 +01:00
Ari Parkkila 8937cf072b Cellular: Fix to delete PDP context on disconnect 2019-04-24 13:37:42 +01:00
Hasnain Virk 805f35f145 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-24 13:37:42 +01:00
Hasnain Virk b2e0110eb5 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-24 13:37:42 +01:00
Hasnain Virk f54decef87 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-24 13:37:42 +01:00
Hasnain Virk 2b6f65495d 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-24 13:37:42 +01:00
Hasnain Virk 356d8cd61e 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-24 13:37:42 +01:00
Hasnain Virk 99fcf65a95 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-24 13:37:42 +01:00
Hasnain Virk b59c26468c Removing left over tracing
A test trace was left lurking around. Removed in this commit.
2019-04-24 13:37:42 +01:00
Hasnain Virk f2b44f5f51 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-24 13:37:42 +01:00
Hasnain Virk 9b90f52e46 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-24 13:37:42 +01:00
Mirela Chirica 1680d07442 Cellular: Check for URC during AT response stop 2019-04-24 13:37:42 +01:00
Teppo Järvelin e4aa999d48 Cellular: Fix deleting of state machine to correct class 2019-04-24 13:37:42 +01:00
Kimmo Vaisanen a2857bac97 Cellular: Improve ATHandler AT traces
Original AT traces had several issue:
- Can be overwritten by other traces (printf/mbed-trace)
- No way to know which direction message was going (TX or RX)
- <cr> and <ln> characters were not visible in trace
etc.

This commit addresses those issues using mbed-trace and showing separately
each filehandle write and read.
2019-04-05 12:27:00 +01:00
mudassar-ublox 4402908bbd C030_N2XX default interface 2019-04-05 12:26:20 +01:00
Ari Parkkila c65fec37c9 Cellular: Fix max packet size for BC95 driver 2019-04-05 12:26:19 +01:00
Teppo Järvelin a12f8cd5db Cellular: don't allow ATHandler read/write if filehandle not usable
For example after going to ppp mode we must block at write and
read as filehandle is not usable.
2019-04-05 12:26:18 +01:00
Teppo Järvelin 811984aa26 Cellular: fix astyle for files that already in master 2019-04-05 12:26:18 +01:00
Teemu Kultala d2a645da72 cellular: remove last CELLULAR_DEVICE references 2019-04-05 12:26:17 +01:00
Teppo Järvelin 390eea4852 Cellular: call AT+CGEREP after sim is ready
Current implementation did call AT+CGEREP before sim was ready
and it was failing in most modems.
2019-04-05 12:26:17 +01:00
Sebastian Stockhammer c9fcf72b77 Setup connection profile with username and password 2019-04-05 12:26:17 +01:00
Ari Parkkila c2e730c15c Cellular: Remove compile dependency of UARTSerial 2019-04-05 12:26:16 +01:00
Sebastian Stockhammer f78e7c7365 Disable dual stack mode for ehs5-e 2019-04-05 12:26:16 +01:00
Sebastian Stockhammer bd15aeaa05 Revert "Disable dual stack mode"
This reverts commit 8611474e6c.
2019-04-05 12:26:15 +01:00
Sebastian Stockhammer 4408bb696c Disable dual stack mode 2019-04-05 12:26:15 +01:00
Sebastian Stockhammer 7d37750b5c Fix registration modes and disable CGSN with type 2019-04-05 12:26:15 +01:00
Sebastian Stockhammer f0e61e7f41 Support Cinterion EHS5-E cellular module 2019-04-05 12:26:15 +01:00
Mirela Chirica 6cbe74f794 Cellular: AT information response to return false on empty prefix 2019-04-05 12:26:15 +01:00
Volodymyr Medvid ba751e3d4a 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-04-05 12:26:12 +01:00
Teppo Järvelin b031dfa1d7 Cellular: removed manual registering state.
Simplified state machine by removing manual registering state.
This was done as some modems did not have all the needed at commands
for checking the registered network. Some modem run out of memory as when
checking correct network there might be so many networks available.
Manual registration still works but it does not do any checks to which network
it's registered. Moved manual registering at command earlier in state machine so it forces
registering to a correct network. Internal refactor/fix, does not affect applications.
2019-04-05 12:26:10 +01:00
Teemu Kultala e206f61ad1 cellular: BC95 memory leak fix 2019-04-05 12:26:08 +01:00
Wajahat Abbas 0443e0dd06 Corrected timeout for +UDNSRN command 2019-04-05 12:26:06 +01:00
Teppo Järvelin fa220011aa Cellular: fix issue where CGACT not supported in coming firmware in BG96. 2019-04-05 12:26:06 +01:00
mudassar-ublox 9427d2653d updated api and removed Astyle issue 2019-04-05 12:26:06 +01:00
mudassar-ublox 5bda91d1f7 C030_N211 api's update and removed N2XX_CellularNetwork class 2019-04-05 12:26:05 +01:00
mudassar-ublox 9d28abae0d C030_N211 cellular api refactoring 2019-04-05 12:26:05 +01:00
mudassar-ublox 5084c669b9 C030_N211 cellular api 2019-04-05 12:26:04 +01:00
Kimmo Vaisanen 9e9f2a2747 Cellular: Fix plmn trace for IAR
IAR compiler does not seem to like printing null strings.
2019-03-24 09:48:43 +00:00
Sarah Marsh b18dbc7378 Fix undefined tr_debug for QUECTEL_BG96 cellular feature 2019-03-24 09:48:43 +00:00
Teppo Järvelin 0905f01438 Cellular: Removed API get_connection_status() from CellularNetwork
This was left accidentally after refactoring.
It wasn't giving correct states after refactoring.
CellularContext::get_connection_status should be used instead.
2019-03-01 14:51:05 +02: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
Cruz Monrreal 50af2c341c
Merge pull request #9752 from mirelachirica/add_comment_fix_warning
Add comment fix warning
2019-02-21 17:30:34 -06:00
Martin Kojtal dbd92c746b
Merge pull request #9387 from tymoteuszblochmobica/Sockets
Multihoming initial release
2019-02-21 13:50:03 +01:00
Martin Kojtal 5ada4bf9af
Merge pull request #9746 from blind-owl/retire_cellularbase_class
Cellular: retire CellularBase class
2019-02-20 15:30:43 +01:00