Commit Graph

1646 Commits

Author SHA1 Message Date
Slava Monich b26abc8f78 atmodem: Query the list of supported <fac>s from the modem
Not all modems support all <fac>s (particularly, "PS"), let's be polite
and not ask them for the ones they don't support.
2017-10-23 17:24:02 -05:00
Jonas Bonn 35636752ad qmi: support SMS receive on Quectel EC21
The Quectel EC21 does not provide the SMS PDU on the message event
notification.

This patch adds a call to 'raw read' on the message ID from the event
notification if the event notification does not already contain the
message data.

The message data begins with the SMSC length, type, and address so
the TPDU length is adjusted accordingly in the raw_read callback.  This
differs from the way the raw message data is handled in the case
that it is included in the event notification itself.  As I don't have
access to any other QMI modem at this time, I'm can not confirm that
this difference is reasonable.
2017-10-17 09:35:02 -05:00
James Prestwood 1b5e95a32a atmodem: implemented sim-auth functionality in atmodem
Implemented the core API's needed for sim-auth:

list_apps: already implemented
open_channel: Opens a logical channel with +CCHO
close_channel: Closes logical channel with +CCHC
logical_access: Access an opened channel with +CGLA
2017-10-12 15:33:27 -05:00
Denis Kenzior 92296924ff mbim: Add basic SIM driver 2017-10-09 16:37:39 -05:00
Ankit Navik 2518c0e9d2 xmm7modem: Add ims atom driver 2017-10-09 11:39:03 -05:00
Slava Monich 4a2915d52d atmodem: Fix use after free in sim_state_cb
==2941== Invalid read of size 4
==2941==    at 0x69338: sim_state_cb (sim.c:1301)
==2941==    by 0x71DCB: cpin_check_cb (atutil.c:567)
==2941==    by 0xA602B: at_chat_finish_command (gatchat.c:459)
==2941==    by 0xA6277: at_chat_handle_command_response (gatchat.c:521)
==2941==    by 0xA6587: have_line (gatchat.c:600)
==2941==    by 0xA6BB7: new_bytes (gatchat.c:759)
==2941==    by 0xAAFAF: received_data (gatio.c:124)
==2941==    by 0x4AF606F: g_main_dispatch (gmain.c:3154)
==2941==    by 0x4AF606F: g_main_context_dispatch (gmain.c:3769)
==2941==    by 0x4AF658F: g_main_loop_run (gmain.c:4034)
==2941==    by 0xBDDBB: main (main.c:261)
==2941==  Address 0x519c344 is 4 bytes inside a block of size 12 free'd
==2941==    at 0x4840B28: free (vg_replace_malloc.c:530)
==2941==    by 0x71F33: at_util_sim_state_query_free (atutil.c:613)
==2941==    by 0x6930B: sim_state_cb (sim.c:1297)
==2941==    by 0x71DCB: cpin_check_cb (atutil.c:567)
==2941==    by 0xA602B: at_chat_finish_command (gatchat.c:459)
==2941==    by 0xA6277: at_chat_handle_command_response (gatchat.c:521)
==2941==    by 0xA6587: have_line (gatchat.c:600)
==2941==    by 0xA6BB7: new_bytes (gatchat.c:759)
==2941==    by 0xAAFAF: received_data (gatio.c:124)
==2941==    by 0x4AF606F: g_main_dispatch (gmain.c:3154)
==2941==    by 0x4AF606F: g_main_context_dispatch (gmain.c:3769)
==2941==    by 0x4AF658F: g_main_loop_run (gmain.c:4034)
==2941==    by 0xBDDBB: main (main.c:261)
2017-10-05 11:11:13 -05:00
Denis Kenzior 94cefc7cff mbim: Add CIDs from the specification 2017-10-05 11:08:38 -05:00
Denis Kenzior f0c1bdcf88 mbim: Support all types in _mbim_message_build 2017-10-05 11:08:38 -05:00
Denis Kenzior 978752bcd6 mbim: Add devinfo driver
Querying Manufacturer and Model is still not supported
2017-10-05 11:08:38 -05:00
Denis Kenzior cc90b1f71e mbim: Add mbim_device_cancel_group 2017-10-05 11:08:38 -05:00
Denis Kenzior db42e75a9c mbim: Add mbim_device_cancel 2017-10-05 11:08:38 -05:00
Denis Kenzior b5512b2775 mbim: Implement receiving responses 2017-10-05 11:08:38 -05:00
Denis Kenzior f92ca542e7 mbim: Implement sending commands 2017-10-05 11:08:38 -05:00
Denis Kenzior c995e657f4 mbim: Close IO in an idle event 2017-10-05 11:08:38 -05:00
Denis Kenzior 65d6d7d199 mbim: Add is_ready flag 2017-10-05 11:08:38 -05:00
Denis Kenzior b1a089eb0f mbim: Add message_assembly utilities 2017-10-05 11:08:38 -05:00
Denis Kenzior 1d16d4ac4e mbim: Add header & body accessors for mbim-message 2017-10-05 11:08:38 -05:00
Denis Kenzior 0c8199dca5 mbim: Implement MBIM_CLOSE_MSG 2017-10-05 11:08:38 -05:00
Denis Kenzior 076faf21d7 mbim: Implement MBIM_OPEN_MSG 2017-10-05 11:08:38 -05:00
Denis Kenzior 4e058ece2c mbim: Add mbim_device_set_ready_handler 2017-10-05 11:08:38 -05:00
Denis Kenzior d8686704e7 mbim: Rework constructor 2017-10-05 11:08:38 -05:00
Denis Kenzior d8485cb5f4 mbim: Get rid of fd and close_on_unref members
l_io already does this for us
2017-10-05 11:08:38 -05:00
Denis Kenzior fb1641c539 mbim: Add mbim_device_set_max_outstanding 2017-10-05 11:08:38 -05:00
Denis Kenzior 684be2760c mbim: Add mbim_message_get_uuid 2017-10-05 11:08:38 -05:00
Denis Kenzior a12f3c73ac mbim: Add mbim_message_get_cid 2017-10-05 11:08:38 -05:00
Denis Kenzior d9b0bbf69b mbim: Rework mbim_message_new 2017-10-05 11:08:38 -05:00
Denis Kenzior 8c0caf5715 mbim: Add mbim_message_get_error 2017-10-05 11:08:38 -05:00
Denis Kenzior 5f6a0147ba unit: Add phonebook read build test 2017-10-05 11:08:38 -05:00
Denis Kenzior 75993d8edc mbim: Add mbim_message_set_arguments 2017-10-05 11:08:38 -05:00
Denis Kenzior 1ed919c368 mbim: Support for building variable-sized structs 2017-10-05 11:08:38 -05:00
Denis Kenzior 54ff05956c mbim: Add support for building arrays 2017-10-05 11:08:38 -05:00
Denis Kenzior 9ed20413cc mbim: Add _mbim_message_to_bytearray 2017-10-05 11:08:38 -05:00
Denis Kenzior 76c97996f5 mbim: Add _mbim_message_set_tid 2017-10-05 11:08:38 -05:00
Denis Kenzior f66c2fe982 mbim: Add _mbim_message_new_command_done
This is for unit testing purposes
2017-10-05 11:08:38 -05:00
Denis Kenzior 76811bb326 mbim: Add basic message builder support 2017-10-05 11:08:38 -05:00
Denis Kenzior 397079cc13 mbim: Add MBIM service UUID constants 2017-10-05 11:08:38 -05:00
Denis Kenzior 99501a7d1d mbim: Support parsing structures 2017-10-05 11:08:38 -05:00
Denis Kenzior db1a61cd27 mbim: Add support for arrays of fixed-size elements
Variable-sized arrays are handled by using an Element Count followed by
OL_PAIR_LIST.  For fixed size arrays, an Offset followed by Length is
used.
2017-10-05 11:08:38 -05:00
Denis Kenzior 506e77053b mbim: Don't assume 4-byte alignment
This change would make it possible to read individual bytes from ay type
structures.
2017-10-05 11:08:38 -05:00
Denis Kenzior a64b5453e8 mbim: Parse variable sized item arrays 2017-10-05 11:08:38 -05:00
Denis Kenzior b9de1d999f mbim: Add mbim_message_get_arguments 2017-10-05 11:08:38 -05:00
Denis Kenzior 3ee2343803 mbim: Handle extraction of strings 2017-10-05 11:08:38 -05:00
Denis Kenzior 60c9225169 mbim: add _mbim_information_buffer_length_offset 2017-10-05 11:08:38 -05:00
Denis Kenzior f854c8d193 mbim: Add basic message payload parser 2017-10-05 11:08:38 -05:00
Denis Kenzior 3ddbdda745 mbim: Add skeleton mbim-message class 2017-10-05 11:08:38 -05:00
Denis Kenzior 2d4093ae27 mbim: Add MBIM descriptor utilities
Used to find MBIM Functional and MBIM Extended Functional descriptors
2017-10-05 11:08:38 -05:00
Denis Kenzior 1bfa2749cd mbim: Add skeleton mbim_device object 2017-10-05 11:08:38 -05:00
Denis Kenzior ab58196e31 mbimmodem: Add skeleton driver 2017-10-05 11:08:38 -05:00
Christophe Ronco 22adf6402c huawei: add LTE support
Huawei LTE modems use AT^SYSCFGEX and AT^SYSINFOEX instead of
AT^SYSCFG and AT^SYSINFO.
If we want to be able to attach on LTE with this modem, we must use
AT^SYSCFGEX to configure rat mode and band. Using AT^SYSCFG, mode any
means UMTS or GSM.
2017-09-14 20:05:54 -05:00
Denis Kenzior 9405c9733c ifxmodem: Fix minor style issues 2017-09-13 10:28:56 -05:00