Commit Graph

633 Commits (15ec24e1b4fe6db53ce62929b9b48dc48c7ebfff)

Author SHA1 Message Date
Martin Kojtal 752101d041
Merge pull request #10696 from AriParkkila/cell-ublox-at-connect
Cellular: Fix socket connect on UBLOX_AT driver
2019-06-03 08:52:43 +01:00
Martin Kojtal 9a3c175e96
Merge pull request #10588 from AriParkkila/cell-bg96-power
Cell bg96 power
2019-06-03 08:38:58 +01:00
Martin Kojtal 523ad23a30
Merge pull request #10656 from jarvte/fix_cellularctx_destr
Cellular: AT_CellularContext disconnect in non-blocking mode
2019-05-31 12:35:59 +01:00
Ari Parkkila 73164710af Cellular: Fix socket connect on UBLOX_AT driver 2019-05-29 03:19:07 -07:00
Martin Kojtal 9cc1caa031
Merge pull request #10596 from kjbracey-arm/sem_acquire
Introduce Semaphore::acquire methods
2019-05-29 06:22:30 +01:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Teppo Järvelin 779fb6defd Cellular: AT_CellularContext disconnect in non-blocking mode
Disconnect was supporting only blocking mode.
2019-05-27 12:23:29 +03:00
Martin Kojtal a434583b6e
Merge pull request #10442 from trowbridgec/patch-1
Cellular: Make AT_CellularContext::get_context() virtual
2019-05-24 12:38:35 +01:00
Ari Parkkila e49d7bbdcd Cellular: Add BG96 power control 2019-05-24 00:30:04 -07:00
Martin Kojtal 4567626ade
Merge pull request #10636 from u-blox/activation_status
+UPSND sent to poll activation status
2019-05-23 21:39:48 +01:00
Martin Kojtal 51b835b03b
Merge pull request #10473 from DanielDmlee/BG96_IPV6_only
Add exception case for IPV6 only mode of BG96.
2019-05-23 15:29:34 +01:00
Bilal Qamar 255e2e5623 Correction in AT Command 2019-05-23 16:15:10 +05:00
Bilal Qamar 4a37b13bd0 Coding style corrected 2019-05-23 14:26:38 +05:00
Hasnain Virk 9e72fa29e6 Updating Ublox to accomodate socket id assignment
Changes to accomodate socket id assigment upon actual creation of the
socket at the modem.
2019-05-22 23:44:09 -07:00
Hasnain Virk 2e53a71d45 Updating M26 to accomodate socket id assignment
This modem is a special case. It uses a given socket ID value rather
than providing one. A naive solution here would be to directly map the
index of a CellularSocket object in the CellularSocket container. But
considering the case where there are multiple sockets being opened (some
sockets being already created at the modem and some yet not created), direct mapping
to indices will not work. As it can happen that the CellularSocket
object is allocated but the socket id is not assigned yet as it is not
actually created on the modem.

In such a case, we check the container and assign the socket id from the
pool if an empty slot was found.
2019-05-22 23:44:09 -07:00
Hasnain Virk 3fffa3bd57 Updating BG95 to accomodate socket id assignment
Changes to accomodate socket id assignment upon actual creation of the
socket at the modem.
2019-05-22 23:44:09 -07:00
Hasnain Virk 0308cb826a Updating Gemalto Cinterion to accomodate socked id assignment
Changes introduced to accomodate the socket id assignment upon actual
creation of the socket at the modem.
2019-05-22 23:44:09 -07:00
Hasnain Virk 04242c7fa4 Updating BG96 to accomodate socket id assignment
Socket ids will be assigned in the create_socket_impl(...) method. This
is the point where an actual socket creation at the modem takes place.
2019-05-22 23:44:08 -07:00
Hasnain Virk bded22ee98 Prevent assigning socket id until opened at modem
Local modem ip stacks vary in their implementations and the way of
working. Some of the modems may not open a socket until an IP context is
assigned. That's why we came up with a container that stores addresses of
any CellularSocket instances created on-demand by the application. When
the application requests opening a socket we store allocate and store the
premitive in the container however actual socket creation at the modem
may happen at a later stage, e.g., a call to send_to() may result in
actual opening of a socket.

That's why we must not assign socket ids in the CellularSocket object
during construction. It must happen when actual socket is opened and is
alive.

Another implication of the previous model is that we may have multiple
sockets created in our container but the actual socket ids are not
assigned yet, so we cannot directly map the socket id to the container
indices which has been happening previously.

To solve this issue we have promoted the AT_CellularStac::find_socket_index(...) method
to be a protected method rather than being private so that the children
can use the method to determine if the given index in the container
corrsponds to the assigned socket id or not.

We have given up on the socket->created flag and the whole decision
making to actually open a socket on the modem happens on the basis of a
valid socket being assigned or not.
2019-05-22 23:43:41 -07:00
Bilal Qamar fb51501234 Timer stopped after exiting while loop 2019-05-23 11:09:43 +05:00
Bilal Qamar defc244db2 +UPSND sent to poll activation status 2019-05-22 16:52:03 +05:00
Daniel Lee 26c3bcf759 Add a check step of IPv6 network to BG96
Need to check IPv6 address when use IPv6 network via BG96.

Signed-off-by: Daniel Lee <daniel.lee2@arm.com>
2019-05-22 15:49:00 +09:00
Martin Kojtal 344ad4372c
Merge pull request #10593 from kivaisan/fix_target_flow_control_flags
Cellular: Fix flow control pin configs for BC95 and Gemalto targets
2019-05-21 08:47:07 +01:00
Anna Bridge 25019df05e
Merge pull request #10554 from jarvte/remove_compile_warnings
Cellular: fixed compile warnings from cellular
2019-05-17 13:07:51 +01:00
Anna Bridge 6344b9db2c
Merge pull request #10579 from kevinong0108/fix_cellular_quectel_bg96
Cellular: fix Quectel BG96 missing unlock at socket_connect
2019-05-16 10:58:32 +01:00
Kimmo Vaisanen d0fff05443 Cellular: Fix flow control pin configs for BC95 and Gemalto targets 2019-05-16 12:15:38 +03:00
Pekka Pesu 93cb530b94 add BG96 povermanagemet 2019-05-15 00:50:39 -07:00
Pekka Pesu 4d3f1a456d BG96 power handling added 2019-05-15 00:50:32 -07: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
kevin.ong 20a06d8c2d cellular: fix Quectel BG96 missing unlock at socket_connect 2019-05-14 22:39:42 +08:00
Teppo Järvelin d56c8cafa8 Cellular: fixed compile warnings from cellular 2019-05-14 08:48:29 +03: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
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
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 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
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
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
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
Chris Trowbridge a457b80e81
More access modifier changes 2019-04-18 15:14:08 -04:00
Chris Trowbridge b59228988c
Make AT_CellularContext::get_context() virtual 2019-04-18 15:02:41 -04: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
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
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