Commit graph

12 commits

Author SHA1 Message Date
Frédéric Danis
fd508d395b bluez5: backend-native: Add a property to select the modem to use
By default no modem is allowed.
Property "bluez5.hfphsp-backend-native-modem" can be 'none', 'any' or the
modem device string has found in 'Device' property of
org.freedesktop.ModemManager1.Modem interface, e.g. for PinePhone
"/sys/devices/platform/soc/1c1b000.usb/usb2/2-1".
2022-10-05 19:31:50 +00:00
Frédéric Danis
c4addb102b bluez5: backend-native: Only use first modem found
Some device may have multiple modems, we should only used one, the first
found and manage changes only for this one.
2022-10-05 19:31:50 +00:00
Frédéric Danis
a37aeac273 bluez5: backend-native: Add AT+VTS support
This allows to send a DTMF key on an active call.
2022-10-05 19:31:50 +00:00
Frédéric Danis
7c05574072 bluez5: backend-native: Add AT+CNUM support
This only support the first subscriber number.
2022-10-05 19:31:50 +00:00
Frédéric Danis
3566b0739b bluez5: backend-native: Add ATDdd...dd; support
This allows to dial a number.

Memory dialing (ATD>nnn...;) is not supported as it requests access to
the contact application.
2022-10-05 19:31:50 +00:00
Frédéric Danis
20572a1789 bluez5: backend-native: Add AT+CLCC support
This allows the HFP HF to retrieve the list of calls with their index,
state and remote number (if available).

This commit shared the list of calls between modemmanager.c and
backend-native.c, and switches call state storage from ModemManager
states to CLCC states
2022-10-05 19:31:50 +00:00
Frédéric Danis
55075915ec bluez5: backend-native: Add AT+CLIP support
This allows to send the caller number of an incoming call with the RING
event.
2022-10-05 19:31:50 +00:00
Frédéric Danis
4a89a13bda bluez5: backend-native: Support of ATA and AT+CHUP
Allow to answer, reject or terminate a call.

Answering or rejecting a call can only be done on an incoming call.
Terminating a call can only be done on active, dialing or alerting call.
2022-10-05 19:31:50 +00:00
Frédéric Danis
43c4d95794 bluez5: backend-native: Link with ModemManager Call object
Update the +CIND call and callsetup indicators when Call object state
change.
2022-10-05 19:31:50 +00:00
Frédéric Danis
5b40ed62b4 bluez5: backend-native: Link with ModemManager Voice object
The Voice object lists the Call objects, which provides status of each call.

+CIND call indicator is set if at least one of the call is active.
+CIND callsetup indicator is set if one of the call is in ringing in or out
or dialing state.
2022-10-05 19:31:50 +00:00
Frédéric Danis
275d2bc603 bluez5: backend-native: Link with ModemManager Modem3GPP object
The Modem3GPP provides information about the network the modem is registered
to like the operator name and roaming status.
2022-10-05 19:31:50 +00:00
Frédéric Danis
13f0a0755e bluez5: backend-native: Link with ModemManager Modem object
The Modem object provides the own number (used by +CNUM), the network
service availability and signal strength (used for the +CIND).

+CIND indicators can be activated/deactivated using AT+BIA except for
call, callsetup and callheld indicators which should always reported.
All indicators are enabled on connection.
2022-10-05 19:31:50 +00:00