bug: v/80281
Rootcause: Add a socket server and client to enable communication between the user and Bluetooth.
Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
bug: v/83666
The callback macro `CALLBACK_REMOTE` currently used in gatts/gattc employs the member variable `callbacks`. For enhanced versatility, the callback member variables in adv and scan have been modified from `callback` to `callbacks`.
Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
bug: v/83666
The callback macro `CALLBACK_REMOTE` currently used in gatts/gattc employs the member variable `callbacks`. For enhanced versatility, the callback member variables in adv and scan have been modified from `callback` to `callbacks`.
Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
bug: v/59050
Rootcause:When reconnect to the headset during a call, the headset will obtain the call status through the cind command. Since Vela does not have modem, the status will be error. So, get cind from Android.
Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
bug: v/80616
When passed to bt_socket_client_send_with_reply , it may contain undefined values, leading to unpredictable behavior. Initialize packet explicitly before using it.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/80617
When passed to bt_socket_client_send_with_reply , it may contain undefined values, leading to unpredictable behavior. Initialize packet explicitly before using it.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/70057
Rootcause: The PSM employed by L2CAP in LE and BR/EDR contexts are not identical concepts. The LE scenario utilises a simplified PSM, whereas the BR/EDR scenario employs the standard PSM. These differ fundamentally in their allocation methods and are not interoperable.
Consequently, the current implementation of listen and stop listen operations requires distinguishing between connection types. Add a new API `bt_l2cap_stop_listen_with_transport` to support stop listen on BR/EDR PSM. This modification will rectify the error where `bt_l2cap_stop_listen` fails to recognise connection types, whilst filtering operations specific to the BR/EDR type.
Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
bug: v/79112
Rootcause: Within the Android build system, the RPMSG service is inaccessible. Consequently, the corresponding library path has been added to Android.bp, and the include header file for the source file utilising RPMSG has been updated.
Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
bug: v/77564
Some processing logic in asynchronous callbacks is identical; extract this common code into a macro.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/77564
When deleting the Bluetooth asynchronous instance, the IPC cached messages are directly released, and their asynchronous callbacks will not be invoked. This could lead to memory leaks if resources are released within the callbacks.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/57319
Refactor L2CAP API to use handles instead of cookies for callback registration and management.
Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
bug: v/67404
Root cause: The interface handle and other information of the feature exist on the instance of Bluetooth. If the callback does not have instance information, it cannot obtain feature-related information, resulting in the JavaScript application not receiving the callback.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/43852
Originally, only the "adapter_disable" function was executed. An additional step was added before that, which disconnects all ACL connections. A timer was also started to wait for the "disconnect" event for 2 seconds, followed by cleaning up profile resources (by following the normal disable procedure).
Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
bug: v/67238
Rootcause: Currently, when the bt_hfp_hf_query_current_calls interface receives a request, it retrieves the result from the state machine cache and returns it immediately. However, since the cache may not be updated in a timely manner, the returned data may not be the latest.
Signed-off-by: liyuheng <liyuheng@xiaomi.com>
bug: v/62017
Root cause:
1. The application does not pass asynchronous callback when it should directly return an error code. The message should not be sent to the server, and the entire callback list should not be freed.
2. The application registers multiple callbacks, but it should not return the asynchronous callback first and then return the return value of the asynchronous call. This behavior is inconsistent for the application between the first registration of a callback and subsequent registrations. When the application registers multiple callbacks, the message can be sent to the server, and the server will handle duplicate registrations.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/67883
Root Cause: When a C++ file references a Bluetooth file, compilation errors occur due to the Bluetooth file using C++ keywords.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/60422
Rootcause: Pair pin command do not send accept, The default value is 0, thus rejecting the pair process, So add accept when send to socket.
Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
bug: v/17775
In order to implement the PTT function of headphone control, it is necessary to add the process of AG send and receive vendor specific AT commands.
Signed-off-by: jialu <jialu@xiaomi.com>
bug: v/42362
Rootcause: Avrcp control lacks metadata interface, add get metadata interface and callback for avrcp control
Signed-off-by: zhangyuan20 <zhangyuan20@xiaomi.com>
bug: v/45006
Rootcause: The 32-bit pointer stored by the Vela socket server may truncate the 64-bit pointer from Android client
Signed-off-by: shenyangsi <shenyangsi@xiaomi.com>