mirror of
https://github.com/estkme-group/lpac
synced 2025-06-30 00:32:57 +02:00
While the QMI driver which goes to /dev/foobar wants to go through the
qmi-proxy to not have to exclusively claim the device, the QMI-over-QRTR
driver doesn't work with the PROXY flag and just leads to the error
error: open QMI device failed: endpoint hangup
Fix this by passing the correct flag to qmi_device_open from both APDU
drivers.
Closes: #215
Fixes: 3bde4a1
(" driver(APDU): add QMI backend (#131)")
Co-authored-by: Luca Weiss <luca.weiss@fairphone.com>
69 lines
1.4 KiB
C
69 lines
1.4 KiB
C
// SPDX-License-Identifier: MIT
|
|
/*
|
|
* Copyright (c) 2024, Luca Weiss <luca.weiss@fairphone.com>
|
|
*/
|
|
|
|
#include <libqmi-glib.h>
|
|
|
|
#ifdef LPAC_WITH_APDU_QMI_QRTR
|
|
#include <libqrtr-glib.h>
|
|
|
|
QrtrBus *qrtr_bus_new_sync(
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
QmiDevice *
|
|
qmi_device_new_from_node_sync(
|
|
QrtrNode *node,
|
|
GMainContext *context,
|
|
GError **error);
|
|
#endif
|
|
|
|
#ifdef LPAC_WITH_APDU_QMI
|
|
QmiDevice *
|
|
qmi_device_new_from_path(
|
|
GFile *file,
|
|
GMainContext *context,
|
|
GError **error);
|
|
#endif
|
|
|
|
gboolean
|
|
qmi_device_open_sync(
|
|
QmiDevice *device,
|
|
QmiDeviceOpenFlags flags,
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
QmiClient *
|
|
qmi_device_allocate_client_sync(
|
|
QmiDevice *device,
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
gboolean
|
|
qmi_device_release_client_sync(
|
|
QmiDevice *device,
|
|
QmiClient *client,
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
QmiMessageUimOpenLogicalChannelOutput *
|
|
qmi_client_uim_open_logical_channel_sync(
|
|
QmiClientUim *client,
|
|
QmiMessageUimOpenLogicalChannelInput *input,
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
QmiMessageUimLogicalChannelOutput *
|
|
qmi_client_uim_logical_channel_sync(
|
|
QmiClientUim *client,
|
|
QmiMessageUimLogicalChannelInput *input,
|
|
GMainContext *context,
|
|
GError **error);
|
|
|
|
QmiMessageUimSendApduOutput *
|
|
qmi_client_uim_send_apdu_sync(
|
|
QmiClientUim *client,
|
|
QmiMessageUimSendApduInput *input,
|
|
GMainContext *context,
|
|
GError **error);
|