Commit Graph

930 Commits (7ac968b7b26bedefca3ac1e87d8bac23b07216d7)

Author SHA1 Message Date
Martin Kojtal e4e6ac5bd6
Merge pull request #12008 from AriParkkila/cell-at-string-fix
Cellular: Fix ATHandler string handling
2019-12-03 15:52:39 +01:00
Ari Parkkila c22dd77f42 Cellular: Fix ATHandler string handling 2019-12-03 03:21:13 -08:00
Martin Kojtal da5a8b2b65
Merge pull request #11952 from pferland-multitech/master
Fix for Dragonfly nano and registration for LTE-M plans
2019-12-02 16:55:14 +01:00
Martin Kojtal 24c6c4cab5
Merge pull request #11935 from AriParkkila/cell-depr-device
Cellular: Mark to be deprecated in CellularDevice
2019-11-29 15:45:35 +01:00
Ari Parkkila 088140e04b Cellular: Mark CellularDevice::stop deprecated 2019-11-29 04:24:56 -08:00
Martin Kojtal ffdd54315f
Merge pull request #11941 from michalpasztamobica/remove_internal_string_apis
Remove string-based API usage within mbed-os
2019-11-28 14:26:03 +01:00
Michal Paszta ea04c4f85e Remove internal usage of deprecated APIs in IPCore
Updated:
* netsocket classes,
* unittests, stubs and mocks,
* greentea tests
2019-11-27 20:02:20 +02:00
Martin Kojtal 9974d831fe
Merge pull request #11949 from ARMmbed/acabarbaye-patch-1
Fix for ARMC5 compilation errors for some targets
2019-11-27 13:12:14 +01:00
Martin Kojtal 58d6f5f39f
Merge pull request #11873 from AnttiKauppila/disable_sms
Make SMS configurable in Cellular stack
2019-11-27 09:03:55 +01:00
Peter Ferland 35e4904b23 Enabled CGREG for Dragonfly Nano allowing 2G fallback registrations 2019-11-26 17:20:27 -06:00
Peter Ferland 2301036b80 Changed registration AT commands used by Multitech Dragonfly Nano 2019-11-26 16:53:46 -06:00
Adrien CABARBAYE 877523dab4
Update QUECTEL_BG96_CellularStack.cpp
Similar issue for a different target
`./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp", line 431: Error:  #20: identifier "sprintf" is undefined`
> armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DMBED_ROM_START=0x0 -DMBED_ROM_SIZE=0x80000 -DMBED_RAM_START=0x20000000 -DMBED_RAM_SIZE=0x10000 -DTARGET_SOFTDEVICE_NONE -DTARGET_NORDIC -DCMSIS_VECTAB_VIRTUAL_HEADER_FILE="cmsis_nvic.h" -DTARGET_NRF52 -DCMSIS_VECTAB_VIRTUAL -DTARGET_MCU_NRF52832 -DDEVICE_SPI_ASYNCH=1 -DMBED_TICKLESS -DDEVICE_SLEEP=1 -DFEATURE_BLE=1 -DNRF52_PAN_12 -D__CMSIS_RTOS -DTARGET_SDK_15_0 -DNRF52_PAN_64 -DDEVICE_SPI=1 -DDEVICE_I2C=1 -DNRF52_PAN_15 -DDEVICE_SERIAL=1 -DTARGET_LIKE_MBED -DDEVICE_PORTOUT=1 -DDEVICE_SERIAL_ASYNCH=1 -DTARGET_M4 -DNRF52_PAN_31 -D__FPU_PRESENT=1 -D__CORTEX_M4 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTIN=1 -DTARGET_CORDIO_LL -DTARGET_NRF5x -DCONFIG_GPIO_AS_PINRESET -DDEVICE_SERIAL_FC=1 -DDEVICE_USTICKER=1 -DTARGET_RELEASE -D__MBED__=1 -DTARGET_CORDIO -DMBED_MPU_CUSTOM -DNRF52_PAN_54 -DSWI_DISABLE0 -DDEVICE_INTERRUPTIN=1 -DNRF52_PAN_63 -DNRF52_PAN_51 -DDEVICE_ANALOGIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DTARGET_NORDIC_CORDIO -DNRF52_PAN_62 -DNRF52_PAN_55 -DTARGET_CORTEX -DNRF52_PAN_53 -DDEVICE_PWMOUT=1 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARMC5 -DTARGET_CORTEX_M -DDEVICE_ITM=1 -DMBED_BUILD_TIMESTAMP=1574735595.5081437 -DNRF52_PAN_20 -DDEVICE_I2C_ASYNCH=1 -DDEVICE_LPTICKER=1 -DNRF52_PAN_30 -DTARGET_LIKE_CORTEX_M4 -DTARGET_NAME=MTB_UBLOX_NINA_B1 -DCOMPONENT_NSPE=1 -DDEVICE_TRNG=1 -DNRF52_PAN_58 -DTOOLCHAIN_ARM -DARM_MATH_CM4 -D__MBED_CMSIS_RTOS_CM -DNRF52 -DBOARD_PCA10040 -DDEVICE_FLASH=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_MTB_UBLOX_NINA_B1 -DDEVICE_SYSTICK_CLK_OFF_DURING_SLEEP=1 -DTARGET_NRF52832 -DTOOLCHAIN_ARM_STD -DNRF52_PAN_36 --preinclude=./BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed_config.h --via ./BUILD/MTB_UBLOX_NINA_B1/ARMC5/.includes_3003a516b3c5c98831c114756251051b.txt --depend BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.d -o BUILD/MTB_UBLOX_NINA_B1/ARMC5/mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.o ./mbed-os/features/cellular/framework/targets/QUECTEL/BG96/QUECTEL_BG96_CellularStack.cpp
2019-11-26 15:27:15 +00:00
Adrien CABARBAYE de57ba8b50
Fix for ARMC5 compilation errors for some targets
the following compilation error is seen for a number of targets when compiling using ARMC5
`tools.utils.ToolException: "./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp", line 247: Error:  #20: identifier "sprintf" is undefined`

Failing command:
> 5.06u6/bin/armcc -c --gnu -Ospace --split_sections --apcs=interwork --brief_diagnostics --restrict --multibyte_chars -O3 -DMBED_TRAP_ERRORS_ENABLED=1 --cpu=Cortex-M4.fp.sp --md --no_depend_system_headers --c99 -D__ASSERT_MSG --cpp11 --no_rtti --no_vla -DDEVICE_SERIAL_ASYNCH=1 -D__MBED__=1 -D__CORTEX_M4 -DTOOLCHAIN_ARM -DMBED_BUILD_TIMESTAMP=1574735332.2275832 -DTARGET_RELEASE -DTARGET_GigaDevice -DDEVICE_SERIAL_FC=1 -DARM_MATH_CM4 -DTARGET_LIKE_MBED -DTARGET_GD32E10X -D__FPU_PRESENT=1 -DTARGET_GD32_Target -DTARGET_M4 -DDEVICE_RTC=1 -DDEVICE_INTERRUPTIN=1 -DCOMPONENT_PSA_SRV_EMUL=1 -D__CMSIS_RTOS -DTOOLCHAIN_ARMC5 -DDEVICE_SPISLAVE=1 -DTARGET_GD32_E103VB -DTARGET_CORTEX -DDEVICE_PORTIN=1 -DDEVICE_ANALOGOUT=1 -DDEVICE_I2C=1 -DDEVICE_ANALOGIN=1 -DDEVICE_FLASH=1 -DDEVICE_SLEEP=1 -DCOMPONENT_NSPE=1 -DDEVICE_SERIAL=1 -DDEVICE_PORTOUT=1 -DTARGET_GD32E103VB -DDEVICE_CAN=1 -DTARGET_NAME=GD32_E103VB -DTARGET_CORTEX_M -D__MBED_CMSIS_RTOS_CM -DDEVICE_PWMOUT=1 -DTARGET_FF_ARDUINO -DGD32E10X -DDEVICE_USTICKER=1 -DTARGET_RTOS_M4_M7 -DDEVICE_PORTINOUT=1 -DTOOLCHAIN_ARM_STD -DCOMPONENT_PSA_SRV_IMPL=1 -DDEVICE_SPI=1 -DTARGET_LIKE_CORTEX_M4 -DDEVICE_I2CSLAVE=1 --preinclude=./BUILD/GD32_E103VB/ARMC5/mbed_config.h --via ./BUILD/GD32_E103VB/ARMC5/.includes_022feb5c2e44b9896df9a82c69438bc9.txt --depend BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.d -o BUILD/GD32_E103VB/ARMC5/mbed-os/features/cellular/framework/AT/AT_CellularContext.o ./mbed-os/features/cellular/framework/AT/AT_CellularContext.cpp
[Error] AT_CellularContext.cpp@247,0:  #20: identifier "sprintf" is undefined
2019-11-26 15:05:52 +00:00
Antti Kauppila cb806befcf Enabled SMS by default to not break anything 2019-11-26 16:32:53 +02:00
Ari Parkkila adba109de6 Cellular: Replace CellularSocket.rx_avail with pending_bytes
CellularSocket::rx_avail can be refactored away as
it is a duplicate to CellularSocket::pending_bytes.
2019-11-25 21:49:17 -08:00
Antti Kauppila 353782bf63 Disable SMS by default from Cellular stack
Put SMS behind configuration flag to save some memory (4,5kB) for Cellular users not needing SMS features.
UBlox N2XX target is also updated
2019-11-25 11:38:06 +02:00
Martin Kojtal b6edc5b0cc
Merge pull request #11923 from AriParkkila/cell-ppp-wait-connect
Cellular: Fix PPP to wait until connected event from (LWIP) PPP
2019-11-22 14:12:03 +01:00
Martin Kojtal 38a8c0e28f
Merge pull request #11914 from michalpasztamobica/refactor_string_based_apis
Deprecate string-based APIs in IPCore
2019-11-22 12:00:56 +01:00
Michal Paszta fd5b4b9119 Deprecate string-based APIs in IPCore
MBED_DEPRECATE macros is added to string-based APIs.
New, non-string-based APIs are added in their place.
Wiced binaries rebuilt
Any existing stubs or mocks are adjusted to compile and run with the newly added non-string based functions.
2019-11-22 11:31:12 +02:00
Ari Parkkila 90d7748514 Cellular: Fix PPP to wait until connected event from (LWIP) PPP 2019-11-21 23:14:18 -08:00
Ari Parkkila 2301af398e Cellular: Enable ePCO IE for BG96 driver
As per 3GPP TS 24.301:

If the UE supports NB-S1 mode, Non-IP PDN type, or N1 mode,
then the UE shall support the extended protocol configuration options IE.
...
If the UE supports the extended protocol configuration options IE,
then the UE shall set the ePCO bit to extended protocol configuration options supported
in the UE network capability IE of the ATTACH REQUEST message.
2019-11-19 21:59:19 -08:00
Martin Kojtal cb54f5065f
Merge pull request #11859 from kivaisan/fix_cellular_baremetal_scheduling
Cellular: Fix queue scheduling for bare metal
2019-11-16 07:55:36 +01:00
Martin Kojtal 7b79157a4d
Merge pull request #11580 from wajahat-ublox/ubx_modems_custom_boards
Remove target dependency in ublox cellular APIs
2019-11-15 18:26:54 +01:00
Kimmo Vaisanen deadcee06c Cellular: Fix queue scheduling for bare metal
For non-rtos build (bare metal) cellular event queue is now scheduled by shared event queue.
2019-11-13 14:51:14 +02:00
Antti Kauppila 8aac93a593 ATHandler build warning fixed 2019-11-13 09:38:02 +02:00
Wajahat Abbas 98f3baa455 Removed error directives 2019-11-05 14:25:54 +05:00
Wajahat Abbas a5015c20ee Remove target dependency in ublox cellular APIs 2019-11-05 14:25:54 +05:00
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
Ari Parkkila 823993e7b1 Cellular: Add flow control (IFC) in BG96 AT driver 2019-09-16 03:16:36 -07:00
Kimmo Vaisanen ab71b2dba8 Cellular: Fix get_interface_name to not include leading zero
Multihoming documentation about interface name:
"Two character name string is concatenated with 8 bit value containing index which is incremented on each netif addition"

Cellular uses context id as index and to follow LWIP (LWIP::Interface::get_interface_name), index does not include leading zeros.
2019-09-16 09:59:31 +03:00
Martin Kojtal 66c39e0bca
Merge pull request #11424 from mirelachirica/stack_type_ip_versions
Stack type ip versions
2019-09-13 11:46:06 +02:00
Mirela Chirica 78f4e8b12f Cellular: Enable IPv6 stack property for BG96 2019-09-12 12:56:29 +03:00
Mirela Chirica 7aaaae121e Cellular: IP stack property redefined 2019-09-12 12:56:28 +03:00
Mirela Chirica b44ba531a1 Cellular: Check IP version of send to address 2019-09-12 12:56:28 +03:00
Mirela Chirica ea1b2b8045 Cellular: Stack type based on assigned IP addresses versions 2019-09-12 12:55:33 +03:00
Ari Parkkila 5fbcaeaca5 Cellular: Disable cellular.clear-on-connect by default 2019-09-12 00:02:14 -07: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
Martin Kojtal 978296a26d
Merge pull request #11372 from AriParkkila/bg96-pwr
Cellular: Fix BG96 power on and connect
2019-09-05 13:10:26 +02:00
Martin Kojtal 0427bb7469
Merge pull request #11396 from gpsimenos/remove-sms-floats
Remove floating point from AT_CellularSMS
2019-09-05 11:12:17 +02:00
Martin Kojtal 567479792c
Merge pull request #11392 from hugueskamba/hk-remove-minor-warnings
Remove minor build warnings
2019-09-05 09:59:39 +02:00
Martin Kojtal d135e9bf32
Merge pull request #11394 from hugueskamba/hk-replace-deprecated-wait_us
Replace wait_ms calls with rtos::ThisThread::sleep_for
2019-09-05 09:56:57 +02:00
Ari Parkkila cb20277701 Cellular: Fix BG96 power on and connect 2019-09-04 03:24:11 -07:00
Martin Kojtal aba0760652
Merge pull request #10684 from jarvte/fix_athandler_destr
Cellular: fix ATHandler destructor possible crash on delete
2019-09-04 11:52:59 +02:00
Hugues Kamba 8c22bbbbc8 Use PRIu32 to print uint32_t variable
As the variable underlying type size is different depending on the
toolchain used
2019-09-03 09:29:06 +01:00
Teppo Järvelin 753ba8ceb6 Cellular: fix ATHandler destructor possible crash on delete
In some multithread cases there is possibility that process_oob function
was called after ATHandler was deleted. Fix is to wait if oob processing
is ongoing.
2019-09-03 09:09:05 +03:00
George Psimenos 93cebc189c Avoid potential overflow 2019-09-02 15:48:30 +01:00
Hugues Kamba 97acdc59a3 Replace wait_ms calls with rtos::ThisThread::sleep_for
`wait_ms` is deprecated and its use generates a warning.
2019-09-02 15:24:10 +01:00
Hugues Kamba e65a0c0a99 Remove minor build warnings 2019-09-02 15:04:58 +01:00
George Psimenos 4df70449fe Replace difftime and float literals 2019-09-02 14:56:56 +01:00
Martin Kojtal 39733cbc0b
Merge pull request #11306 from AnttiKauppila/ATHandler_improvements
At handler improvements
2019-09-02 12:08:44 +02:00
Antti Kauppila 9151606bb2 AT locks placed for UBlox AT handling 2019-08-30 08:54:34 +03:00
Martin Kojtal de627dad6a Merge branch 'read-int-zero' of git://github.com/dextero/mbed-os into dev_rollup 2019-08-28 18:37:46 +01:00
Antti Kauppila d08d55da88 New ATHandler functions taken into use
New ATHandler functions taken into use for rest of the targets (BG96 was updated initially) to reduce code size. This means basically that new functions using variadic list approach are taken into use and with those one can usually write AT commands in single line instead of multiple lines.
Only internal changes and API's are not modified.
2019-08-27 09:15:51 +03:00
Martin Kojtal a1540c5f77
Merge pull request #11245 from dextero/8bit-sms
AT_CellularSMS: allow configuring SMS encoding (7-bit/8-bit) at initialization
2019-08-23 13:51:59 +02:00
Martin Kojtal 88dcf27e02
Merge pull request #11246 from AriParkkila/cell-bg96-ipv6
Cellular: Fix BG96 AT driver for IPv6
2019-08-22 11:08:23 +02:00
Martin Kojtal 5c09ff12ac
Merge pull request #11220 from jarvte/fix_cellular_dns_test
Fix cellular dns test with IAR compiled binary
2019-08-22 10:57:22 +02:00
Ari Parkkila 110fb7d524 Cellular: Fix BG96 AT driver for IPv6 2019-08-21 02:46:33 -07:00
Martin Kojtal 0b49952b9e
Merge pull request #11249 from dextero/get-sms-zero
Make AT_CellularSMS::list_messages support index 0 in SMS inbox
2019-08-20 10:27:57 +02:00
Martin Kojtal 9ccfe49d12
Merge pull request #11247 from dextero/international-numbers
AT_CellularSMS: set "international" flag in PDU when applicable
2019-08-20 10:27:13 +02:00
Martin Kojtal b849bc1e3d
Merge pull request #11201 from mirelachirica/bug_virtual_in_constructor
Cellular: Fixed improper AT handler setup through virtual calls in co…
2019-08-20 09:52:28 +02:00
Martin Kojtal a5a2036c65
Merge pull request #11224 from AnttiKauppila/Coverity_fixes
Coverity issues fixed
2019-08-20 09:40:20 +02:00
Marcin Radomski 17f6f1c0e3 Make AT_CellularSMS support index 0 in SMS inbox
When AT+CGML is used to retrieve list of SMS stored in modem inbox,
every message has an associated index. ETSI TS 127 005 v7.0.0 does not
specify what is the allowed range of such indices - all it says is
"integer type; value in the range of location numbers supported by the
associated memory".

Usually, AT modems use positive indexes (starting at 1). Quectel BG96
modem takes a different approach, indexing messages starting at 0.

Current implementation of `AT_CellularSMS::list_messages()` considers
index 0 invalid and ignores such message, effectively making it
impossible to access using mbed-os API.

This commit changes the behavior so that value of 0 is handled as any
other positive message index.
2019-08-16 14:19:29 +02:00
Marcin Radomski 726eace763 Do not fail on trailing data in read_int
Some tests depend on that behavior.
2019-08-16 14:14:58 +02:00
Marcin Radomski c0032c9055 ATHandler::read_int: allow returning 0 successfully 2019-08-16 14:14:58 +02:00
Marcin Radomski 2bfa4e9b8d AT_CellularSMS: set "international" flag in PDU when applicable
Currently, create_pdu receives a destination address without '+' prefix,
and always sets the "type of address" to "unknown". That means, the
number needs to contain appropriate international number prefix (00/011)
if necessary - which is not the case if the leading + is simply
stripped.

This changes send_sms behavior so that when a SMS is sent to an
international number (indicated by leading +):

- AT+CMGS command receives the number with + prefix,
- created PDU has the "international" flag set.
2019-08-16 13:30:59 +02:00
Marcin Radomski f3e9501ac6 Increase PDU buffer size to fit 8-bit-encoded hex string 2019-08-16 13:20:37 +02:00
Marcin Radomski 14f8d15242 Add option to set up SMS encoding 2019-08-16 12:24:54 +02:00
Mirela Chirica 75c823c1a3 Cellular: Fixed improper AT handler setup through virtual calls in constructor
Added AT handler setup method to be used for initialisation routines
that are virtual and therefore cannot be called from constructor.
2019-08-16 10:57:37 +03:00
Anna Bridge 2af2b1b18b
Merge pull request #11190 from jarvte/fix_wise1570_netsocket_tests
Cellular: failure when deleting created context is not considered error
2019-08-15 12:58:32 +01:00
Anna Bridge 797e58a2b3
Merge pull request #11148 from AriParkkila/cell-sim-pin
Cellular: Fix SIM pin enter command
2019-08-15 12:49:24 +01:00
Antti Kauppila 84063bf222 Coverity issues fixed 2019-08-14 16:22:05 +03:00
Martin Kojtal 0a73eda9d4
Merge pull request #11200 from jarvte/move_string_to_pdp_type
Cellular: moved string_to_pdp_type from AT_CellularContext to Cellula…
2019-08-14 12:53:20 +02:00
Teppo Järvelin 6a17d74b55 Cellular: notify global up after we have IP address
CellularContext now tries to get an IP address after connect and before
sending NSAPI_STATUS_GLOBAL_UP. Even if we don't the IP address from
the modem we will send NSAPI_STATUS_GLOBAL_UP and return success.
Modem has an ip address but for some reason some modems don't
give it to us.
2019-08-14 12:54:13 +03:00
Teppo Järvelin 3c1bf0a9e2 Cellular: moved string_to_pdp_type from AT_CellularContext to CellularUtil
string_to_pdp_type is a common method for AT and other layers.
Without moving there will be duplicate methods.
2019-08-12 10:27:57 +03:00
Teppo Järvelin 6e71932baf Cellular: move RAT reading to better support ublox custom boards
AT commands used in read_radio_technology() function are not supported
by all boards so moving the function where it's actually used. Usage was
already inside of the #ifdef's.
2019-08-09 13:23:50 +03:00
Teppo Järvelin 10251ab3b2 Cellular: failure when deleting created context is not considered as an error
If delete fails there is nothing we or application can do. There is no point
returning an error for this. This affects to AT_CellularContext::disconnect
not returning an error if context delete fails.
2019-08-09 12:27:25 +03:00
Seppo Takalo 5f6379a55d
Merge pull request #11119 from Reda-RM/master
Riot Micro cellular device
2019-08-07 14:07:27 +03:00
Seppo Takalo 976c30c52b
Merge pull request #11162 from AriParkkila/cell-dns
Add DNS servers from cellular PDP to nsapi
2019-08-07 14:06:49 +03:00
Seppo Takalo 46a56fb47b
Merge pull request #11154 from AriParkkila/cell-shutdown-stm
Cellular API shutdown to stop state machine
2019-08-06 11:34:44 +03:00
Seppo Takalo dd2d585f30
Merge pull request #11149 from mirelachirica/remove_local_stack_types
Cellular: Remove unnecessary local variables
2019-08-06 11:29:56 +03:00
Ari Parkkila e1124668db Cellular: Add DNS servers from PDP contexts to nsapi_dns 2019-08-05 21:53:24 -07:00
Reda Maher 022b99325b Cellular: Support Riot Micro cellular device 2019-08-03 23:42:26 +02:00
Seppo Takalo 818c1d6f0f
Merge pull request #11130 from Tharazi97/NotSupportedTest
Updated testcases
2019-08-02 13:27:54 +03:00
Seppo Takalo 2ca8487371
Merge pull request #11082 from AriParkkila/cell-bg96-dns
Cellular: Add BG96 AT driver with DNS support
2019-08-02 13:27:09 +03:00
Ari Parkkila ed3562e764 Cellular: Fix shutdown to stop statemachine 2019-08-02 02:26:12 -07:00
Ari Parkkila cbe2b50a32 Cellular: Fix SIM pin enter command 2019-08-01 03:46:33 -07:00
Mirela Chirica 341cc2be03 Cellular: Remove unnecessary local variables 2019-08-01 13:26:05 +03:00
int_szyk ae6f8be146 Newline at the end of files 2019-08-01 08:44:58 +02:00
int_szyk 8b68a1ea58 Updated testcases 2019-07-31 10:46:38 +02:00
Ari Parkkila 71c7ed2fb4 Cellular: Add BG96 AT driver with DNS support 2019-07-31 00:19:05 -07:00
mudassar-ublox 6cd60178fa UBLOX cellular context activation updated for C030_R412M and updated AUTH configuration 2019-07-30 12:19:20 +05:00
Seppo Takalo 2c6280b9c7
Merge pull request #11066 from AriParkkila/cell-fix-restart
Cellular: Fix cellular statemachine stop and BG96 power up
2019-07-29 17:40:35 +03:00
Ari Parkkila 742bfd3709 Cellular: Fix statemachine stop 2019-07-26 00:34:45 -07:00
Ari Parkkila ac78b5ab16 Cellular: Fix to delete context just once 2019-07-23 03:04:24 -07:00
Ari Parkkila 7a5e4ca5da Cellular: Fix BG96 power up 2019-07-18 23:13:36 -07:00
Kevin Bracey a522dcfa0a Replace deprecated wait calls 2019-07-15 10:13:50 +03:00
Kevin Bracey fc8e8f67c6 Deprecate wait/wait_ms APIs 2019-07-15 10:13:50 +03:00
Kevin Bracey 607856ee9a Set unit tests to C++14
Adjust some non-C++11-compatible code that failed as a result.
2019-07-09 19:08:57 +03:00
Martin Kojtal eadc799584
Merge pull request #10919 from jeromecoutant/PR_AT_MUTEX
AT Cellular Network: mutex lock issue
2019-07-05 09:03:07 +01:00
Antti Kauppila c315672413 Doubled ATHandler's BUFF_SIZE 2019-07-02 10:17:06 +03:00
Martin Kojtal d2c73f2bcd
Merge pull request #10842 from ghseb/cellular-stack-type-fixes
Cellular: Stack type fixes
2019-07-01 09:23:21 +01:00