Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
c935f21
cron: magic_tag: Use default_test_cases if prefixes not provided
mkasenberg Mar 20, 2025
567acc3
cron: pr: Add limit on test cases triggered by magic tag
mkasenberg Mar 20, 2025
fad2cd2
wid: gap: Add wid 31
lylezhu2012 Mar 3, 2025
bc10f5b
wid: gap: Add wid 32
lylezhu2012 Mar 3, 2025
de33810
wid: gap: Add wid 160
lylezhu2012 Mar 3, 2025
eb091c9
wid: gap: Add wid 145
lylezhu2012 Mar 3, 2025
7d83578
wid: gap: Add wid 33
lylezhu2012 Mar 3, 2025
338305b
wid: gap: Add wid 34
lylezhu2012 Mar 3, 2025
03ec9ba
wid: gap: Add wid 105
lylezhu2012 Mar 3, 2025
d20a97a
BTP: Specify 0xe0 of `Address_Type` to mark the transport as BR
lylezhu2012 Mar 3, 2025
365ad44
btp: Fix the issue of converting the address type
lylezhu2012 Mar 4, 2025
995887f
wid: gap: Add wid 222
lylezhu2012 Mar 4, 2025
239aa03
Zephyr: Set IOCap.no_input_output for case GAP/MOD/NBON/BV-03-C
lylezhu2012 Mar 4, 2025
ce29b05
BTP: l2cap: Add function l2cap_br_listen
lylezhu2012 Mar 4, 2025
dc051a3
Zephyr: Enable L2CAP Server for case GAP/SEC/SEM/BV-02-C
lylezhu2012 Mar 4, 2025
a1d0022
wid: gap: Add wid 146
lylezhu2012 Mar 4, 2025
f3efb51
wid: gap: Add wid 147
lylezhu2012 Mar 4, 2025
346bfcb
wid: gap: Add wid 164 and 165
lylezhu2012 Mar 4, 2025
3166638
wid: gap: Add wid 102
lylezhu2012 Mar 4, 2025
f050010
wid: gap: Add wid 264
lylezhu2012 Mar 4, 2025
ed5e308
Zephyr: Enable L2CAP service for case GAP/IDLE/BON/BV-03-C
lylezhu2012 Mar 4, 2025
d5f022f
wid: gap: Update wid 2001 to support case GAP/IDLE/BON/BV-04-C
lylezhu2012 Mar 4, 2025
4fd0113
Zephyr: Enable L2CAP service for case GAP/IDLE/BON/BV-04-C
lylezhu2012 Mar 4, 2025
3cd49dc
Zephyr: Enable L2CAP service for case GAP/IDLE/BON/BV-05-C
lylezhu2012 Mar 4, 2025
b4c57e0
Zephyr: Enable L2CAP service for case GAP/IDLE/BON/BV-06-C
lylezhu2012 Mar 4, 2025
f7c1b94
Zephyr: Set IOCap.no_input_output for case GAP/EST/LIE/BV-02-C
lylezhu2012 Mar 5, 2025
3817689
wid: gap: Add wid 166 and 251
lylezhu2012 Mar 5, 2025
9959349
Zephyr: Enable L2CAP service for case GAP/SEC/SEM/BV-04-C
lylezhu2012 Mar 5, 2025
5ec6157
wid: gap: Add wid 231 and 103
lylezhu2012 Mar 5, 2025
bb662cf
Zephyr: Enable L2CAP service for case GAP/SEC/SEM/BV-08-C
lylezhu2012 Mar 5, 2025
71a31ce
Zephyr: Support case GAP/SEC/SEM/BV-05-C
lylezhu2012 Mar 5, 2025
a0248ce
Zephyr: Support case GAP/SEC/SEM/BV-50-C
lylezhu2012 Mar 5, 2025
75e4826
Zephyr: Support case GAP/SEC/SEM/BV-06-C
lylezhu2012 Mar 5, 2025
b776c8a
BTP: Add GAP pair v2 command
lylezhu2012 Mar 5, 2025
e4edec0
Zephyr: Support case GAP/SEC/SEM/BV-07-C
lylezhu2012 Mar 5, 2025
56f7394
Zephyr: Support case GAP/SEC/SEM/BV-51-C
lylezhu2012 Mar 5, 2025
2541174
Zephyr: Support case GAP/SEC/SEM/BV-52-C
lylezhu2012 Mar 5, 2025
6d07300
Zephyr: Support case GAP/SEC/SEM/BV-09-C
lylezhu2012 Mar 5, 2025
20fe8c1
Zephyr: Support case GAP/SEC/SEM/BV-53-C
lylezhu2012 Mar 6, 2025
3999318
Zephyr: Support case GAP/SEC/SEM/BV-10-C
lylezhu2012 Mar 6, 2025
00a227d
Zephyr: Support case GAP/SEC/SEM/BI-24-C
lylezhu2012 Mar 6, 2025
87e21e5
Zephyr: Support case GAP/DM/NCON/BV-01-C
lylezhu2012 Mar 6, 2025
0039b56
Zephyr: Support case GAP/DM/NBON/BV-01-C
lylezhu2012 Mar 6, 2025
c7839b2
Zephyr: Support case GAP/DM/BON/BV-01-C
lylezhu2012 Mar 7, 2025
f57f0cc
wid: gap: Add wid 36
lylezhu2012 Mar 7, 2025
01b52fd
wid: gap: Add wid 7 and wid 123
lylezhu2012 Mar 7, 2025
ed7cd24
wid: gap: Add wid 86
lylezhu2012 Mar 7, 2025
b0802b4
Zephyr: Support case GAP/SEC/SEM/BV-11-C
lylezhu2012 Mar 7, 2025
53ee10f
Zephyr: Add IUT config br_sec_sc_only.conf
lylezhu2012 Mar 7, 2025
7832a76
Zephyr: Support case GAP/SEC/SEM/BV-12-C
lylezhu2012 Mar 7, 2025
84467ba
btp: add a l2cap connect rsp `insufficient_secure_authentication`
lylezhu2012 Mar 7, 2025
a968013
Zephyr: Support case GAP/SEC/SEM/BV-13-C
lylezhu2012 Mar 7, 2025
0251a50
Zephyr: Support case GAP/SEC/SEM/BV-14-C
lylezhu2012 Mar 7, 2025
80edbfd
Zephyr: Support case GAP/SEC/SEM/BV-15-C
lylezhu2012 Mar 7, 2025
4e14bb7
Zephyr: Support case GAP/SEC/SEM/BV-47-C
lylezhu2012 Mar 7, 2025
a2f32f3
Zephyr: Support case GAP/SEC/SEM/BV-48-C
lylezhu2012 Mar 7, 2025
6d6776f
Zephyr: Support case GAP/SEC/SEM/BV-49-C
lylezhu2012 Mar 7, 2025
9f77df7
Zephyr: Support case GAP/SEC/SEM/BV-16-C
lylezhu2012 Mar 8, 2025
6e6d699
Zephyr: Support case GAP/SEC/SEM/BV-17-C
lylezhu2012 Mar 8, 2025
fe0453b
Zephyr: Support case GAP/SEC/SEM/BV-18-C
lylezhu2012 Mar 8, 2025
c8887c9
Zephyr: Support case GAP/SEC/SEM/BV-54-C
lylezhu2012 Mar 8, 2025
3d33763
Zephyr: Support case GAP/SEC/SEM/BV-19-C
lylezhu2012 Mar 8, 2025
25f0e3a
Zephyr: Support case GAP/SEC/SEM/BV-20-C
lylezhu2012 Mar 8, 2025
ee7fdcc
Zephyr: Support case GAP/SEC/SEM/BV-55-C
lylezhu2012 Mar 8, 2025
340a675
wid: gap: Add wid 255
lylezhu2012 Mar 8, 2025
bd9fcc6
wid: gap: Add wid 266
lylezhu2012 Mar 8, 2025
5306c0d
Zephyr: Support case GAP/SEC/SEM/BI-11-C
lylezhu2012 Mar 8, 2025
a8058b8
Zephyr: Support case GAP/SEC/SEM/BI-12-C
lylezhu2012 Mar 8, 2025
2896854
Zephyr: Support case GAP/SEC/SEM/BI-02-C
lylezhu2012 Mar 8, 2025
8a2e9d5
Zephyr: Support case GAP/SEC/SEM/BI-06-C
lylezhu2012 Mar 8, 2025
dfc9af0
Zephyr: Support case GAP/SEC/SEM/BI-03-C
lylezhu2012 Mar 8, 2025
86a8d8e
Zephyr: Support case GAP/SEC/SEM/BI-07-C
lylezhu2012 Mar 8, 2025
851a653
Zephyr: Support case GAP/SEC/SEM/BI-31-C
lylezhu2012 Mar 8, 2025
8ed179a
Zephyr: Support case GAP/SEC/SEM/BI-14-C
lylezhu2012 Mar 8, 2025
78dc9d1
Zephyr: Support case GAP/SEC/SEM/BI-15-C
lylezhu2012 Mar 8, 2025
45dc460
Zephyr: Support case GAP/SEC/SEM/BI-16-C
lylezhu2012 Mar 8, 2025
65b6eb8
Zephyr: Support case GAP/SEC/SEM/BI-03-C
lylezhu2012 Mar 8, 2025
b627e1d
Zephyr: Support case GAP/SEC/SEM/BI-17-C
lylezhu2012 Mar 8, 2025
0c35096
Zephyr: Support case GAP/SEC/SEM/BI-18-C
lylezhu2012 Mar 8, 2025
23f8df3
Zephyr: Support case GAP/SEC/SEM/BI-19-C
lylezhu2012 Mar 8, 2025
00c7a7b
Zephyr: Support case GAP/SEC/SEM/BI-08-C
lylezhu2012 Mar 8, 2025
04717c7
Zephyr: Add IUT br_sec_ks_128.conf
lylezhu2012 Mar 8, 2025
fadf9cb
Zephyr: Support case GAP/SEC/SEM/BI-18-C
lylezhu2012 Mar 9, 2025
ea6d4c6
Zephyr: Support case GAP/DM/LEP/BV-09-C
lylezhu2012 Mar 9, 2025
84615fb
Zephyr: Support case GAP/DM/LEP/BV-10-C
lylezhu2012 Mar 9, 2025
a1dd581
Zephyr: Support case GAP/DM/LEP/BV-11-C
lylezhu2012 Mar 9, 2025
ad39418
Zephyr: Support case GAP/DM/LEP/BV-12-C
lylezhu2012 Mar 9, 2025
08cc085
Zephyr: Support case GAP/DM/LEP/BV-15-C
lylezhu2012 Mar 9, 2025
30c7276
Zephyr: Support case GAP/DM/LEP/BV-20-C
lylezhu2012 Mar 9, 2025
775a661
Zephyr: Support case GAP/DM/LEP/BV-14-C
lylezhu2012 Mar 9, 2025
350e8d4
Zephyr: Support case GAP/DM/LEP/BV-16-C
lylezhu2012 Mar 9, 2025
dd59648
Zephyr: Support case GAP/DM/LEP/BV-21-C
lylezhu2012 Mar 9, 2025
30d94db
Zephyr: Support case GAP/DM/LEP/BV-17-C
lylezhu2012 Mar 9, 2025
8b21900
Zephyr: Support case GAP/DM/LEP/BI-01-C
lylezhu2012 Mar 9, 2025
f0b9678
Zephyr: Support case GAP/DM/LEP/BV-22-C
lylezhu2012 Mar 9, 2025
0a1ddcc
Zephyr: Support case GAP/DM/LEP/BV-19-C
lylezhu2012 Mar 9, 2025
9b1f89d
Zephyr: Support case GAP/DM/LEP/BI-02-C
lylezhu2012 Mar 9, 2025
138dc33
Zephyr: Support case GAP/DM/LEP/BV-23-C
lylezhu2012 Mar 9, 2025
9eb6e35
Zephyr: Support case GAP/DM/LEP/BV-18-C
lylezhu2012 Mar 9, 2025
f41c04e
Zephyr: Support case GAP/DM/LEP/BV-13-C
lylezhu2012 Mar 9, 2025
ac79a83
BTP: GAP: Add a event `encryption change`
lylezhu2012 Mar 9, 2025
7307939
Zephyr: Support case GAP/SEC/SEM/BI-27-C
lylezhu2012 Mar 9, 2025
fca0b9e
Zephyr: Support case GAP/SEC/SEM/BI-32-C
lylezhu2012 Mar 9, 2025
cdec2c0
Zephyr: Support case GAP/SEC/SEM/BI-26-C
lylezhu2012 Apr 1, 2025
5cd47ef
Zephyr: Support case GAP/SEC/SEM/BI-25-C
lylezhu2012 Mar 9, 2025
4a931d4
Zephyr: Support case GAP/SEC/SEM/BV-25-C
lylezhu2012 Mar 9, 2025
5eebd4a
Zephyr: Support case GAP/SEC/SEM/BV-30-C
lylezhu2012 Mar 9, 2025
bbc71e3
Zephyr: Update case GAP/DM/LEP/BV-13-C
lylezhu2012 Mar 11, 2025
527309e
Zephyr: Update case GAP/SEC/SEM/BV-06-C
lylezhu2012 Mar 17, 2025
7838ae0
wid: gap: Add test case round flag for each window handle functions
lylezhu2012 Mar 25, 2025
e7f862a
read_supported_cmds
JakubMarciniak93 Mar 28, 2025
6ae7700
boards: Use sysbuild for nrf53
Thalley Mar 26, 2025
6f5e0d0
tools: Update profile generator
mkasenberg Apr 4, 2025
d2e7af0
zephyr: mesh: PNID advertisement must stop immediately
m-alperen-sener Mar 31, 2025
ae02611
cron: pr job: Fix per commit limit
mkasenberg Apr 8, 2025
438887a
autopts: doc: Update PTS "Create Workspace" Tutorial
JakubMarciniak93 Apr 14, 2025
333639c
Fix `hdl_wid_52` decode error
theob-pro Apr 3, 2025
b521700
Add CSIP-issue to errata list
Frodevan Mar 24, 2025
13d2001
doc/btp_gap: add filter accept list flag to discovery
jrintaha Mar 14, 2025
8d5670d
Removing the check for visible windows so to include non-visible as well
ktheodorop Mar 31, 2025
8edb422
requirements: client: Add missing pyudev library
MicImbriani Apr 15, 2025
23cc92b
Add Port Parameter to BTP Socket Initialization
jignesh-kumar Apr 22, 2025
02a7746
cron: pr_job: Add startup_fail_max_count option
mkasenberg Apr 9, 2025
ab035df
cron: magic_tag: Strip comment body
mkasenberg Apr 23, 2025
83f6db0
errata: Remove BASS test from errata list
MicImbriani Apr 23, 2025
3d1fe21
Add GATT service initialization in L2CAP tests
szymon-czapracki Mar 28, 2025
a2e23cf
wid: CAP: Add missing hdl_wid_420
MicImbriani Apr 25, 2025
31c3cb6
log: Add "|" symbol to identify header in raw data
szymon-czapracki May 9, 2025
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
50 changes: 49 additions & 1 deletion autopts/bot/iut_config/zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,55 @@
"test_cases": [
'MBTM/CL/BT'
]
}
},

"br_sec_sc_only.conf": {
"overlay": {
'CONFIG_BT_CLASSIC': 'y',
'CONFIG_BT_CENTRAL': 'y',
'CONFIG_BT_PERIPHERAL': 'y',
'CONFIG_BT_SMP': 'y',
'CONFIG_BT_L2CAP_DYNAMIC_CHANNEL': 'y',
'CONFIG_BT_PAGE_TIMEOUT': '0xFFFF',
'CONFIG_BT_SMP_SC_ONLY': 'y',
'CONFIG_BT_SMP_SC_PAIR_ONLY': 'y',
},
"test_cases": [
'GAP/SEC/SEM/BV-11-C',
'GAP/SEC/SEM/BV-12-C',
'GAP/SEC/SEM/BV-13-C',
'GAP/SEC/SEM/BV-47-C',
'GAP/SEC/SEM/BV-16-C',
'GAP/SEC/SEM/BV-17-C',
'GAP/SEC/SEM/BV-18-C',
'GAP/SEC/SEM/BV-54-C',
'GAP/SEC/SEM/BI-32-C',
'GAP/SEC/SEM/BV-25-C',
'GAP/SEC/SEM/BV-30-C',
]
},

"br_sec_ks_128.conf": {
"overlay": {
'CONFIG_BT_CLASSIC': 'y',
'CONFIG_BT_CENTRAL': 'y',
'CONFIG_BT_PERIPHERAL': 'y',
'CONFIG_BT_SMP': 'y',
'CONFIG_BT_L2CAP_DYNAMIC_CHANNEL': 'y',
'CONFIG_BT_PAGE_TIMEOUT': '0xFFFF',
'CONFIG_BT_SMP_MIN_ENC_KEY_SIZE': '16',
},
"test_cases": [
'GAP/SEC/SEM/BI-14-C',
'GAP/SEC/SEM/BI-15-C',
'GAP/SEC/SEM/BI-16-C',
'GAP/SEC/SEM/BI-04-C',
'GAP/SEC/SEM/BI-17-C',
'GAP/SEC/SEM/BI-18-C',
'GAP/SEC/SEM/BI-19-C',
'GAP/SEC/SEM/BI-08-C',
]
},
}

retry_config = {
Expand Down
19 changes: 8 additions & 11 deletions autopts/ptsprojects/boards/nrf53.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
import logging
import os

from .nrf5x import *
from autopts.bot.common import check_call
from subprocess import CalledProcessError

board_type = 'nrf5340dk/nrf5340/cpuapp'


def build_and_flash(zephyr_wd, board, debugger_snr, conf_file=None, *args):
"""Build and flash Zephyr binary
:param zephyr_wd: Zephyr source path
Expand All @@ -30,22 +32,17 @@ def build_and_flash(zephyr_wd, board, debugger_snr, conf_file=None, *args):
board, conf_file)

tester_dir = os.path.join(zephyr_wd, 'tests', 'bluetooth', 'tester')
controller_dir = os.path.join(zephyr_wd, 'samples', 'bluetooth', 'hci_ipc')

check_call('rm -rf build/'.split(), cwd=tester_dir)
check_call('rm -rf build/'.split(), cwd=controller_dir)

bttester_overlay = 'hci_ipc.conf'

if conf_file and conf_file != 'default' and conf_file != 'prj.conf':
bttester_overlay += f';{conf_file}'

cmd = ['west', 'build', '--no-sysbuild', '-b', board, '--', f'-DEXTRA_CONF_FILE=\'{bttester_overlay}\'']
cmd = ['west', 'build', '--sysbuild', '-b', board, '--', f'-DEXTRA_CONF_FILE=\'{bttester_overlay}\'']
check_call(cmd, cwd=tester_dir)
check_call(['west', 'flash', '--skip-rebuild', '--recover', '-i', debugger_snr], cwd=tester_dir)

cmd = ['west', 'build', '--no-sysbuild', '-b', 'nrf5340dk/nrf5340/cpunet', '--',
f'-DEXTRA_CONF_FILE=\'nrf5340_cpunet_iso-bt_ll_sw_split.conf;'
f'../../../tests/bluetooth/tester/hci_ipc_cpunet.conf\'']
check_call(cmd, cwd=controller_dir)
check_call(['west', 'flash', '--skip-rebuild', '-i', debugger_snr], cwd=controller_dir)
try:
check_call(['west', 'flash', '--skip-rebuild', '-i', debugger_snr], cwd=tester_dir)
except CalledProcessError:
check_call(['west', 'flash', '--skip-rebuild', '--recover', '-i', debugger_snr], cwd=tester_dir)
8 changes: 8 additions & 0 deletions autopts/ptsprojects/mynewt/l2cap.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ def test_cases(ptses):
TestFunc(btp.l2cap_le_listen, le_psm, le_initial_mtu, L2cap.unacceptable_parameters)
]

pre_conditions_gatt = common + [
TestFunc(btp.core_reg_svc_gatt),
]

custom_test_cases = [
# Connection Parameter Update
ZTestCase("L2CAP", "L2CAP/LE/CFC/BV-04-C",
Expand Down Expand Up @@ -229,6 +233,10 @@ def test_cases(ptses):
[TestFunc(lambda: pts.update_pixit_param(
"L2CAP", "TSPX_l2ca_cbmps_min", "0040"))],
generic_wid_hdl=l2cap_wid_hdl),
# Collision mitigation handling
ZTestCase("L2CAP", "L2CAP/TIM/BV-03-C",
pre_conditions_gatt,
generic_wid_hdl=l2cap_wid_hdl),
]

test_case_name_list = pts.get_test_case_list('L2CAP')
Expand Down
21 changes: 21 additions & 0 deletions autopts/ptsprojects/stack/layers/gap.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def __init__(self, name, manufacturer_data, appearance, svc_data, flags,
self.passkey = Property(None)
self.conn_params = Property(None)
self.pairing_failed_rcvd = Property(None)
self.encryption_change_rcvd = Property(None)

# bond_lost data (addr_type, addr)
self.bond_lost_ev_data = Property(None)
Expand Down Expand Up @@ -224,6 +225,26 @@ def gap_wait_for_pairing_fail(self, timeout=5):

return self.pairing_failed_rcvd.data

def gap_wait_for_encryption_change(self, timeout=5):
if self.encryption_change_rcvd.data is None:
wait_for_event(timeout, lambda: self.encryption_change_rcvd.data)

return self.encryption_change_rcvd.data

def gap_wait_for_encrypted(self, timeout=5):
if self.encryption_change_rcvd.data is None:
wait_for_event(timeout, lambda: self.encryption_change_rcvd.data)

if self.encryption_change_rcvd.data is None:
return False

(_, _, enabled, _) = self.encryption_change_rcvd.data

if enabled == 0:
return False
else:
return True

def gap_wait_for_lost_bond(self, timeout=5):
if self.bond_lost_ev_data.data is None:
wait_for_event(timeout, lambda: self.bond_lost_ev_data.data)
Expand Down
42 changes: 5 additions & 37 deletions autopts/ptsprojects/stack/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,16 @@
import logging
from autopts.ptsprojects.stack.layers import *
from autopts.ptsprojects.stack.synch import Synch
from autopts.pybtp import defs
from autopts.pybtp import common

STACK = None
log = logging.debug


# these are in little endian
services = {
"CORE": 1 << defs.BTP_SERVICE_ID_CORE,
"GAP": 1 << defs.BTP_SERVICE_ID_GAP,
"GATT": 1 << defs.BTP_SERVICE_ID_GATT,
"L2CAP": 1 << defs.BTP_SERVICE_ID_L2CAP,
"MESH": 1 << defs.BTP_SERVICE_ID_MESH,
"MESH_MMDL": 1 << defs.BTP_SERVICE_ID_MMDL,
"GATT_CL": 1 << defs.BTP_SERVICE_ID_GATTC,
"VCS": 1 << defs.BTP_SERVICE_ID_VCS,
"IAS": 1 << defs.BTP_SERVICE_ID_IAS,
"AICS": 1 << defs.BTP_SERVICE_ID_AICS,
"VOCS": 1 << defs.BTP_SERVICE_ID_VOCS,
"PACS": 1 << defs.BTP_SERVICE_ID_PACS,
"ASCS": 1 << defs.BTP_SERVICE_ID_ASCS,
"BAP": 1 << defs.BTP_SERVICE_ID_BAP,
"MICP": 1 << defs.BTP_SERVICE_ID_MICP,
"HAS": 1 << defs.BTP_SERVICE_ID_HAS,
"CSIS": 1 << defs.BTP_SERVICE_ID_CSIS,
"MICS": 1 << defs.BTP_SERVICE_ID_MICS,
"CCP": 1 << defs.BTP_SERVICE_ID_CCP,
"VCP": 1 << defs.BTP_SERVICE_ID_VCP,
"MCP": 1 << defs.BTP_SERVICE_ID_MCP,
"GMCS": 1 << defs.BTP_SERVICE_ID_GMCS,
"HAP": 1 << defs.BTP_SERVICE_ID_HAP,
"CAP": 1 << defs.BTP_SERVICE_ID_CAP,
"CSIP": 1 << defs.BTP_SERVICE_ID_CSIP,
"TBS": 1 << defs.BTP_SERVICE_ID_TBS,
"TMAP": 1 << defs.BTP_SERVICE_ID_TMAP,
"OTS": 1 << defs.BTP_SERVICE_ID_OTS,
"PBP": 1 << defs.BTP_SERVICE_ID_PBP,
# GENERATOR append 1
}


class Stack:
def __init__(self):
self.supported_svcs = 0
self.supported_cmds = 0
self.synch = None

self.gap = None
Expand Down Expand Up @@ -90,9 +56,11 @@ def __init__(self):
self.ots = None
self.pbp = None
# GENERATOR append 2
self.supported_svcs_cmds = common.supported_svcs_cmds

def is_svc_supported(self, svc):
return self.supported_svcs & services[svc] > 0
svc_value = self.supported_svcs_cmds.get(svc, {}).get("service", 0)
return (self.supported_svcs & svc_value) > 0

def gap_init(self, name=None, manufacturer_data=None, appearance=None,
svc_data=None, flags=None, svcs=None, uri=None, periodic_data=None,
Expand Down
Loading