Commit Graph

803 Commits (19933475325b2c72cc7531e985bc5c5184c82321)

Author SHA1 Message Date
Martin Kojtal 18d4adf04f
Merge pull request #11719 from wajahat-ublox/echo_fix
Ensure modem echo is off before sending other AT commands
2019-11-04 15:56:12 +01:00
Martin Kojtal fe940924cc
Merge pull request #11683 from AnttiKauppila/baremetal_support
Baremetal profile fixes
2019-11-04 15:53:57 +01:00
Martin Kojtal c908404d94
Merge pull request #11783 from mirelachirica/set_baud_rate
Adding set baud rate routine
2019-11-04 15:27:02 +01:00
Martin Kojtal f59d71f0b4
Merge pull request #11772 from u-blox/ubx_context
Cellular: updated cellular context flags and cid in ublox-api
2019-11-04 09:57:08 +01:00
Mirela Chirica c484fc88f9 Cellular: Added set routine for baud rate 2019-11-01 17:21:31 +02:00
Antti Kauppila 0b8cd38dcd Baremetal profile fixes 2019-11-01 15:12:19 +02:00
Martin Kojtal 3c9853af61
Merge pull request #11754 from mirelachirica/athandler_write_hex_string
Cellular: Added write_hex_string to AT handler
2019-10-29 10:00:46 +01:00
Mirela Chirica beeccbe52c Cellular: Added write_hex_string to AT handler 2019-10-28 10:34:05 +02:00
mudassar-ublox fa6c69c824 updated cellular context flags and cid in ublox-api 2019-10-22 11:17:46 +05:00
Wajahat Abbas c5f164d75f Ensure modem echo is off 2019-10-21 15:02:08 +05:00
Martin Kojtal 95343276a5
Merge pull request #11717 from iliapenev/master
Fix Quectel M26 context hang
2019-10-21 11:54:50 +02:00
Martin Kojtal bfb435a899
Merge pull request #11657 from u-blox/ubx_apn_setting
Cellular: Fix apn check
2019-10-21 09:36:27 +02:00
Ilia Penev ad1387b2fd Fix Quectel M26 context hang 2019-10-21 00:48:22 +03:00
Martin Kojtal 19606710e6
Merge pull request #11630 from kivaisan/move_is_connected_as_protected
Cellular: Change visibility of _is_connected as protected
2019-10-16 15:58:50 +08:00
Martin Kojtal 0e7d8927f1
Merge pull request #11615 from kivaisan/remove_deprecated_cellular_tests
Cellular: Remove old deprecated tests
2019-10-14 09:28:01 +02:00
Anna Bridge 22951d7378
Merge pull request #11616 from u-blox/ubx_cellular_api
Cellular: Setting timeout before send command in gethostbyname.
2019-10-11 10:45:41 +01:00
Anna Bridge 319fd671b1
Merge pull request #11618 from AriParkkila/cell-stm-pwr
Cellular: Fix CellularStateMachine to not loop between init/power states
2019-10-11 10:44:36 +01:00
mudassar-ublox c8ade9032b fix apn check 2019-10-09 12:31:53 +05:00
Anna Bridge ad891d9658
Merge pull request #11548 from AriParkkila/cell-dns-ip
Cellular: Fix resolving of DNS server IPv4/6 address
2019-10-07 16:46:47 +01:00
Anna Bridge 5108f9188d
Merge pull request #11558 from Tharazi97/Coverity_fixes
Coverity fixes
2019-10-07 14:52:11 +01:00
Kimmo Vaisanen 1279c20ce6 Cellular: Change visibility of _is_connected as protected
AT_CellularContext::do_connect() is a virtual API and therefore can be overwritten in
inherited class. The problem was that it sets AT_CellularContext::_is_connected flag but
earlier it was set as private member making it impossible to set in overwritten do_connect()
method.

This commit fixes the problem by changing _is_connected as protected enabling its use
in inherited class.
2019-10-04 10:29:56 +03:00
Anna Bridge eeb033f814
Merge pull request #11357 from kivaisan/offloaded_tlssocket_bg96
Offloaded TLSSocket and BG96 support for it
2019-10-03 11:54:32 +01:00
Ari Parkkila 73145fd551 Cellular: Fix CellularStateMachine to not loop on power state 2019-10-03 01:12:14 -07:00
Kimmo Vaisanen b6ebfeea2c Cellular: Remove old deprecated tests
Cellular tests have been replaced with generic mbed-os netsocket and network interface tests.
2019-10-03 10:24:12 +03:00
mudassar-ublox b2d0448351 setting timeout before send command 2019-10-03 12:22:17 +05:00
Martin Kojtal 31114ba343
Merge pull request #11598 from JanneKiiskila/AT_Cell_err_warn
AT_CellularDevice.cpp - unused variable err warning
2019-10-01 13:35:03 +02:00
Martin Kojtal 828fd2378a
Merge pull request #11581 from AriParkkila/cell-pdp-cid
Cellular: Fix setting of PDP context ID (cid)
2019-10-01 13:32:47 +02:00
Janne Kiiskila 55f6518853 AT_CellularDevice.cpp - unused variable err warning
We get this compiler warning;

Compile [  7.9%]: AT_CellularDevice.cpp
[Warning] AT_CellularDevice.cpp@206,18: variable 'err' set but not used [-Wunused-but-set-variable]

Due to the fact, that the code that would actually use this variable
is behind trace flags. Based on review feedback from Antti Kauppila and
Kimmo Väisänen, adding same flagging also for that.
- Reason being - the operation needs to be within the locks.
2019-09-30 17:11:23 +03:00
Mirela Chirica 0860f3e0f6 Cellular: Removed not used variable 2019-09-30 14:14:37 +03:00
Mirela Chirica 865a504542 Cellular: Include of errno.h needed for Mac OS X 2019-09-30 14:14:37 +03:00
Ari Parkkila e449e6dcdc Cellular: Fix setting of PDP context ID (cid) 2019-09-27 02:09:36 -07:00
Ari Parkkila 8054b8eef8 Cellular: Fix resolving of DNS server IPv4/6 address 2019-09-25 03:16:45 -07:00
Kimmo Vaisanen 6ba0efc969 Cellular: Use more specific error codes for socket open and connect
- When calling socket APIs when socket is not open, NSAPI_ERROR_NO_SOCKET will be
  returned instead of generic NSAPI_ERROR_DEVICE_ERROR

- If socket_send() is called when connection is not open, NSAPI_ERROR_NO_CONNECTION
  will be returned instead of generic NSAPI_ERROR_DEVICE_ERROR
2019-09-25 09:25:33 +03:00
Kimmo Vaisanen b319be14e8 Offloaded TLSSocket for BG96
Some external modems have an internal TLSSocket implementation which can be used
instead of mbedtls based TLSSocket. Using offloaded TLSSocket can result in
significantly reduced ROM usage.

Offloaded TLSSocket can be enabled by enabling "nsapi.offload-tlssocket" and the used
network stack (e.g. cellular modem's CellularStack class) must support the setsockopt's
defined in nsapi_types.h.

Compared to original mbedtls based TLSSocket, offloaded TLSSocket brings in one significant
API limitation. Offloaded TLSSocket requires setting of certificates and keys after open()
and before connect() calls, where mbedtls based TLSSocket allows setting these before open()
call.
2019-09-25 09:25:33 +03:00
Martin Kojtal d91ed5fa42
Merge pull request #11495 from kivaisan/improve_cellular_ut
Improve cellular unittests
2019-09-24 16:37:02 +02:00
Martin Kojtal e1cfb7b908
Merge pull request #11534 from kivaisan/handle_qisend_send_fail
Cellular: Handle SEND FAIL and ERROR response
2019-09-24 13:30:32 +02:00
int_szyk b0b9553991 CellularStack: remove unnecessary assignment.
Fixes Coverity issue about unused variable.
2019-09-24 11:05:01 +02:00
int_szyk 7c13b8f6b9 CellularUtil prefer_ipv6: check length.
Fixes Coverity issue about not checking the length of string before copying it.
2019-09-24 10:44:38 +02:00
Martin Kojtal daafb950d9
Merge pull request #11538 from mirelachirica/ipv6_to_wise_1570
Cellular: Enable IPV6 for WISE_1570
2019-09-20 15:29:07 +02:00
Kimmo Vaisanen 1768b653ec Cellular: Handle SEND FAIL and ERROR response
QISEND command can respond either SEND OK, SEND FAIL or ERROR.
If response is not SEND OK, sent bytes should not be checked but
error should be reported.
2019-09-20 10:06:32 +03:00
Martin Kojtal 11a34ec092
Merge pull request #11521 from u-blox/clear_after_sim_pin
Bux fix: Context can be cleared using CGDCONT after sim ready state
2019-09-19 17:15:55 +02:00
Mirela Chirica 090ce0358f Cellular: Enable IPV6 for WISE_1570 2019-09-19 16:19:31 +03:00
Syed Fahimuddin Alavi a269f714cc Fix added to unlock AT handler mutex 2019-09-19 16:46:00 +05:00
Martin Kojtal 1afece7f1b
Merge pull request #11488 from kivaisan/fix_cellular_get_interface_name
Cellular: Fix get_interface_name to not include leading zero
2019-09-19 12:43:45 +02:00
Martin Kojtal c1a1c22fe9
Merge pull request #11469 from AriParkkila/cell-clear-ndef
Cellular: Disable cellular.clear-on-connect by default
2019-09-19 10:37:10 +02:00
Martin Kojtal 185e380233
Merge pull request #11490 from AriParkkila/cell-bg96-ifc
Cellular: Add flow control (IFC) in BG96 AT driver
2019-09-19 10:25:47 +02:00
Syed Fahimuddin Alavi 828fffbc4e Bux fix: Context can be cleared using CGDCONT after sim ready state 2019-09-19 13:01:45 +05:00
Kimmo Vaisanen ba4308344b Cellular: Fix stop tag for Quectel M26 send command
Possible responses for send command are SEND OK<cr><ln>, SEND FAIL<cr><ln> or ERROR<cr><ln>
so normal OK<cr><ln> response check does not work properly.
2019-09-17 15:52:14 +03:00
Kimmo Vaisanen b6ecce0bfb Add UT for AT_CellularNetwork::is_active_context 2019-09-17 12:56:47 +03:00
Kimmo Vaisanen e824714cd8 Add UT for CellularUtil::hex_to_char and ::hex_str_to_char_str
Also added checks for pointer validity.
2019-09-17 12:15:03 +03:00