Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BASS support for bttester. #1813

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/bttester/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ pkg.deps:
- "@apache-mynewt-core/sys/stats"
- "@apache-mynewt-core/sys/shell"
- "@apache-mynewt-nimble/nimble/host"
- "@apache-mynewt-nimble/nimble/host/audio"
- "@apache-mynewt-nimble/nimble/host/util"
- "@apache-mynewt-nimble/nimble/host/services/gap"
- "@apache-mynewt-nimble/nimble/host/services/gatt"
- "@apache-mynewt-nimble/nimble/host/services/dis"
- "@apache-mynewt-nimble/nimble/host/audio/services/bass"
- "@apache-mynewt-nimble/nimble/host/store/config"
- "@apache-mynewt-core/hw/drivers/uart"
- "@apache-mynewt-core/hw/drivers/rtt"
Expand Down
15 changes: 14 additions & 1 deletion apps/bttester/src/btp/btp_bap.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,24 @@ struct bap_bap_broadcast_source_stop_cmd {
} __packed;

#define BTP_BAP_BROADCAST_SINK_SETUP 0x0a

#define BTP_BAP_BROADCAST_SINK_STOP 0x0f
struct btp_bap_broadcast_sink_stop_cmd {
ble_addr_t address;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ble_addr_t already has address type...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

uint8_t broadcast_id[3];
} __packed;

#define BTP_BAP_SET_BROADCAST_CODE 0x17
struct btp_bap_set_broadcast_code_cmd {
ble_addr_t addr;
uint8_t source_id;
uint8_t broadcast_code[16];
} __packed;

#define BTP_BAP_BROADCAST_SINK_RELEASE 0x0b
#define BTP_BAP_BROADCAST_SCAN_START 0x0c
#define BTP_BAP_BROADCAST_SCAN_STOP 0x0d
#define BTP_BAP_BROADCAST_SINK_SYNC 0x0e
#define BTP_BAP_BROADCAST_SINK_STOP 0x0f
#define BTP_BAP_BROADCAST_SINK_BIS_SYNC 0x10
#define BTP_BAP_DISCOVER_SCAN_DELEGATOR 0x11
#define BTP_BAP_BROADCAST_ASSISTANT_SCAN_START 0x12
Expand Down
10 changes: 10 additions & 0 deletions apps/bttester/src/btp/btp_gap.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ struct btp_gap_read_controller_index_list_rp {
#define BTP_GAP_SETTINGS_PRIVACY 13
#define BTP_GAP_SETTINGS_CONTROLLER_CONFIG 14
#define BTP_GAP_SETTINGS_STATIC_ADDRESS 15
#define BTP_GAP_SETTINGS_EXTENDED_ADVERTISING 17
#define BTP_GAP_SETTINGS_PERIODIC_ADVERTISING 18

#define BTP_GAP_READ_CONTROLLER_INFO 0x03
Expand Down Expand Up @@ -258,6 +259,15 @@ struct btp_gap_set_filter_accept_list_cmd {
ble_addr_t addrs[];
} __packed;

#define GAP_SET_EXT_ADV 0x21
struct btp_gap_set_ext_advertising_cmd {
uint8_t setting;
} __packed;

struct btp_gap_set_ext_advertising_rp {
uint32_t current_settings;
} __packed;

#define GAP_PADV_CONFIGURE 0x22
struct gap_periodic_adv_configure_cmd {
uint8_t flags;
Expand Down
4 changes: 2 additions & 2 deletions apps/bttester/src/btp/bttester.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
int
gatt_svr_init(void);

#if MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE)
#if MYNEWT_VAL(BLE_AUDIO)
uint8_t
tester_init_bap(void);
uint8_t
tester_unregister_bap(void);
#endif /* MYNEWT_VAL(BLE_ISO_BROADCAST_SOURCE) */
#endif /* MYNEWT_VAL(BLE_AUDIO) */

#endif /* __BTTESTER_H__ */

Loading
Loading